Ask Your Question
0

How can i change FPS of javacamera on android

asked 2013-09-30 03:00:52 -0600

itay gravatar image

updated 2013-09-30 03:02:22 -0600

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-09-30 06:20:24 -0600

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.

edit flag offensive delete link more

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 ( 2013-09-30 09:17:35 -0600 )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

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-10-01 05:47:23 -0600 )edit

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

itay gravatar imageitay ( 2013-10-02 02:18:35 -0600 )edit

Question Tools

Stats

Asked: 2013-09-30 03:00:52 -0600

Seen: 6,791 times

Last updated: Oct 08 '14