You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a complete model, and I render it using Blender's Python script to obtain the image and corresponding camera pose.
Then take the model (. ply) with the texture removed, the photo, and the corresponding camera pose as inputs. The prefix names of photos and camera pose files (. cam) correspond one-to-one.
Firstly, import the scene through BPY
Then obtain and set the camera:
camera = bpy.data.objects["Camera"]
camera.location = x, y, z
direction = - camera.location
rot_quat = direction.to_track_quat('-Z', 'Y')
camera.rotation_euler = rot_quat.to_euler()
Obtain camera pose:
RT = camera.matrix_world
R = RT[:3, :3]
T = RT[:3,3]
The. cam file consists of the following:
firstline: tx,ty,tz,r11,r12,r13,r21,r22,r23,r31,r32,r33
seconde line:
f = fx / width
d0 = 0.
d1 = 0.
paspect = fy / fx
ppx = cx / width
ppy = cy / height
As mentioned above, the final result was very poor. I think it's a problem with the camera pose, that is, do we need other conversions?
The text was updated successfully, but these errors were encountered:
I have a complete model, and I render it using Blender's Python script to obtain the image and corresponding camera pose.
Then take the model (. ply) with the texture removed, the photo, and the corresponding camera pose as inputs. The prefix names of photos and camera pose files (. cam) correspond one-to-one.
Firstly, import the scene through BPY
Then obtain and set the camera:
Obtain camera pose:
RT = camera.matrix_world
The. cam file consists of the following:
firstline: tx,ty,tz,r11,r12,r13,r21,r22,r23,r31,r32,r33
seconde line:
As mentioned above, the final result was very poor. I think it's a problem with the camera pose, that is, do we need other conversions?
The text was updated successfully, but these errors were encountered: