Subscript indices must either be real positive integers or logicals.
Show older comments
I want to execute regiongrow to segment an image. Each image have more than one region to segment I have taken seed point using getpts for each region. I have execute the proram and face above error. My code is
I=imread('medtest.png');
I=im2double(I);
figure,imshow(I);
% [M N]=size(I)
% x=M+N/2;
% y=N-M/2;
hold on;
[x y]=getpts;
n=length(x)
hold off;
for i=1:n
a{i}=x;
b{i}=y;
J{i} = regiongrowing(I,a{i},b{i},0.2);
figure,
imshow(J{i});
end
How it can be overcome.
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic 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!