Matlab: How to find the right-most point of a white line within the imrect?
Posted
by
mchlfchr
on Stack Overflow
See other posts from Stack Overflow
or by mchlfchr
Published on 2012-10-18T10:58:33Z
Indexed on
2012/10/18
11:00 UTC
Read the original article
Hit count: 233
matlab
|matlab-toolbox
i've got a question regarding the imrect() function, which is part of the image processing toolbox in MatLab. I'd like to find a starting point within an image. I use the imrect function for setting a region to limit and specify the lookup area, but I can't get the point where the ROI mask is getting back mapped to the original size of the image.
As you can see on the image there is a specified rectangle (cyan-colored), which I want to inspect for the white line, especially the nearest point to the right edge of the rectangle. I experimentated with only looking up on the last column of the rectangle, but as I mentioned before, the re-mapping onto the global image coordinates failed. So in this example, the white point I'd like to get would be around (98,302)
The original (x,y) coordinates are relevant, so a cropping of the image to the rectangle is not acceptable. So, do you have any ideas? Thanks for any helping comments.
Kind regards,
© Stack Overflow or respective owner