Ask Your Question
0

how to find world coordinates of a object in a image using single camera

asked 2015-03-20 01:25:07 -0600

Jasdeep gravatar image

hi ,

want to find world coordinate of a ball in a image , already done camera calibration what i'll do next? (using single camera)

thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-20 02:43:17 -0600

David_86 gravatar image

updated 2015-03-20 02:48:34 -0600

With a single shot and no other information the answer is easy: you can't, because info about depth is being lost during the process of image formation.

You can recover 3D world coordinate using stereoscopic vision: take 2 shots moving the camera with a pure translation (in general you can even rotate the camera but this will give no advantages) and calculate depth of a common point in the 2 images using disparity (d), the camera focal lenght (F, which you know from calibration) and the baseline (B, which is the translation of the camera between the 2 positions):

Z = fB/d

Retrieving depth from a single shot is still a subject of research and can be done, but you need to have some additional info in your image like a known size object placed at the same distance of the object you're trying to identify.

edit flag offensive delete link more

Comments

yes, the size of the object is known.

link below shows steps to get world coordinates but don't know what kind of camera is used single or stereo vision.

http://stackoverflow.com/questions/16...

Jasdeep gravatar imageJasdeep ( 2015-03-20 02:58:16 -0600 )edit

That's a different topic (as we've already discussed here a few weeks ago, if i remember well). Measuring distance between 2 objects on the same plane is different than recovering distance between a given object and the camera. The first one can be done with a single shot (taking into account some approximation), while the second one can not for physical reasons: it happens the same with human eye, as you are not able to clearly identify depth when you look with one eye only.

David_86 gravatar imageDavid_86 ( 2015-03-20 03:08:09 -0600 )edit

my current goal is also the same , " to measure distance b/w 2 objects on same plane using single camera." i have managed to calibrate camera , now want to measure distance by getting world coordinates for objects and applying simple Pythagoras distance measuring formula : d=sqrt( (x1-x2)^2 +(y1-y2)^2 ) , as shown in the link. thanks

Jasdeep gravatar imageJasdeep ( 2015-03-20 03:47:54 -0600 )edit
1

A possible solution to this was given in the previous discussion (assuming you want to work with a single image): http://answers.opencv.org/question/55... . You need to know at a given distance how many pixels you have per mm (so you can get distance between 2 points by simply counting pixels). If this info is unknown you are not going to solve your issue in any way. Be aware that both balls have to lie on a plane parallel to the image plane (so at the same distance from the lens) and with a single shot you're not going to recover info about depth anyway.

David_86 gravatar imageDavid_86 ( 2015-03-20 03:56:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-20 01:25:07 -0600

Seen: 3,697 times

Last updated: Mar 20 '15