Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I measure for the width and height of the object (OpenCV)?

If I want to use this on my program, how do I implement it? I've no idea. Thank you for your attention.

w = sqrt( (p1.x-p0.x)*(p1.x-p0.x) + (p1.y-p0.y)*(p1.y-p0.y) );
h = sqrt( (p2.x-p1.x)*(p2.x-p1.x) + (p2.y-p1.y)*(p2.y-p1.y) );