Low Light Boost
Improving exposure in dark scenes using Low Light Boost, Camera Extensions, lower FPS and binned formats
Low Light Boost allows the Camera pipeline to automatically extend exposure times (and effectively drop frame rate) to receive more light, if necessary. This is useful in dark scenes where the image would otherwise look too dark.
Check support
Each CameraDevice exposes whether it supports low light boost via supportsLowLightBoost:
const device = ...
console.log(device.supportsLowLightBoost)Enable Low Light Boost
To enable low light boost, set enableLowLightBoost to true:
function App() {
const device = useCameraDevice('back')
return (
<Camera
style={StyleSheet.absoluteFill}
isActive={true}
device={device}
enableLowLightBoost={device.supportsLowLightBoost}
/>
)
}function App() {
const device = useCameraDevice('back')
const camera = useCamera({
isActive: true,
device: device,
enableLowLightBoost: device.supportsLowLightBoost
})
}const controller = ...
if (controller.device.supportsLowLightBoost) {
await controller.configure({
enableLowLightBoost: true
})
}Warning
Make sure your CameraDevice supports low light boost via supportsLowLightBoost.
Enabling low light boost on an unsupported device will throw.
The night Camera Extension
Some Android Phones have vendor-specific CameraExtensions.
If the phone has a 'night' extension, you can enable it to get the best still images under low-light situations.
This is a vendor-defined processing mode at ISP level, and can also improve exposure in dark scenes.
To enable it, first query available extensions and then select the 'night' extension:
function App() {
const device = ...
const extensions = useCameraDeviceExtensions(device)
const extension = extensions.find((e) => e.type === 'night')
return (
<Camera
style={StyleSheet.absoluteFill}
isActive={true}
device={device}
cameraExtension={extension}
/>
)
}function App() {
const device = ...
const extensions = useCameraDeviceExtensions(device)
const extension = extensions.find((e) => e.type === 'night')
const camera = useCamera({
isActive: true,
device: device,
cameraExtension: extension
})
}const device = ...
const session = ...
const extensions = await getSupportedExtensions(device)
const extension = extensions.find((e) => e.type === 'night')
const controllers = await session.configure([
{
input: device,
outputs: [],
constraints: [],
cameraExtension: extension
}
], {})As with all CameraExtensions, this mode comes with the usual Camera Extension limitations around Video HDR, RAW capture and Frame Streaming.
Tip
See "Camera Extensions" for more information.
Other ways to improve low-light exposure
Binned Formats
Binned formats combine multiple neighboring sensor pixels into one larger effective pixel.
This often improves low-light exposure too, so if low-light performance is more important than maximum spatial detail, prefer a { binned: true } constraint.
Lower FPS
Lower FPS gives the Camera more time to expose each Frame, which can improve low-light exposure.
If you don't need 60 FPS, use a lower { fps: ... } constraint like 30 FPS or 24 FPS instead.
Tip
See "FPS" for more information.
Exposure Bias
Increasing Exposure Bias can also make the image brighter, but it may introduce more noise. If possible, prefer actually receiving more light through low light boost, binned formats or lower FPS instead.
Tip
See "Exposure Bias" for more information.