How to determine the size of a disc in an averaging filter.
Show older comments
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..
Accepted Answer
More Answers (0)
Categories
Find more on Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!