Read camera data without camera visualization.

asked 2019-07-07 14:37:27 -0600

julian403 gravatar image

Hello All.

I started to use openCV on android studio and as my first code I followed this link:

https://docs.opencv.org/2.4/doc/tutor...

This method is call every x seconds given some fps and it shows the inputFrame.rgba() Mat in CameraBridgeViewBase. I

public Mat onCameraFrame(CvCameraViewFrame inputFrame) { return inputFrame.rgba(); }

I can also process the inputFrame.rgba() Mat before return it. But what I want is to get a Mat when I call some function or method. Could you please help me?

There is some Class or Class method that I can call everywhere or when I want and get a Mat from camera?

What I need is to get a frame every seconds and do not show it in a widget but process it.

Thanks in advace.

edit retag flag offensive close merge delete

Comments

1

imho, you can use the VideoCapture class directly, but you'll have to write your own program infrastructure then (can't use CameraBridgeViewBase or such)

berak gravatar imageberak ( 2019-07-08 00:02:23 -0600 )edit

thanks for the repply but Camera API is not a part of NDK for many years. There are some attempts to make this Camera API public, but we don't have a look on that yet.

julian403 gravatar imagejulian403 ( 2019-07-08 19:21:02 -0600 )edit