MATLAB: How to get the mask of the region between 2 lines
image processing
having (x1,y1) and (x2,y2) coordinate value, how to get the mask region between the 2 lines
Best Answer
As you have two lines in hand......you should be knowing coordinates of those lines....useinpolygon to get the coordinates which lie inside the closed region.
A "mask" is binary in Matlab. It is the mask only! If you want to get the pixel values inside the mask, you either multiply the mask with the image matrix (size remians the same) or use the mask for indexing (result is the masked rectangle only).
Please post your code and explain, what you want to achieve.
Best Answer