allenai / objaverse-rendering

📷 Scripts for rendering Objaverse
https://objaverse.allenai.org
Apache License 2.0
217 stars 10 forks source link

How to get the intrinsics and extrinsics parameters of the camera #12

Closed yjcaimeow closed 1 year ago

yjcaimeow commented 1 year ago

Hi @dirkgr @schmmd @iellenberger @MLatzke @pdasigi

I successfully obtain the rendered image as follow the steps. But I didn't find the camera intrinsic and extrinsics of the 12 images. Could you please share the code for how to get the accurate parameters?

Best, Ying

yjcaimeow commented 1 year ago

any update?

schmmd commented 1 year ago

@yjcaimeow none of the people you are direct mentioning are on this project. Please do not spam people in hopes of getting a more prompt response.

The repository owner will follow up with you at their convenience.

zhaomingheyuhan commented 10 months ago

Could you please tell me have you solved this problem?

Piggy-ch commented 5 months ago

In the "save_images" method, add the following code:

# save the c2w matrix
c2w_matrix = np.array(cam.matrix_world)
m_output_dir = os.path.join(args.output_dir, object_uid,'pose')
os.makedirs(m_output_dir, exist_ok=True)
with open(os.path.join(args.output_dir, object_uid,'pose', f"{i:03d}.txt"), 'w') as f:
    np.savetxt(f, c2w_matrix, fmt='%f')