Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6731301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:30:44+00:00 2026-05-26T10:30:44+00:00

Well this is a layman’s attempt on blurring an image, i am not using

  • 0

Well this is a layman’s attempt on blurring an image, i am not using any specific [already known] alogrithm, i am implementing my own technique.

float k[][5]= { .01, .01, .01, .01, .01,
                .01, .01, .01,  .01, .01,
                .01, .01, .01,  .01, .01};

for( row = 0; row < rows; ++row) 
    {
            sum=0;
            for ( col = 0; col < cols; ++col) 
            {               
                            temp_ptr  = &((uchar*)(img->imageData + (img->widthStep*row)))[col];
                            for( i=1; i<6;i++)
                            {
                                float factor=exp((float)(-(i-col)*(i-col)/(2*sigma2))); 
                                sum+=factor;
                                for( j=1; j<6 ;j++)
                                {
                                    if( (row-j)>0 && (col-i)>0   )
                                    k[i-1][j-1]+=factor*temp_ptr[row-i+col-j];
                                }
                                for( j=1; j<6 ;j++)
                                {
                                    if( (row-j)>0 && (col-i)>0   )
                                    {
                                    uchar* temp_ptr1  = &((uchar*)(img->imageData + (img->widthStep * (row-1) )))[col-1];

                                temp_ptr1[0]=temp_ptr[0]*k[i-1][j-1]/sum;   
                                temp_ptr1[1]=temp_ptr[1]*k[i-1][j-1]/sum;   
                                temp_ptr1[2]=temp_ptr[2]*k[i-1][j-1]/sum;   
                                    }
                                }
                            }
            }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:30:44+00:00Added an answer on May 26, 2026 at 10:30 am

    Your j index is out of bound for array k.
    It can not be greater than 5 !

    In 5th for you should change upper bound to 5 not 6.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well this probably isn't specific to rails, but in my rails app, I have
I have this Erlang code: not lists:any(fun(Condition) ->Condition(Message) end, Conditions). Can anyone please explain
Well this is probably a stupid question with a simple answer but when using
This is my first time using any sort of version control (git) and excited
Well this topic was and still is debated really a lot and I already
Well this is not the first time im asking these question here but I
everyone, thank for your time. Well this my problem (well it's not a probleam
Well this may be a very easy Question but I'm not getting the answer
Well this is incredibly frustrating. After being nagged by Rails that I need to
Well this file was put in the repo by mistake and was deleted and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.