mitsuba3
mitsuba3 copied to clipboard
About perspective projection matrix of the sensor
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 ?
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 usingK
. 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 modifym_campera_to_sample
that is currently built using theperspective_projection
function. Your changes should simply replace this function call by your own).