Ask Your Question

Revision history [back]

Distance to Center

Hello everyone,

I am trying to learn opencv python, digging into some online courses I found. But for my business needs I came along with a problem which I need to find the objects distance to vertical center point. I want to draw a vertical center line to the real time camera stream and as the object passing in front of the camera, I want to know how far is my ROI of the object to this center line. I would like to convert this pixel measurement to millimeters. I would be happy if someone provides useful code for this problem. Thanks in advance. Best Regards