Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
957 stars 245 forks source link

[Question] fps in analysis mode #325

Open MoodPatterns opened 1 year ago

MoodPatterns commented 1 year ago

I seem to be stuck at max 30 fps when streaming images in the original Flutter camera plugin (although I know that the camera is capable of more). Is this also the upper limit in the analysis mode of your plugin, or can your plugin provide a higher frame rate?

apalala-dev commented 1 year ago

Not sure about iOS, but Android may lack a few settings to perform great FPS from what I found.

In my Xiaomi Mi9T, I often need to set a low resolution and cap the FPS to lower than 30 in order to have good performances when trying to detect faces for example.

You can try our examples and adjust them yourself to your needs to take a look at performances.

Out of curiosity, why do you need more than 30 fps for image analysis?

MoodPatterns commented 1 year ago

@apalala-dev Thank you for the quick response. Ok, I will try it out.

To satisfy your curiosity: I want to use the camera to measure the pulse in the fingertip. 30 fps is sufficient to get just the pulse, but a higher rate would be good to get the exact beat-to-beat intervals (for HRV computations). On the bright side, I don't care much about resolution or image quality, because I only need the average hue per image.

istornz commented 1 year ago

Hello @MoodPatterns, on iOS you have a maxFramesPerSecond property which is a FPS limit on analysis mode.

MoodPatterns commented 1 year ago

@istornz thanks, but this sets just the upper limit, doesn't it? I have tried removing the cap in the examples as @apalala-dev recommended, but I still seem to be stuck with a max of 30 fps.

AronDJacobsen commented 8 months ago

I am also curious as to what determines the max fps, because if it is due to how fast the image analysis is performing, then this could potentially help: https://medium.com/flutter/introducing-background-isolate-channels-7a299609cad8

MoodPatterns commented 8 months ago

Yes, sure, processing needs to be done in an isolate, but that is not the issue .Even with no additional load the max FPS is 30.

Nashev commented 1 month ago

May be you need not an analysis mode? I do not know exactly, but I expect to exists for some special mode, used to make a video streaming for applications like zoom. May be it exists and provides more fps for immediate frame image processing?