Camera poses for rendered images
ryougi1201 opened this issue · 3 comments
ryougi1201 commented
Hi authors,
Thanks for this amazing works. May you provide the exactly camera poses for 12 rendered images or the rendering code?
Thank you so much!
Colin97 commented
Hi @ryougi1201 ,
Sorry for the late reply.
You can find the camera poses here:
def sample_camera_loc(phi=None, theta=None, r=3.5):
x = r * np.sin(phi) * np.cos(theta)
y = r * np.sin(phi) * np.sin(theta)
z = r * np.cos(phi)
return np.array([x, y, z])
views = [[np.pi / 3, np.pi / 6],
[np.pi / 3, np.pi / 6 * 4],
[np.pi / 3, np.pi / 6 * 7],
[np.pi / 3, np.pi / 6 * 10],
[np.pi / 2, np.pi / 6 * 2],
[np.pi / 2, np.pi / 6 * 5],
[np.pi / 2, np.pi / 6 * 8],
[np.pi / 2, np.pi / 6 * 11],
[np.pi / 3 * 2, 0],
[np.pi / 3 * 2, np.pi / 2],
[np.pi / 3 * 2, np.pi],
[np.pi / 3 * 2, np.pi / 2 * 3]]
for i in range(12):
location = sample_camera_loc(views[i][0], views[i][1])
rotation_matrix = bproc.camera.rotation_from_forward_vec([0,0,0] - location)
cam2world_matrix = bproc.math.build_transformation_mat(location, rotation_matrix)
bproc.camera.add_camera_pose(cam2world_matrix)
ganchaofan0000 commented
Could you provide the code of rendering 12 images from pt