필터 지우기
필터 지우기

Fspecial Disk Filter Shape

조회 수: 1 (최근 30일)
B
B 2013년 3월 26일
What is the actual shape of the pre-defined disk filter in MATLAB? Obviously it can't be exactly circular but what shape would it have with say a radius of 5. For example, the center row I'm guessing would have 9 pixels including the pixel of interest but I'm not sure... What about the other rows? Thanks.

채택된 답변

Image Analyst
Image Analyst 2013년 3월 26일
Just type it out and see:
>>theFilter = fspecial('disk', 5)
  댓글 수: 2
B
B 2013년 3월 26일
Thanks alot. How is the weighting determined? I was under the impression that each pixel was evenly weighted.
Image Analyst
Image Analyst 2013년 3월 26일
Good question. I would tend to agree with you. The values in the center are the same but the values at the edge of the disk are somewhat different. I would guess it has something to do with the shape of the jaggies at the outer boundary. You can make them all the same if you want, then pass it into conv2() to do a averaging filter with uniform weights.
out = out > 0.5*max(out(:)); % Threshold.
out = out / sum(out(:)); % Normalize.
filteredImage = conv2(double(inputImage), out, 'same');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by