ChitraPathak / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

ObjectFinder in Adroid #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the code from:
http://www.google.com/codesearch#8TJuDx-2Qiw/trunk/javacv/src/com/googlecode/jav
acv/ObjectFinder.java&q=ObjectFinder%20package:http://javacv%5C.googlecode%5C.co
m

2.
Create the code:
 IplImage object = cvLoadImage("/sdcard/image1.jpg", CV_LOAD_IMAGE_GRAYSCALE);
        IplImage image = cvLoadImage("/sdcard/image2.jpg", CV_LOAD_IMAGE_GRAYSCALE);

ObjectFinder objFinder = new ObjectFinder(object);
double[] findResult = objFinder.find(image);

3. I'm executing the code above but it is taking a long, long time to execute. 
Is anything wrong with the code?

Original issue reported on code.google.com by rkrind...@gmail.com on 20 Oct 2011 at 12:51

GoogleCodeExporter commented 9 years ago
If you are *not* using the binaries for ARMv7 inside the armeabi-v7a directory, 
then this is perfectly normal, yes, nothing wrong with your code. Which set of 
binaries are you using?

Original comment by samuel.a...@gmail.com on 20 Oct 2011 at 7:13

GoogleCodeExporter commented 9 years ago
Hi Samuel,
I'm not using the ARMv7 libraries. I'm checking the README.txt from 
http://code.google.com/p/javacv/downloads/detail?name=OpenCV-2.3.1-android-arm.z
ip&can=2&q=  and if I would like to test with ARMv7 I just need to add the 
folder armeabi-v7a in my Project (inside libs directory)? 

Thanks for your support,
Rafael.

Original comment by rkrind...@gmail.com on 20 Oct 2011 at 10:12

GoogleCodeExporter commented 9 years ago
Instead of the other one named only armeabi, correct.

Original comment by samuel.a...@gmail.com on 20 Oct 2011 at 10:22

GoogleCodeExporter commented 9 years ago
Hi,
I added the missing folder, the app compiled but is still taking a long time 
(actually, I stop the process after some minutes).
I'm using the images box.png and box_in_scene.png just for testing 
(https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/box_in_scene.pn
g?rev=4208&order=size). Do you know if for Android I need to pre-process the 
image (apply Gauss filter, resize, etc..)?

I have a Sony Ericsson Xperia ARC.

Rafael.

Original comment by rkrind...@gmail.com on 20 Oct 2011 at 12:09

GoogleCodeExporter commented 9 years ago
Since this is a recent model, you could try to recompile OpenCV using the NEON 
flags and such, as documented in the Android NDK... That should make it go 
faster.

Original comment by samuel.a...@gmail.com on 20 Oct 2011 at 12:13

GoogleCodeExporter commented 9 years ago
Hi Samuel,
Sorry for the delayed response.
You can close this issue. I replaced my code by another approach.
Thanks,
Rafael.

Original comment by rkrind...@gmail.com on 1 Nov 2011 at 9:45

GoogleCodeExporter commented 9 years ago
Ok... which approach have you taken, if you do not mind my asking?

Original comment by samuel.a...@gmail.com on 2 Nov 2011 at 12:37