About default camera FPS

207 views
Skip to first unread message
Assigned to trevor...@google.com by wuj...@google.com

김기홍 (Roy)

unread,
May 17, 2023, 4:08:09 AM5/17/23
to Android CameraX Discussion Group
when i call the camera module using the camera2(or CameraX) library, does it automatically choose the highest/maximum fps value/rate? 

(fps?) it might vary according too image size

Rodney McKay

unread,
May 17, 2023, 5:35:54 PM5/17/23
to Android CameraX Discussion Group, kkh...@alphacode.co.kr
Yes, and if you do not need all the frames, you can define a stream that samples frames from the camera less frequently, using CameraCaptureSession.

Trevor McGuire

unread,
May 19, 2023, 1:34:10 AM5/19/23
to Rodney McKay, Android CameraX Discussion Group, kkh...@alphacode.co.kr
The frame rate used by CameraX (and Camera2) are usually a range of values. The camera is free to adjust the frame rate depending on lighting conditions so that the scene looks correctly exposed. An example of this range would be [12fps, 30fps]. The camera may drop the frame rate down to 12fps in low light to give the sensor enough time to collect light, but in a bright scene, it could set the frame rate to 30fps since it doesn't need as much time to collect light.

When you use VideoCapture in CameraX, or the TEMPLATE_RECORD template in Camera2, the frame rate may be fixed to something like 30fps because that is standard for videos. This just means that in certain lighting conditions, the video may become noisy to maintain that frame rate while showing enough detail in the scene.

If you want to override this behavior, in CameraX 1.3.0-alpha06 you can get the available frame rate ranges with CameraInfo.getSupportedFrameRateRanges(). You can then set the frame rate range you would like to use with VideoCapture.Builder.setTargetFrameRate(). In CameraX 1.3.0-alpha07, if you are not using VideoCapture, you will also be able to set the frame rate on the Preview use case with a similar method: Preview.Builder.setTargetFrameRate().

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/15935e83-93eb-4049-a19f-8c1b5a885860n%40android.com.
Reply all
Reply to author
Forward
0 new messages