a question regarding OpenCV and getting some content information out of rectangles/ROIs, drawn with the mouse.
My goal is, that I want to draw two rectangles (beginRect+endRect), gather some information (see bellow), then start an image processing chain, which needs content out of both Rects.
First question: How do I find a pixel, e.g. a white one who is in the rightest column, inside this two rectangles? The results I suppose to gain of this process are be two separate pixel values, which are needed in question #2.
Second question:
How do I find the mentioned two pixels inside a hierarchical list, which I gained of findContours ? I want to select a specific label with the pixel, in order to trash all other labels, except those two.
I already got along with an event handler for mouse events, so I am able to catch those events if something happens on the window.
I'm not so familiar in OpenCV and deeper C++, so I'll hope that you maybe can help me. Thank you a lot!
If some information is missing or sth. is not clear, please let me know.