get_valid_mask_reproj#

deltacamera.get_valid_mask_reproj(old_camera, new_camera, imshape_old=None, imshape_new=None)[source]#

Get the valid region mask when reprojecting between two cameras.

The valid region is the intersection of: - Pixels visible in the old camera’s image - Pixels where both cameras’ distortion models are well-defined

Parameters:
  • old_camera – Source camera.

  • new_camera – Target camera.

  • imshape_old – DEPRECATED. Shape of old camera’s image (height, width), or None. Use old_camera.image_shape instead.

  • imshape_new – DEPRECATED. Shape of new camera’s image (height, width). Use new_camera.image_shape instead.

Returns:

RLEMask indicating valid pixels in the new camera’s image space.