Unable to select seed points manually in region growing algorithm
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Warid Islam
el 24 de Mzo. de 2021
Comentada: Warid Islam
el 24 de Mzo. de 2021
Hi,
I am trying to implement a multilayer region growing algorithm for breast tumor segmentation. I am trying to select the initial seed point manually. I left clicked on the center point on the image once and pressed enter, but it is showing me an error message. Any suggestions would be appreciated.
I= rgb2gray((imread('TM25.jpg')));
figure,imshow(I)
[x,y]=getpts;
% x=300; y=340;
a=imgaussfilt(I,2);
b=adapthisteq(a);
m=regiongrowing_MLT(b,x,y,12);
m=imfill(m,'holes');
figure,imshow(m)
The following error message is displayed.
Index in position 2 is invalid. Array indices must be positive integers or logical values.
Error in regiongrowing_MLT (line 6)
A1 = double(img(x,y));
Error in segm (line 8)
m=regiongrowing_MLT(b,x,y,12);
0 comentarios
Respuesta aceptada
Rik
el 24 de Mzo. de 2021
Editada: Rik
el 24 de Mzo. de 2021
getpts will return decimal values, so you will have to use round.
I= rgb2gray((imread('TM25.jpg')));
figure,imshow(I)
[x,y]=getpts;x=round(x);y=round(y);
% x=300; y=340;
a=imgaussfilt(I,2);
b=adapthisteq(a);
m=regiongrowing_MLT(b,x,y,12);
m=imfill(m,'holes');
figure,imshow(m)
Also, you might be interested in RegGrow, which doesn't require any toolbox and produces the same result on a wide range of runtimes (it works GNU Octave, and every release of Matlab of the past 2 decades).
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!