A couple of days ago, Cameron, a PyImageSearch reader emailed in and asked about methods to find the distance from a camera to an object/marker in an image. He had spent some time researching, but hadn’t found an implementation. I knew exactly how Cameron felt. Years ago I was working on a small project to analyze the movement of a baseball as it left the pitcher’s hand and headed for home plate.
![Find distance from camera to object using Python and OpenCV](https://cdn-ak-scissors.b.st-hatena.com/image/square/82af017c1757fd8d227e618855cebbe66a7a7f1a/height=288;version=1;width=512/https%3A%2F%2Fpyimagesearch.com%2Fwp-content%2Fuploads%2F2015%2F01%2Fdistance_to_camera_featured.jpg)