openlifu.nav.photoscan.apply_exif_orientation_numpy

openlifu.nav.photoscan.apply_exif_orientation_numpy(image: ndarray, orientation: int, inverse: bool = False) ndarray[source]

Transforms an image array to undo or redo EXIF orientation.

Parameters:
  • image (np.ndarray) – The image array (H x W x C or H x W).

  • orientation (int) – EXIF orientation tag value (1-8).

  • inverse (bool) – If True, applies the inverse transformation.

Returns:

The transformed image.

Return type:

np.ndarray