I am applying a Gaussian filter to a video using ffmpeg's gblur-filter. The filter accepts the sigma option, but does not allow to choose the kernel size. To correctly report on my Gaussian blur usage, I would like to know which kernel sized is used in ffmpeg. (FYI, I used sigma = 0.5 and sigma = 0.8.)
Now, this StackExchange question theoretically discusses the relationship between sigma, radius and kernel size. If I interpret the answers correctly, then radius = 2 * sigma. And the radius is the amount of pixels in each direction that the Gaussian filter uses. Thus, kernel_size = ceil(radius*2 + 1). For example, if sigma = 0.5, then it's a 3x3 kernel, while if sigma = 0.8, then it's a 5x5 kernel.
On the other hand, Wikipedia says: "Typically, an image processing program need only calculate a matrix with dimensions ceil(6*sigma) x ceil(6*sigma) to ensure a result sufficiently close to that obtained by the entire Gaussian distribution." Thus, again, if sigma = 0.5, then it's a 3x3 kernel, while if sigma = 0.8, then it's a 5x5 kernel.
However, I found a scientific paper titled "A Low Complexity Video Watermarking in H.264 Compressed Domain" that contradicts the previous statements. The authors claim to have used a Gaussian Filter 5x5 with sigma = 0.3 and sigma = 0.4 (in Table III and Table IV). But for those sigma's, I would expect a kernel size of 3x3?
In short, I am confused on how to deduct the kernel size used in ffmpeg, while I can only change sigma. I also do not get any wiser by reading the ffmpeg gblur source code. Is there someone who can give me clarity around this subject? Thanks in advance!