Skip to content

How to find parameters when using my own camera images for inference,kitti360 #110

@xym0601

Description

@xym0601

Thanks for your great job!
I successfully ran monoscene with my own images, but the results were not satisfactory. Is it because the following parameters need to be modified?If it needs to be modified, any suggestions?

self.root = root
self.img_H = 376
self.img_W = 1408
self.project_scale = 2
self.output_scale = 1
self.voxel_size = 0.2
self.vox_origin = np.array([0, -25.6, -2])
self.scene_size = (51.2, 51.2, 6.4)
self.T_velo_2_cam = self.get_velo2cam()
self.cam_k = self.get_cam_k()

How do I get these two matrices?
First of all, for the camera intrinsic parameter cam.k, I see that you are using the corrected intrinsic parameter instead of the original intrinsic parameter.
Is the cam2velo matrix still needed if it is only for inference?

    def get_cam_k(self):
        cam_k = np.array(
            [
                552.554261,
                0.000000,
                682.049453,
                0.000000,
                0.000000,
                552.554261,
                238.769549,
                0.000000,
                0.000000,
                0.000000,
                1.000000,
                0.000000,
            ]
        ).reshape(3, 4)
        return cam_k[:3, :3]

    def get_velo2cam(self):
        cam2velo = np.array(
            [
                0.04307104361,
                -0.08829286498,
                0.995162929,
                0.8043914418,
                -0.999004371,
                0.007784614041,
                0.04392796942,
                0.2993489574,
                -0.01162548558,
                -0.9960641394,
                -0.08786966659,
                -0.1770225824,
            ]
        ).reshape(3, 4)
        cam2velo = np.concatenate(
            [cam2velo, np.array([0, 0, 0, 1]).reshape(1, 4)], axis=0
        )
        return np.linalg.inv(cam2velo)

Image

Image

Hope to receive your reply, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions