How to determine the size of a disc in an averaging filter.
2 次查看(过去 30 天)
显示 更早的评论
Hello Everyone,
I was applying an averaging (disc) filter on my input image (say A), in order to get my final output image (say B). In my work, I was using disc size as 50 in the filter.
The code for this is:
global Im; % Where: Im = I/P Image
I = uint8(Im); % I = Unsigned Int(8) of Im
size = 50; % Disc Size
J1 = fspecial('disk', size); % Filter Parameter
K1 = imfilter(I,J1,'replicate'); % Actual Filter
Everything is fine and my output result is good as well. But I have a question. That is:
- Using Trial and Error Method, I have chosen the disc size as 50. That is, I tried a variety of disc sizes, but 50 was giving me a good result. So I am going with 50 as my disc size. My question is, how can I justify that 50 is the right size?. I mean, how a user can figure out an appropriate disc size in practice, i.e., without knowing in advance about an object being imaged?.
- I mean, instead of trial and error method, how can I determine the appropriate disc size?.
- Is there any general way to determine this?.
I would request you to please and kindly assist me in this regard.
Thanks in advance..
0 个评论
采纳的回答
Raunak Gupta
2020-1-21
Hi,
Since the filter that is mentioned is an averaging filter the size of the filter i.e. the disc size is a hyperparameter that need to be set while working with any kind of filters. Estimating the size will require to have a comparison with something that is ground truth (or can be described as perfect). Since the ground truth cannot be generalized for every image by estimating the parameters of one image, the disc size cannot be estimated with good accuracy for all the images.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!