reproject_mask#
- deltacamera.reproject_mask(mask, old_camera, new_camera, dst_shape, border_mode=cv2.BORDER_CONSTANT, border_value=0, interp=None, antialias_factor=1, dst=None, return_validity_mask=False)[source]#
Reproject a binary mask from one camera view to another.
- Parameters:
mask – Binary mask array (bool or uint8) in the old camera’s image space.
old_camera – Source camera.
new_camera – Target camera.
dst_shape – Output shape (height, width).
border_mode – OpenCV border mode for out-of-bounds pixels.
border_value – Value for border pixels.
interp – Interpolation method.
antialias_factor – Antialiasing factor (1 = no antialiasing).
dst – Optional pre-allocated output array.
return_validity_mask – If True, also return a mask of valid pixels.
- Returns:
Reprojected mask, or tuple of (mask, validity_mask) if return_validity_mask=True.