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 the specifications of a camera (sensor size in mm, focal distance, field of view etc…) and I would like to create a virtual camera that would mirror those parameters. However it does not seem possible to update the sensor size using the camera api. As a result, even if the field of view is correct, the parameters of the focal length no longer match the one of the original camera.
Describe a possible solution
A simple solution would be to add a function like:
defset_sensor_size(cam: bpy.types.Camera, sensor_width_in_mm: float=None, sensor_height_in_mm: float=None):
""" Update the sensor size of the camera. :param cam: The camera object. :param sensor_width_in_mm: width of the sensor in mm. :param sensor_height_in_mm: height of the sensor in mm. """ifsensor_width_in_mmisnotNone:
cam.sensor_width=sensor_width_in_mmifsensor_height_in_mmisnotNone:
cam.sensor_height=sensor_height_in_mm
and call this function at the beginning of set_intrinsics_from_K_matrix and set_intrinsics_from_blender_params (and maybe set_resolution?)
The text was updated successfully, but these errors were encountered:
Describe your feature request
I have the specifications of a camera (sensor size in mm, focal distance, field of view etc…) and I would like to create a virtual camera that would mirror those parameters. However it does not seem possible to update the sensor size using the camera api. As a result, even if the field of view is correct, the parameters of the focal length no longer match the one of the original camera.
Describe a possible solution
A simple solution would be to add a function like:
and call this function at the beginning of set_intrinsics_from_K_matrix and set_intrinsics_from_blender_params (and maybe set_resolution?)
The text was updated successfully, but these errors were encountered: