How can I define a matlab code for the size of structuring elemtent depends on image size?
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
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
Categories
Find more on Audio and Video Data 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!