title: C++ gaussian output pixel
body: <p>I need to construct a gaussian filter using C++. I am successfully getting my pixels from the image and constructing both grids; the one with 1 in the center and the one with one in the corner, my problem is I don't quit understand the gaussian equation! what should I put in the pixel that I should put in the output Image?? What should I put in else? Should I sum all the pixels from the modified grid (The one with 1 in the corner) or what? </p>
  
  <pre><code>for ( int r = 0; r &lt; rowCt; r++ ) 
      {
        for ( int c = 0; c &lt; colCt; c++ ) 
        {
          getPixel ( r, c, onePix );// geting pixel from the Img
          int index = getIndex(r,c);// change colomns and rows to one dimentional array
  
          if(c &lt;= (f/2) || c &gt;= colCt-((f/2)-1)-1 || r &gt;= rowCt-((r/2)-1)-1 || r &lt;= ((r/2)-1)) 
            onePix = 0;// black if in the border
          else
          {
            .... // ??
  
            }
            outIm.setPixel ( r, c, outPut_Pixel);
          }
        }
      }
  </code></pre>