Ask Your Question

mmo's profile - activity

2020-11-16 15:29:23 -0500 received badge  Nice Question (source)
2019-02-20 07:38:56 -0500 received badge  Famous Question (source)
2018-04-11 02:37:10 -0500 received badge  Nice Answer (source)
2017-09-03 08:52:11 -0500 received badge  Notable Question (source)
2016-12-20 10:10:56 -0500 received badge  Popular Question (source)
2016-11-24 03:34:26 -0500 received badge  Teacher (source)
2016-11-23 11:54:48 -0500 received badge  Student (source)
2016-11-23 08:45:33 -0500 received badge  Self-Learner (source)
2015-08-18 10:36:45 -0500 received badge  Supporter (source)
2015-08-18 10:36:21 -0500 answered a question Can i get 2d world coordinates from a single image ([u,v] coords)?

Thanks for the answer! Very helpuful. Sorry I took a long time to post how I solved my problem. I ended up using some of your equations and an additional one.

  • From the camera intrinsic parameters I obtained: fx, fy, cx, and cy.
  • From previous measurements I have the [object points] and their correspondent [image points] (used in solvePnP). I obtained the [image points] with 'mouse callback' function.
  • 'Rodrigues' function gets me the Rotation Matrix with the 'rvec' from 'solvePnP'.
  • 'HoughCircles' gives me the [u,v] of the hole center I'm identifying.
  • Converted the 2D image coordinate of the hole in the normalized camera frame. [x', y', 1] (above equation)
  • I made the scale factor 's' the distance from the surface to the camera sensor.
  • Multiply 's' by the normalize camera sensor. (equation above).
  • Finally, I use this equation to transfom the 3D coordinate in camera frame to my world frame.

'R^T' is the transposed rotation matrix and 't' is tvec.

image description

Results where pretty accurate. I've changed some things since then and I don't remember the correct tolerance but it was better than I expected. I think a different lens might help to, mine has a fish eye distortion and even the 'undistort' function doesn't fix it completely. The edges are no good.

Thanks again.

2015-08-07 09:56:55 -0500 received badge  Enthusiast
2015-08-07 09:56:55 -0500 received badge  Enthusiast
2015-07-24 13:23:08 -0500 asked a question Can i get 2d world coordinates from a single image ([u,v] coords)?

I'm new to everything vision!

I've read some similar posts but I can't get my head around it. Here's what I'm trying to do:

-I have a single camera looking down on a surface (we can assume it's normal to the surface) and I want to detect a hole and obtain it's [X,Y] from a world coordinate I have determined. -I do not care about the -Z info, I know the real hole diameter.

I have calibrated my camera and have the intrinsic matrix. For the extrinsic info I have taken 4 points from my image(mouse callback) and their correspondent 4-real points from the world coordinate to use 'solvePnP' and 'Rodrigues'(for the rotation matrix).

I can detect the hole using HoughCircles and I have the center in [u,v] coords.

Now, is there a way to obtain that [u,v] point in [X,Y] in my defined coordinate system???