How can I define a matlab code for the size of structuring elemtent depends on image size?
4 views (last 30 days)
Show older comments
% here a sample matlab code
SE = strel('disk', R);% I would like to set R depend on image size %Please give me a sample matlab code
0 Comments
Answers (1)
Walter Roberson
on 3 Jan 2014
sz = min(size(I,1), size(I,2)); %where I is the image
filt_imgs = cell(sz,1);
for R = 1 : sz
SE = strel('disk', R);
filt_imgs{R} = imopen(I, SE);
end
2 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!