Link opencv native camera with android java camera and capture image

asked 2017-09-14 15:30:27 -0600

agi gravatar image

I am working on an Android app that detects squared/rectangular objects, captures their image and auto-crops the image. I am able to detect the object, however I am having difficulty linking the openCV detection with Camera2 API, or even with the original Android Camera API for that matter. I have looked online but I feel lost when it comes to this junction. How can I link openCV camera with the Android Camera2 API and capture the object that is being detected?

I can provide code if necessary.

edit retag flag offensive close merge delete

Comments

The tutorials seem pretty obvious to help you with that. What are you running your opencv detection code on? C/c++ using jni or pure java? Also post your init code for opencv.

Jblaze761 gravatar imageJblaze761 ( 2017-11-23 10:09:37 -0600 )edit

@Jblaze761 , nice that you want to help, still -- please do NOT post answers here, if you have a question or comment, thank you.

berak gravatar imageberak ( 2017-11-23 10:18:40 -0600 )edit

If that's not for posting answers where should I post?

Jblaze761 gravatar imageJblaze761 ( 2017-11-23 10:22:35 -0600 )edit

you did not really answer that question, or did i misread it ? is it "solved" now ?

make it a comment, like it is now, that's all.

berak gravatar imageberak ( 2017-11-23 10:25:00 -0600 )edit

The question doesn't provide enough info to give a direct answer and No it isn't solved, so got your drift

Jblaze761 gravatar imageJblaze761 ( 2017-11-23 10:27:50 -0600 )edit

@Jblaze761, I was originally using pure java but that didn't work well, so I started using jni C++. And I saw some examples of code where I could detect images real time for both jni and pure java. However, I did not see any examples with capturing the detected object. Can you send me the links to the tutorials? I did not find any.

agi gravatar imageagi ( 2017-11-24 20:44:51 -0600 )edit