kernel: be more conservative when estimating deviation

Using integral to estimate the sum of the kernel will overestimate a
little bit.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2022-08-25 05:29:26 +01:00
parent 84407099a9
commit 94e3d4d483

View File

@@ -133,7 +133,7 @@ conv *gaussian_kernel_autodetect_deviation(double shadow_radius) {
if (shadow_radius == 0) {
return gaussian_kernel(0, size);
}
double std = gaussian_kernel_std_for_size(shadow_radius, 1.0 / 256.0);
double std = gaussian_kernel_std_for_size(shadow_radius, 0.5 / 256.0);
return gaussian_kernel(std, size);
}