Ask Your Question
0

capture an image android

asked 2018-02-07 13:12:49 -0500

wandCoz gravatar image

updated 2018-02-07 13:28:26 -0500

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/4... which references this tutorial

https://docs.nvidia.com/gameworks/con... 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

edit retag flag offensive close merge delete

Comments

Hi , thank you for your response, I am looking at the tutorials and i do not not see where a photo is taken?

wandCoz gravatar imagewandCoz ( 2018-02-07 14:05:44 -0500 )edit

hi WandCoz, I am also having this problem, I cannot take a picture with cameraviewbase and output the image to javacameraview for processing. Can you give me your code for reference. thanks

Moeptuan gravatar imageMoeptuan ( 2020-08-11 01:44:06 -0500 )edit

@Moeptuan please do not post answers here, if you have a question or a comment, thank you.

also, "Can you give me your code" never works here

berak gravatar imageberak ( 2020-08-11 02:10:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-02-07 13:29:48 -0500

LBerger gravatar image

All android samples are here

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-02-07 13:12:49 -0500

Seen: 1,214 times

Last updated: Feb 07 '18