Log in or register to post comments

A question about integrating OpenCV into Android

April 4, 2011 - 4:25am #1

Hi, I am trying to integrating face detection using OpenCV into Android camera and I have scan the dev guide and related documentation. But I do not totally understand what is QCAR. Does it mix the virtual and real thing together? Can it help accelerate my project of integration? If so, how?

Thanks in advance

Re: A question about integrating OpenCV into Android

April 5, 2011 - 7:06am #9
ksiva wrote:

Most of QCAR is closed-source, you cannot change the internet requirements and you cannot get access to the camera frame pipeline. In native code (C++) you can get access to the camera image used for that frame. Look at the State, Frame, and Image objects in the API.

I'm not sure what this is referring to (what are we comparing against?) but QCAR has been optimized for mobile devices and its natural feature tracker is quite fast :) I suggest you play around with it and see if it meets your needs.

- Kim

OK, thanks for you reply, Kim. That helps a lot. I have fixed the problem about interface. And I am sorry that I can not change the internet requirement. But thank you all the same!

Re: A question about integrating OpenCV into Android

April 5, 2011 - 5:40am #8

Most of QCAR is closed-source, you cannot change the internet requirements and you cannot get access to the camera frame pipeline. In native code (C++) you can get access to the camera image used for that frame. Look at the State, Frame, and Image objects in the API.

Quote:

I heard "the QCAR should be much faster (40ms instead of 5s per frame in some experiments)", is that true?

I'm not sure what this is referring to (what are we comparing against?) but QCAR has been optimized for mobile devices and its natural feature tracker is quite fast :) I suggest you play around with it and see if it meets your needs.

- Kim

Re: A question about integrating OpenCV into Android

April 5, 2011 - 2:51am #7
ksiva wrote:

OpenCV is not integrated in any way, that is something you would have to do yourself.

QCAR needs to connect to the internet at least once (per application) to download device settings. After that you should be able to run it offline.

- Kim

Hi, thanks for your reply.

I mean what the interface which communicates with C++ library is?

If I do not need to use the tracktable in my project, so is there some way that I can remove the code of connecting to the Internet?

I heard "the QCAR should be much faster (40ms instead of 5s per frame in some experiments)", is that true? Can you give me some information about the accelerator?

Thanks so much in advance!

Re: A question about integrating OpenCV into Android

April 4, 2011 - 3:34pm #6

OpenCV is not integrated in any way, that is something you would have to do yourself.

QCAR needs to connect to the internet at least once (per application) to download device settings. After that you should be able to run it offline.

- Kim

Re: A question about integrating OpenCV into Android

April 4, 2011 - 2:20pm #5
ksiva wrote:

If you run the ImageTargets sample without modifying it you should see a teapot rendered on the included "chips" and "stones" targets when you point your phone at the print out of these targets.

When you download new tracking files from the "My Trackables" system, be sure to place the files in your project's assets folder.

- Kim

yes, I have gotten the result, seeing the teapot. Thanks!

And another question. Where is the interface of calling Opencv class in the sample ImageTargets or the interface which communicates with C++ library? That is, how the android transmit the preview to the C++ library? I just did not find it or understand thoroughly. Could you help me?

I found that if my phone can not connect the network, it will show a message:

"Network connection required to initialize camera settings. Please check your connection and restartthe application. If you are still experiencing problems, then your device may not be currently supported."

The relation codes were found in the ImageTargets.java. Does it mean it is necessary to connect the net before using this software? Can I modify it to let it work without connecting the net?

Re: A question about integrating OpenCV into Android

April 4, 2011 - 12:39pm #4

If you run the ImageTargets sample without modifying it you should see a teapot rendered on the included "chips" and "stones" targets when you point your phone at the print out of these targets.

When you download new tracking files from the "My Trackables" system, be sure to place the files in your project's assets folder.

- Kim

Re: A question about integrating OpenCV into Android

April 4, 2011 - 12:01pm #3
ksiva wrote:

QCAR lets you track pre-defined planar targets, such as images or markers, in order to render 3D content on the live camera view in a tightly-registered way. It can also be used to track 3D objects made up of planes, such as boxes.

You can use QCAR just to get the camera image each frame, and feed that to your own algorithms before rendering 3D content over the camera image. Of course we'd love you to play around with our tracker as well!

- Kim

Hi, Kim

Thanks! I read the sample in your SDK--ImageTargets. Downloaded my tracktable and inserted it into the media folder. However, when I tried it in my android phone, it just showed as a normal camera. What is it supposed to look like?

Re: A question about integrating OpenCV into Android

April 4, 2011 - 5:08am #2

QCAR lets you track pre-defined planar targets, such as images or markers, in order to render 3D content on the live camera view in a tightly-registered way. It can also be used to track 3D objects made up of planes, such as boxes.

You can use QCAR just to get the camera image each frame, and feed that to your own algorithms before rendering 3D content over the camera image. Of course we'd love you to play around with our tracker as well!

- Kim

Log in or register to post comments