given four points to calculate the size of the area

asked 2015-11-11 21:49:05 -0500

I use Calib3d.findHomography with RANSAC to get four points of the detected area and I can draw the bounding box. Here is the question: given these four points, how can I calculate the size of the area? Any functions and code to use? Thanks a lot!

edit retag flag offensive close merge delete


I think you need Shoelace formula

pklab gravatar imagepklab ( 2015-11-12 02:36:35 -0500 )edit
LorenaGdL gravatar imageLorenaGdL ( 2015-11-12 03:15:51 -0500 )edit

ooops! I forgot contourArea()

pklab gravatar imagepklab ( 2015-11-12 03:25:29 -0500 )edit