Ask Your Question
0

3D Reconstruction upto real scale

asked 2013-08-10 00:43:59 -0600

HiteshVaghani gravatar image

I am working on a project to detect the 3D location of the object. I have two cameras set up at two corners of the room and I have obtained the Fundamental matrix between them. These cameras are internally calibrated. My images are 2592 X 1944

K = [1228 0 3267 0 1221 538 0 0 1 ]

F = [-1.098e-7 3.50715e-7 -0.000313 2.312e-7 2.72256e-7 4.629e-5 0.000234 -0.00129250 1 ]

Now, How do I proceed so that given a 3D point in space, I should be able to get points on the image which correspond to the same object in the room. If I can obtain the right projection matrices (with correct scale) I can use them later as inputs to OpenCV's traingulatePoints function to obtain the location of the object.

I have been stuck at this since a long time. So, please help me.

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-08-10 08:53:36 -0600

Firedragonweb gravatar image

From what I gather, you have obtained the Fundamental matrix through some means of calibration? Either way, with the fundamental matrix (or the calibration rig itself) you can obtain the pose difference via decomposition of the Essential matrix. Once you have that, you can use matched feature points (using a feature extractor and descriptor like SURF, BRISK, ...) to identify which points in one image belong to the same object point as another feature point in the other image.
With that information, you should be able to triangulate away.

edit flag offensive delete link more

Comments

So, from the Fundamental Matrix, I calculated the essential matrix using E=K2'FK1. Then, my SVD needs a diagonal matrix such as (s,s,1) but my diagonal matrix is diag(1.3, 1.05, 0). I assume it is good enough and then find translation using T = last column of U and R could be UDV' or UD'V'. If i find out which of these combinations is the right one, I will have P1 = [I|0] and P2 = [R|T]. So, I read the scale is an ambiguity which can never be determined. I need to know the scale since I am trying to estimate the exact 3d co ordinates of the objects. Am i in the right direction?

HiteshVaghani gravatar imageHiteshVaghani ( 2013-08-12 23:35:52 -0600 )edit

Pretty much. A few pointers, though: the singular values should be (s,s,0), so (1.3, 1.05, 0) is a pretty good guess. About the R: Technically, this is right, however, ignoring signs. It might very well be that you get a rotation matrix which does not satisfy the constraint deteminant(R) = 1 but is instead -1. You might want to multiply it with -1 in that case. Generally, if you run into problems with this approach, try to determine the Essential Matrix using the 5 point algorithm (implemented into the very newest version of OpenCV, you will have to build it yourself). The scale is indeed impossible to obtain with these informations. However, it's all to scale. If you define for example the distance between the cameras being 1 unit, then everything will be measured in that unit.

Firedragonweb gravatar imageFiredragonweb ( 2013-08-13 17:06:04 -0600 )edit

Question Tools

Stats

Asked: 2013-08-10 00:43:59 -0600

Seen: 372 times

Last updated: Aug 10 '13