Re: Problem with FeatureDetector.read(String file)

228 views
Skip to first unread message

David

unread,
Aug 3, 2012, 10:58:43 AM8/3/12
to android...@googlegroups.com
I debugged the code and find that when I instantiate FeatureDetector with FeatureDetector.create(FeatureDetector.SURF). The "nativeObj" is assigned to addr 0. That probably is the key issue. Any help with that?

Thanks

On Thursday, August 2, 2012 10:42:10 AM UTC-4, David wrote:
Hi,

I am trying to set some parameters for FeatureDetector and have checked the post https://groups.google.com/forum/?fromgroups#!searchin/android-opencv/hessianThreshold/android-opencv/-1mXlMNOudI/Tp8LKjQRGCkJ.

However the program stops at the detector.read(filename) and in LogCat I find the message "Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1) ...

Can anyone help me to solve this problem?

Also can someone tell me what are the default parameters for SURF FeatureDetector and DescriptorExtractor?

Thanks

David

Andrey Pavlenko

unread,
Aug 3, 2012, 11:20:25 AM8/3/12
to android...@googlegroups.com
The patented content ('nonfree' module, e.g. SURF, SIFT) was removed from OpenCV4Android SDK.
Looks like it was removed a bit inaccurately, so instead of throwing an exception it returns invalid object.

Could you use ORB instead? (with DescriptorMatcher.BRUTEFORCE_HAMMING)

David

unread,
Aug 3, 2012, 11:32:43 AM8/3/12
to android...@googlegroups.com
Hi Andrey,

I have used SURF to train my images on my PC so I need to use it on android. Would you add the nonfree module back? Or if I still want to use SURF, what should I do?

Thanks

David

Rui Marques

unread,
Aug 14, 2012, 10:05:42 AM8/14/12
to android...@googlegroups.com
Maybe you can get by using the latest OpenCV4Android which still has the nonfree module included, I think it is version 2.4.1 but i am not sure.

Also, if you really want the latest version, you can probably compile it from source AND include the nonfree module - instead of using the already built package that you have downloaded.
I am not sure if this is possible, maybe Andrey can confirm.

Instructions on how to compile OpenCV4Android from source are somewhere on the documentation site - http://opencv.org/documentation.html .

Andrey Pavlenko

unread,
Aug 14, 2012, 11:12:12 AM8/14/12
to android...@googlegroups.com
Yes, OpenCV4Android can be re-built locally with 'nonfree' module included.
An outdated instruction is here: http://code.opencv.org/projects/opencv/wiki/Building_OpenCV4Android_from_trunk (to be updated soon).
After a successful build one more step is required: "make install" in the build folder, then you'll have SDK-like structure in 'install' folder.

We're not going to include 'nonfree' stuff to OpenCV binary packages for Google Market, but we'll consider adding it to SDK in future to allow to include it to app APK...

Dawei Li

unread,
Aug 14, 2012, 11:22:11 AM8/14/12
to android...@googlegroups.com
That helps a lot. Thanks

--
 
 
 

Reply all
Reply to author
Forward
0 new messages