Image Processing RegionProp help

I have convert vedio into array of matrix frames , converting them into a binary image and using regionprop I have found coordinates of white region. What I wanted to find out is a coordinates of end point of a white region (e.g. it would returns end point of this bw image is x=something and at that x y=something)
regionprop command
%%
regionstats = regionprops(myBarray{1,1}, 'all');
[~, largestidx] = max([regionstats.Area]); %find index of largest region
x=regionstats(largestidx).BoundingBox; %coordinate of bounding box of largest region
y=regionstats(largestidx).PixelList; %coordinate of all pixels in the region as a matrix
As y return values of all the xy coordinates of white region.
I'm attacting a picture of desired output

댓글 수: 1

KSSV
KSSV 2019년 5월 8일
From the (x,y) pick up the maximum of x, and it's respective y....wont it give you waht you want?

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2019년 5월 8일

댓글:

2019년 5월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by