I am using OpenCV4Android version 2.4.11. I am reading frames from the camera and I detect any rectangular shapes in the frame. Then I try to draw a semi-transparent rectangle around a detected object.
what i want to do is, to draw a semi-transparent rectangale given the four corners of the detected object. But, in openCV you can draw a rectangle by spcifying only two points of it "the topLeft and BottomRight".
please let me know how to draw a rectangle by spcifying the the four corners of it NOT ONLY by spcifying the topLeft and BottomRight corners.
the below posted image is to show you my attempts and to show you that what i want is to draw a rectangle around the four detected corners "red, green, blue, white"
image:
Best Answer
Same idea as @Saransh, but compiles for me: