I need to find length of the ROI in matlab? How to do this?
Best Answer
Assuming it is a Rectangular one, then it depends on what you call length in a rectangle, the ROI is defined by 4 values [xmin, ymin, width, height] so in the 3 column and 4 column you have the two lengths that maybe are that interest you
The mask just tells you which pixels are in the region. To count the black pixels within the mask, you need to look at both in the region and the value in the original image. Something like this:
Best Answer