visible_subbox#
- deltacamera.visible_subbox(old_camera, new_camera, old_imshape, new_box)[source]#
Compute the sub-box of new_box that would contain valid pixels when reprojecting.
In other words, compute the part of new_box (from new_camera’s POV) that has pixels that are visible in old_camera’s image of shape old_imshape.
- Parameters:
old_camera – the original camera
new_camera – the new camera
old_imshape – shape of the image of the old camera (height, width)
new_box – box in the new camera image (x, y, w, h)
- Returns:
The sub-box of new_box (x, y, w, h) as described.