For an Android project I have to analyze camera frames real-time. Now I use the ‘android.hardware.Camera.PreviewCallback’ to receive the camera frames. The problem is that while I try to analyze the frames my FPS drops from 30 fps to 15 fps while I need 30 fps. I already tried to handle the analyzing part in a separate thread, the frames stop dropping, but the analyzing is not real-time anymore.
Does someone have a solution for this problem?
Possible options:
Keep in mind, that lot's of slow devices are out there. The framerate also depends on the light situation. So if you want to publish your app, make sure your app is also able to support a lower frame rate.