# 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) );
```

You have to be more specific, you know all of the parameters and you just want to know how to implement it? you want to know how to find thous parameters? both questions?

And what is your code doing? Calculating width and height from retrieved bounding box crosspoints?

Yes Steven. I want to calculate the object width and height from the bounding box.