From: Guowei He <gzh101@ps...>  20030711 05:13:20

I am sorry for nor elaborating it clearly. Because I first use the program in VXL // create a normalized Gaussian kernel with standard deviation //sigma=2.0 // vcl_cout << "Creating kernel...\n"; float sigma = 4.0f; float scaleFactor = 1.f / ( 2.f * sigma * sigma ); const int halfSupport = 15; // build kernel float kernel[2*halfSupport+1]; float sum = 0; for ( int i = halfSupport ; i <= halfSupport ; ++i ) { kernel[i+halfSupport] = vcl_exp( i * i * scaleFactor ); sum += kernel[i+halfSupport]; } // normalize kernel for ( int i = halfSupport ; i <= halfSupport ; ++i ) { kernel[i+halfSupport] /= sum; } // convolution of the input image in ydirection vcl_cout << "Convolving in ydirection...\n"; vil_convolve_1d(vil_transpose( imageIn ), tmp, &kernel[halfSupport], halfSupport, halfSupport, float(), vil_convolve_constant_extend, vil_convolve_constant_extend ); // convolution of the input image in xdirection vcl_cout << "Convolving in xdirection...\n"; vil_convolve_1d(vil_transpose( tmp ), imageOut, &kernel[1], halfSupport, halfSupport, float(), vil_convolve_constant_extend, vil_convolve_constant_extend ); to filter image. The result is the same as I use Gaussian filter in MATLAB. But when I use the program vil_gauss_filter_params t(sigma); vil_gauss_filter(imageIn,imageOut,t); when sigma is below 2.0, the result is the same as the previous program. But when I set sigma to 4.0, the result is different. I knew that in New Vil, the gaussian filtering is using the recursive gaussian filter algorithm. So maybe the method I call vil_gauss_filter is wrong? What is correct method to call function vil_gauss_filter? Thanks a lot! Guowei On Thu, 10 Jul 2003 15:24:43, Amitha Perera wrote: > On Wed 09 Jul 2003, Guowei He wrote: > > I have a problem in using guassian convolution. When I set sigma>4, > > the result is not good as MATLAB. > > Can you elaborate on what you mean by "not as good as MATLAB"? How did > you quantify "good"? > > Amitha. > > >  > This SF.Net email sponsored by: Parasoft > Error proof Web apps, automate testing & more. > Download & eval WebKing and get a free book. > http://www.parasoft.com/bulletproofapps1 > _______________________________________________ > Vxlusers mailing list > Vxlusers@... > https://lists.sourceforge.net/lists/listinfo/vxlusers > > 