Read camera data without camera visualization.

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

julian403 gravatar image

Hello All.

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

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



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 -0500 )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 -0500 )edit