cvg / limap

A toolbox for mapping and localization with line features.
BSD 3-Clause "New" or "Revised" License
661 stars 67 forks source link

About projecting 3D line segments into 2D images. #32

Closed ccy-ustb closed 3 months ago

ccy-ustb commented 1 year ago

hello,I would like to ask a question: Is it based on the principle of perspective projection to project the two endpoints of a 3D line segment into a 2D image, and then connect them? eg:(R X_start_In3DWorld+T)intrinsic_matrix=X_start_InImage,(R X_end_In3DWorld+T)intrinsic_matrix=X_endInImage And R,T is the corresponding camera Rotation matrix and translation vector, intrinsic Matrix is the corresponding camera internal parameter matrix. I think your code seems to do this.

B1ueber2y commented 1 year ago

We follow the basic principle of perspective projection. that is, K(Rx + T) corresponds to the homogenous coordinate of the 2D projection, where K is the intrinsic matrix, and [R, T] are the extrinsics.

Thanks!