Ask Your Question
0

Transform 2D Point into 3D Line

asked 2019-01-17 11:24:49 -0600

LuisK gravatar image

Im looking for a function that transforms a 2D image-point into a 3D line in my model (specific coord system, belonging to translation and rotation vectors received by function solvePnP() ).

I have: cameraMatrix, rotation and translation vectors, distortionCoefficients.

It would be the inverse function of projectPoints(), which takes a 3D point and transforms it into a 2d image point.

Is there any solution for this issue?

edit retag flag offensive close merge delete

Comments

1

I suggest that you try the Programming -- Math and Physics forum on gamedev.net.

sjhalayka gravatar imagesjhalayka ( 2019-01-17 18:52:17 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-01-19 14:35:41 -0600

Tetragramm gravatar image

Take a look HERE. the variable los after line 167 contains what you're looking for.

Note that it is a unit vector proceeding from camera_translation as the origin, so you'll need to take care of that into whatever format you're using.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-01-17 11:24:49 -0600

Seen: 465 times

Last updated: Jan 19 '19