I'm trying to implement a gaussian blur algorithm, but my weight function is returning the wrong values
float gauss(int x, int y, float sigma)
{
float gauss = 100*exp(-(pow(x,2)+pow(y,2)) / (2*pow(sigma,2))) / (pow(sigma, 2)*2*3.14159);
return gauss;
}
I did it based on this tutorial, and according to them i should get this:
我认为你使用sigma = 1.0,你比较的例子使用了sigma = 1.5?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.