Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

capture an image android

Is there a tutorial anywhere that describes clearly the steps necessary to capture an image , using openCV4Android ? I have looked at this S/O post

https://stackoverflow.com/questions/42900906/take-picture-using-camerabridgeviewbase-on-opencv which references this tutorial

https://docs.nvidia.com/gameworks/content/technologies/mobile/opencv_tutorial_camera_preview.htm as an example. In this example it States :

On receiving a new frame, the activity class does not process it in any way, and simply returns it, displaying as:

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

I placed a breakpoint on this which never gets hit, however I imagine that inputFrame.rgba(); is what im looking for. Ie I think that is the image and i need to do processing on a single image not the feed.

I do not wish to write the image , I will do some processing on this image in memory to extract data , that data will be written to a database and the image discarded.

At present I have an application which displays the camera feed. To do this i simply implement CameraBridgeViewBase.CvCameraViewListener2

capture an image android

Is there a tutorial anywhere that describes clearly the steps necessary to capture an image , using openCV4Android ? I have looked at this S/O post

https://stackoverflow.com/questions/42900906/take-picture-using-camerabridgeviewbase-on-opencv which references this tutorial

https://docs.nvidia.com/gameworks/content/technologies/mobile/opencv_tutorial_camera_preview.htm as an example. In this example it States :

On receiving a new frame, the activity class does not process it in any way, and simply returns it, displaying as:

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

I placed a breakpoint on this which never gets hit, however I imagine that inputFrame.rgba(); is what im looking for. Ie I think that is the image and i need to do processing on a single image not the feed.

I do not wish to write the image , I will do some processing on this image in memory to extract data , that data will be written to a database and the image discarded.

At present I have an application which displays the camera feed. To do this i simply implement CameraBridgeViewBase.CvCameraViewListener2