Ask Your Question

Robot.camera.ideas's profile - activity

2018-04-19 04:54:46 -0600 received badge  Famous Question (source)
2015-10-20 10:06:30 -0600 received badge  Student (source)
2015-07-08 16:39:32 -0600 received badge  Notable Question (source)
2014-06-22 23:05:59 -0600 received badge  Popular Question (source)
2013-01-07 03:29:30 -0600 asked a question How to calculate distance between camera and image?

C++ Code or Open CV code to calculate the distance between camera and image

My Goal is to write a function in C++ or Open CV that can determine the distance between a camera and an image.

  1. Using a simple axis camera . . .
  2. Get a piece of cardboard, put some reflective tape on the cardboard, as an image target. Use 4" wide retroreflective tape material (3M 8830 Silver Marking Film)
  3. Place the cardboard with reflective tape at a known distance.
  4. Take an image: have the camera face the cardboard, and take a photo image.

Based on that image, determine the distance. How far is the camera from the image?

Write a function that will calculate the distance.

More specifically, write a function that the program would pass the camera image to, And you go into that image, tell me how far away the cardboard target item is from the camera.

I am new to writing code, can anyone help me with code for this distance calculation?