andyyankai / psdr-room

PSDR-Room: Single Photo to Scene using Differentiable Rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions about world coordinates

bring728 opened this issue · comments

First, thank you for sharing your wonderful research.

In this(#12) issue, you said that floor normal is always 0, 0, 1, but I don't understand this.

As I understand it, in the world coordinate system of the perspective field, the floor normal (normal of the ground surface) is the -y axis, so it is 0, -1, 0. Also, the camera to world coordinate conversion here is

Ry(-yaw) @ Rx(-pitch) @ Rz(-roll).

Since you said the world coordinates of the floor normal are 0,0,1, you probably performed some coordinate transformation to convert 0, -1, 0 to 0, 0, 1.

And I think this is contained in the code below.

rotate3D(-scene_json["cameraPitch"], 0, scene_json["cameraRoll"], device='cpu').numpy()

The interpretation of the above code is as follows:

Rx(-pitch) @ Rz(roll).

I can't infer from this how you defined the world coordinate system. Could you please explain this part?

In other words, how did you define the transformation matrix from the perspective field's camera coordinate system to your world coordinate system? How did you define floor normal as 0, 0, 1?

thank you

I define the floor normal as 0,0,1 (in real world the floor normal should always be 0,0,1, and yes there might be some conversion from 0,-1,0 to 0, 0, 1)

if you check obj_stage.py #line168-174
The result from perspective field is use to set the camera matrix.

Thank you for answer! i will try it.