OpenCV: How-to calculate distance between camera and object using image?

后端 未结 3 1250
挽巷
挽巷 2020-11-28 23:21

I am a newbie in OpenCV. I am working with the following formula to calculate distance:

distance to object (mm) = focal length (mm) * real height of the obje         


        
3条回答
  •  借酒劲吻你
    2020-11-29 00:08

    1. To get a mapping between the real world and camera without any prior information of the camera you need to calibrate the camera...here you can find some theory
    2. For calculating the depth i.e. distance between camera and object you need at least two images of the same object taken by two different cameras...which is popularly called the stereo vision technique..

提交回复
热议问题