Ask Your Question
0

How can i change FPS of javacamera on android

asked Sep 30 '13

itay gravatar image

updated Sep 30 '13

berak gravatar image

Hi,

I want to know if there is a chance to change the FPS of the camera, so i get into "onCameraFrame" function less often?

If there is no way to do it, what can i do if i want to perform image processing in a real time and do not let the value of the inputframe to change in the middle of the calculation.

Thanks

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Sep 30 '13

You can get access to android.hardware.Camera object via JavaCameraView and force fps. There is example Tuturial-3-CameraControl, that demonstrates how to control android camera directly. I recommend you to start from this sample.

Preview: (hide)

Comments

Sorry but i can't find where exactly the fps is changed. Can you focus me please where exactly i can control the fps? Thanks

itay gravatar imageitay (Sep 30 '13)edit
2

You need to set correct camera parameters with Camera.Parameters class. Camera.Parameters.setPreviewFpsRange is what you need. http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setPreviewFpsRange%28int,%20int%29

Yes, it's work!!! Thank you very much

itay gravatar imageitay (Oct 2 '13)edit

Question Tools

Stats

Asked: Sep 30 '13

Seen: 6,843 times

Last updated: Oct 08 '14