mitsuba3 icon indicating copy to clipboard operation
mitsuba3 copied to clipboard

About perspective projection matrix of the sensor

Open ShuaiGer1234 opened this issue 1 year ago • 1 comments

Summary

Hi , I am working on calibration task , in my work the calibration result I have intrinsics K which is a 3 by 3 matrix means that I want to use it edit the projection matrix directly not convert K into fov because my calibration result was not match physics world fx is not equal to fy and I want to directly edit projection matrix of the scene to let the render more closely to my calibration result But I can not find the interface of edit the projection matrix.

Description

would you like to give me any advice to help me convert the intrinsics matrix of camera directly into the scene rather than use fov or focus length to instead intrinsics matrix ?

ShuaiGer1234 avatar Oct 12 '23 17:10 ShuaiGer1234

Hi @ljijjiang1234

I have two suggestions:

  • The first option is to implement your own custom sensor that would be very similar to our perspective plugin with the only difference being the interface to initialize/update it by using K. You can do this entirely in Python
  • The second option is to modify the existing perspective plugin to provide an interface the directly modify the projection matrix. This would require looking at the C++ source code and building the project yourself. (Specifically, you'll need to modify m_campera_to_sample that is currently built using the perspective_projection function. Your changes should simply replace this function call by your own).

njroussel avatar Oct 13 '23 08:10 njroussel