Replies: 1 comment
|
The key point is that the zoom ratio shown by the default camera app is not the native zoom range of each physical camera. It is a virtual zoom space created by combining focal lengths and sensor crop factors. For each physical camera, first calculate its equivalent 35mm focal length: equivalentFocalLength = Then choose the reference camera (usually the main wide camera). The zoom ratio can be represented as: zoomRatio = Example: Ultra-wide: Wide: Telephoto: So the unified range can be created by mapping each physical camera into the same zoom coordinate system: Ultra-wide: Wide: Telephoto: For smooth transitions:
This gives device-specific starting values like 0.5x or 0.6x.
Example: [
One important detail: the default camera app usually does not simply switch lenses. It also compensates:
So matching the exact stock camera behavior requires reproducing both the zoom mapping and the camera switching pipeline. For a computer vision app, I would keep the physical camera fixed when possible because switching sensors changes image characteristics and can affect detection accuracy. |
Uh oh!
There was an error while loading. Please reload this page.
Background
The default camera app provides a seamless continuous zoom experience from ultra-wide → wide → max zoom. The starting zoom ratio varies by device — some start at 0.5x, others at 0.6x, etc.
Notably, even on devices that don't support a logical multi-camera, the default camera app still provides this smooth transition between physical cameras.
I want to replicate this exact behavior in my app using the Camera2 API.
Goal
Combine the zoom ranges of multiple physical cameras into a single continuous zoom range — starting from the correct device-specific starting ratio (0.5x, 0.6x, etc.) up to the maximum zoom — just like the default camera app does.
Example
Question
Environment
All reactions