Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I guess you followed the tutorial from http://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/ . So now, the vertex-points define your rectangular. However, I guess you don't need to apply any perspective transformation (or do you?), thus, you can use the points to get your region of interest, i.e. determine the top left and bottom right vertices from the four ones and use it to define your region of interest (either via cv::Rect or cv::Range).

Or did I misunderstand you and you just want to draw it? Then you can use the cv::rectangle() function (see http://docs.opencv.org/modules/core/doc/drawing_functions.html?highlight=cv2.rectangle#rectangle)