MATLAB Answers

how to apply confilt

조회 수: 2(최근 30일)
hend
hend 18 May 2014
답변: Image Analyst 18 May 2014
I have image of 768 by 1024 pixels, I want to perform an order statistical filter (min and max) on it by employing confilt order with a 5 by 5 window OP = colfilt(IP, [5 5], 'sliding', @min); but I got this error message "??? Error using ==> reshape To RESHAPE the number of elements must not change.
Error in ==> colfilt at 183 b(i*mb+brows,j*nb+bcols) = ..."

  댓글 수: 0

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

채택된 답변

Image Analyst
Image Analyst 18 May 2014
Don't use colfilt.
To get the local min
minImage = imerode(grayImage, ones(5));
To get the local max
maxImage = imdilate(grayImage, ones(5));
To get the local max-min
rangeImage = rangefilt(grayImage, ones(5));

  댓글 수: 0

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

추가 답변(1개)

Star Strider
Star Strider 18 May 2014
The function to perform Order Statistical Filtering in the Image Processing Toolbox is ordfilt2 (R2014a). Would that be what you want?
If you already tried ordfilt2 and it didn’t do what you wanted, what was the problem?

  댓글 수: 0

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

범주

Community Treasure Hunt

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

Start Hunting!

Translated by