-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
What feature or enhancement are you suggesting?
Summary
Add support for manual ISO (sensor sensitivity) control in the Camera component.
Motivation
The current exposure prop only provides exposure compensation bias, which automatically adjusts both ISO and shutter speed. Many professional camera applications require direct ISO control for:
- Low-light video recording - Lock ISO to prevent flickering/noise changes
- Consistent exposure - Maintain same ISO across multiple shots
- Professional photography apps - Give users full manual control like DSLR cameras
- Night mode implementation - Increase ISO for darker scenes
- Video production - Match ISO settings across different shots/scenes
Native camera APIs (AVFoundation & Camera2) both support manual ISO, but this isn't exposed in Vision Camera.
Proposed API
Add an iso prop to the Camera component:
<Camera
device={device}
isActive={true}
iso={800} // number | undefined (undefined = auto)
/>Device Capabilities
Add ISO capabilities to CameraDevice interface:
interface CameraDevice {
minISO: number; // e.g., 50 or 100
maxISO: number; // e.g., 3200 or 6400
supportsManualISO: boolean;
}Platform Implementation
iOS (AVFoundation):
try device.lockForConfiguration()
device.setExposureModeCustom(
duration: AVCaptureDevice.currentExposureDuration,
iso: Float(isoValue),
completionHandler: nil
)
device.unlockForConfiguration()Android (Camera2):
captureRequestBuilder.set(
CaptureRequest.SENSOR_SENSITIVITY,
isoValue // Integer
)
captureRequestBuilder.set(
CaptureRequest.CONTROL_AE_MODE,
CaptureRequest.CONTROL_AE_MODE_OFF
)Behavior
iso={undefined}or prop not set → Auto ISO (default behavior)iso={800}→ Lock ISO to 800, camera auto-adjusts shutter speed- Values outside
device.minISOtodevice.maxISO→ Clamped to valid range - Works independently from
exposureprop (exposure compensation can still be applied)
Example Usage
function ManualCameraScreen() {
const device = useCameraDevice('back');
const [iso, setIso] = useState<number | undefined>(undefined);
return (
<>
<Camera
device={device}
isActive={true}
iso={iso}
/>
<Slider
minimumValue={device?.minISO ?? 100}
maximumValue={device?.maxISO ?? 3200}
value={iso ?? (device?.minISO ?? 100)}
onValueChange={setIso}
/>
</>
);
}Benefits
- ✅ Gives developers full control over sensor sensitivity
- ✅ Consistent with existing API design (
zoom,exposureprops) - ✅ Platform support already available natively
- ✅ Optional prop - doesn't break existing code
- ✅ Simple to implement and use
Use Cases
- Night Photography - Set high ISO (1600-3200) for dark scenes
- Bright Daylight - Set low ISO (50-100) for clean images
- Video Recording - Lock ISO to prevent exposure flickering
- Astrophotography - Max ISO with long exposure
- Product Photography - Consistent ISO across all shots
Why This Matters
Vision Camera is positioning itself as a professional-grade camera library. Manual ISO control is a fundamental feature in professional photography and videography. Without it, developers must either:
- Fork the library and add it themselves
- Use inferior camera libraries with less performance
- Build custom native modules (defeating the purpose of cross-platform)
Are you willing to help?
- I can test the implementation
- I can provide feedback on API design
- I can help with implementation (if guidance is provided)
Environment
- Vision Camera Version: [your version]
- React Native Version: [your version]
- Platform: iOS & Android
What Platforms whould this feature/enhancement affect?
Android, iOS
Alternatives/Workarounds
Summary
Add support for manual ISO (sensor sensitivity) control in the Camera component.
Motivation
The current exposure prop only provides exposure compensation bias, which automatically adjusts both ISO and shutter speed. Many professional camera applications require direct ISO control for:
- Low-light video recording - Lock ISO to prevent flickering/noise changes
- Consistent exposure - Maintain same ISO across multiple shots
- Professional photography apps - Give users full manual control like DSLR cameras
- Night mode implementation - Increase ISO for darker scenes
- Video production - Match ISO settings across different shots/scenes
Native camera APIs (AVFoundation & Camera2) both support manual ISO, but this isn't exposed in Vision Camera.
Proposed API
Add an iso prop to the Camera component:
<Camera
device={device}
isActive={true}
iso={800} // number | undefined (undefined = auto)
/>Device Capabilities
Add ISO capabilities to CameraDevice interface:
interface CameraDevice {
minISO: number; // e.g., 50 or 100
maxISO: number; // e.g., 3200 or 6400
supportsManualISO: boolean;
}Platform Implementation
iOS (AVFoundation):
try device.lockForConfiguration()
device.setExposureModeCustom(
duration: AVCaptureDevice.currentExposureDuration,
iso: Float(isoValue),
completionHandler: nil
)
device.unlockForConfiguration()Android (Camera2):
captureRequestBuilder.set(
CaptureRequest.SENSOR_SENSITIVITY,
isoValue // Integer
)
captureRequestBuilder.set(
CaptureRequest.CONTROL_AE_MODE,
CaptureRequest.CONTROL_AE_MODE_OFF
)Behavior
iso={undefined}or prop not set → Auto ISO (default behavior)iso={800}→ Lock ISO to 800, camera auto-adjusts shutter speed- Values outside
device.minISOtodevice.maxISO→ Clamped to valid range - Works independently from
exposureprop (exposure compensation can still be applied)
Example Usage
function ManualCameraScreen() {
const device = useCameraDevice('back');
const [iso, setIso] = useState<number | undefined>(undefined);
return (
<>
<Camera
device={device}
isActive={true}
iso={iso}
/>
<Slider
minimumValue={device?.minISO ?? 100}
maximumValue={device?.maxISO ?? 3200}
value={iso ?? (device?.minISO ?? 100)}
onValueChange={setIso}
/>
</>
);
}Benefits
- ✅ Gives developers full control over sensor sensitivity
- ✅ Consistent with existing API design (
zoom,exposureprops) - ✅ Platform support already available natively
- ✅ Optional prop - doesn't break existing code
- ✅ Simple to implement and use
Use Cases
- Night Photography - Set high ISO (1600-3200) for dark scenes
- Bright Daylight - Set low ISO (50-100) for clean images
- Video Recording - Lock ISO to prevent exposure flickering
- Astrophotography - Max ISO with long exposure
- Product Photography - Consistent ISO across all shots
Why This Matters
Vision Camera is positioning itself as a professional-grade camera library. Manual ISO control is a fundamental feature in professional photography and videography. Without it, developers must either:
- Fork the library and add it themselves
- Use inferior camera libraries with less performance
- Build custom native modules (defeating the purpose of cross-platform)
Are you willing to help?
- I can test the implementation
- I can provide feedback on API design
- I can help with implementation (if guidance is provided)
Environment
- Vision Camera Version: [your version]
- React Native Version: [your version]
- Platform: iOS & Android
Additional information
- I agree to follow this project's Code of Conduct
- I searched for similar feature requests in this repository and found none.