What need to be input for S in ordfilt2?
10 views (last 30 days)
Show older comments
The coding are as follows:
>> I=imread('sample01.tif');
>> B = ordfilt2(I,1,ones(3,3),[3 3]);
??? Index exceeds matrix dimensions.
Error in ==> ordfilt2>ParseInputs at 132
s = s(find(domain));
Error in ==> ordfilt2 at 51
[A,order,domain,s,padopt,msg] = ParseInputs(varargin{:});
Do i need to input matrix dimension for S? (For references)
How do i know in terms of which parameter and value for ordfilt2 and other image enhancement method works besides the help section?
0 Comments
Answers (1)
Jan
on 10 Apr 2013
S must have the same size as the domain, see doc ordfilt2. So when your domain is ones(3,3), S must be a [3 x 3] matrix also.
0 Comments
See Also
Categories
Find more on Image Filtering and Enhancement in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!