Ask Your Question
1

How to calculate distance between camera and image?

asked 2013-01-07 03:29:30 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-01-07 05:51:37 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

You can refer this link for same kind of question might be useful.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-07 03:29:30 -0600

Seen: 7,665 times

Last updated: Jan 07 '13