Photo HDR

Capturing Photos in High-Dynamic-Range (HDR)

Photo HDR fuses multiple Frames together to capture Photos in a higher dynamic range, allowing for much brighter highlights and deeper shadows. In most HDR pipelines, an underexposed Frame, a regular exposed Frame, and an overexposed Frame are captured at the same time, and merged together at ISP-level.

Capture HDR Photos

To capture HDR Photos, ensure your currently selected CameraFormat supports Photo HDR and enableHDR:

const format = ...
const photoOutput = usePhotoOutput({
  enableHDR: format.supportsPhotoHDR
})

Camera Extensions

Some Android Phones have vendor-specific CameraExtensions. If the phone has a 'hdr' extension, you can enable it to capture HDR Photos. This does not require enabling Photo HDR via enableHDR, but instead just requires the extension to be enabled:

function App() {
  const device = ...
  const extensions = useCameraExtensions(device)
  const hdrExtension = extensions.find((e) => e.type === 'hdr')

  return (
    <Camera
      {...props}
      cameraExtension={hdrExtension}
    />
  )
}

Tip

See "Camera Extensions" for more information.