![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191908/image.png)
how to extract x and y coordinates within yellow boundary in an image
1 回表示 (過去 30 日間)
古いコメントを表示
Hi. Here I have an image with yellow boundary as salient region (attached image). How can I extract the ordered list of x and y coordinates within the yellow region from the image?
Thank you in advance.
0 件のコメント
回答 (1 件)
Akira Agata
2018 年 7 月 13 日
How about the following?
I = imread('untitled.jpg');
Ilab = rgb2lab(I);
BW = Ilab(:,:,3) > 25;
se = strel('disk',20);
BW = imclose(BW,se);
BW = bwareafilt(BW,1);
xyCoordinates = regionprops(BW,'PixelList');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191908/image.png)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!