given four points to calculate the size of the area

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

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

Comments

I think you need Shoelace formula

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

ooops! I forgot contourArea()

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