How to Segment the ROI ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Piyum Rangana
el 14 de Abr. de 2017
Respondida: Image Analyst
el 14 de Abr. de 2017
whiteMask = redChannel > 206 & greenChannel > 153 & blueChannel > 114;
consider the above code, there I am going to create a mask by considering three channels(RGB). As a result of the code I can get the ROI which has all ONEs and other regions all are zeros. If I have more than one ROIs how can I separately identify(from looping) them. Please refer the below image. The ROIs which I need to separately loop, is as below image. Basically I want to find the pixel co-ordinations of each of ROI seperatly in a loop(eg. for loop)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162931/image.png)
0 comentarios
Respuesta aceptada
Image Analyst
el 14 de Abr. de 2017
You can label the image and call ismember() in a loop. For example
[labeledImage, numberOfRegions] = bwlabel(binaryImage);
for k = 1 : numberOfRegions
thisRegion = ismember(labeledImage, k); % Extract k'th region alone.
imshow(thisRegion);
pause(1); % Pause long enough to see it.
end
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!