jmccormac / pySceneNetRGBD

Scripts showing how to work with the SceneNetRGBD dataset
GNU General Public License v3.0
178 stars 46 forks source link

How do we set the camera internal parameters with this dataset? #3

Closed Zzlongjuanfeng closed 7 years ago

jmccormac commented 7 years ago

The camera is a simple pinhole camera. The intrinsic camera matrix is:

[[ 277.12812921    0.          160.            0.        ]
 [   0.          289.70562748  120.            0.        ]
 [   0.            0.            1.            0.        ]]

I have now added a small script called camera_pose_and_intrinsics_example.py to show an example of how to use the intrinsic camera matrix. It takes a trajectory from the val set ('0/68') with a known center for a spherical light positioned in world coordinates ([-2.02838,1.57111,-0.388005,1.0]).

It uses the camera view data to transform the 3D point into camera coordinates, and then projects the transformed point into pixels using the intrinsic matrix. It writes out modified frames of the trajectory in the same directory with a black cross over the center of the light (whenever the light is in frame).

I hope this clarifies the camera projection function.

raymond30031 commented 6 years ago

Is the intrinsic camera matrix the same for all trajectory in the training and validation dataset?