Ask Your Question
0

How to calculate the distance between the camera from the computer and any object with OpenCV?

asked 2016-05-17 17:29:09 -0600

frank101 gravatar image

I want to use the camera from my notebook to try to find the distance that I'm an object, but can not find anything and also I'm just starting in the programming area so I apologize for the ignorance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-05-17 18:23:05 -0600

Tetragramm gravatar image

This is one of the hard problems of computer vision. There are three ways to do it.

One: Know the actual dimensions of your object, and of the camera. Placing calibration markers on the object is a variant of this. Use your trigonometry to find the size, or the aruco module to use calibration markers.

Two: Use a method of finding camera position (calibration pattern, laser sensor, ect) and the motion of the camera to triangulate the object's position and find the distance. Use the Camera Calibration module to do this.

Three: Use lots of camera motion and a structure from motion algorithm to reconstruct both the camera path and a 3d model of the environment. Use the SfM module to do this.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-05-17 17:29:09 -0600

Seen: 2,457 times

Last updated: May 17 '16