bertjiazheng / Structured3D

[ECCV'20] Structured3D: A Large Photo-realistic Dataset for Structured 3D Modeling
https://structured3d-dataset.org
MIT License
541 stars 62 forks source link

Global coordinates #32

Closed kimkj38 closed 1 year ago

kimkj38 commented 1 year ago

Hi,

I'm trying to generate 2D bounding box in panorama image and made the below code.

But the result x-axis pixel looks weird(white pixels are instance and the red point is projected centroid) and I found that the global coordinate system is arbitrary on Data Organization.md.

I thought y-axis is (0,1,0) and the camera pose is negative y-axis in panorama.

But global y-axis is all different for each scene? If so, how can I know that?

image image

bertjiazheng commented 1 year ago

Sorry for the confusion. The global system is not arbitrary. The camera (i.e., the center position of the panorama image) is looking at the negative y-axis.

kimkj38 commented 1 year ago

x,y,z axis is (1,0,0), (0,1,0), (0,0,1) and negative y-axis is (0, -1, 0)? Or global axis is different?

kimkj38 commented 1 year ago

I think the global coordinate system is different for each scene because 2D centroid is aligned well when I change z-axis rotation properly. Is it right?

bertjiazheng commented 1 year ago

The direction of the axis without a coordinate system is nonsense.

To transform the world coordinate into the camera coordinate, you should use the following rotation matrix:

R = [[1, 0, 0], [0, 0, -1], [0, -1, 0]]
kimkj38 commented 1 year ago

When I saw the point cloud of the 3D scene, the z-axis was downward unlike you mentioned at the data organization. So, R = [[1, 0, 0], [0, 0, 1], [0, -1, 0]] worked well for 2D projection. Could you check it again?

bertjiazheng commented 1 year ago

How do you obtain the point cloud?

kimkj38 commented 1 year ago

I made it with panorama rgb and depth

kimkj38 commented 1 year ago

This is the result! Axes are BGR order.

image