Ask Your Question
0

grab a frame without JNI Call

asked 2013-03-08 02:26:43 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Is there a way I can grab frames from android camera using openCV4android or JAVA Api without any JNI calls?

The reason is : I want a fixed fps for a particular application. I dont want to use the call back methods onCameraFrame (from CvCameraViewListener) or onPreviewFrame( using camera.onPreviewcallBack), which fails to give a fixed FPS.

I am desperate for help, after spending days :(

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-08 18:26:04 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

You're probably going to have a hard time doing this unless you want a frame rate that is quite low (like 5 fps, depending on your hardware). Go ahead and implement the callback interface but keep track of the timing and throw away any frames that you don't want.

edit flag offensive delete link more

Comments

Low FPS is not a problem for me, but it must be fixed.

I cant used callback interface for it because they are not being called after an exact period od time. Its varying by a huge factor, which makes my intentions infeasible. with c++ I can use VideoCapture::grab() and retrieve() to grab image at a particular instant of time. that solves my issue. But can I do the same in JAVA somehow w/o JNI call?

sumitsh87 gravatar imagesumitsh87 ( 2013-03-11 05:38:55 -0600 )edit

What is the longest time-between-frames that you have seen?

xaffeine gravatar imagexaffeine ( 2013-03-14 13:10:32 -0600 )edit

Question Tools

Stats

Asked: 2013-03-08 02:26:43 -0600

Seen: 357 times

Last updated: Mar 08 '13