-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for xfeatures2d module of OpenCV 3 #54
Comments
The problem with BTW, if the only thing that you are worried about are descriptors, AKAZE usually provides better results than SIFT, SURF, DAISY or anything else, and doesn't have any of their legal issues either. |
I was looking at updating the cookbook examples, I have most under control (as far I can tell so far), except examples that use SURF (1) and SIFT (6). Some of the most interesting/elaborated examples use SIFT. I can compile OpenCV on Window with Visual Studio. I was not able to do that with MinGW, getting syntax errors, not clear how to it should really be setup on Windows. I tried using MinGW tool chain under Cygwin using cmake:
that can create cmake setup. It compiles part but eventually ends in errors like:
If this is not possible to add xfeatures2d, I will probably drop I will drop SURF and SIFT from the cookbook examples. |
Well, if you get it working with MSVC, that'll be alright for now too. Please send your modifications to As for SURF or SIFT in the cookbook examples, those could be converted to AKAZE. Check the changes to https://github.com/bytedeco/javacv/blob/master/src/main/java/org/bytedeco/javacv/ObjectFinder.java for an example. |
OK. I will try to setup presets to build with VS2012/VS2013 and xfeatures2d. Though I have trouble building current javacpp-presets (no modifications yet). I am getting error while building
Any ideas? |
It's a bug in OpenCV. We need to patch this (see issue #56). One more reason to use MinGW-w64: whatever works on Linux or Mac OS X would also work on Windows. C++ isn't as portable as Java... |
BTW, I'm using this package to install MinGW-w64 on Windows: |
There is something missing in the Wiki Instructions. When I try to build either from Windows SDK or MinWG command prompt using maven install ... it invokes Visual Studio compiler cl.
it will complain about incorrect options, like:
Notice some slashes going in two different directions. Are the compiler options generated by javacpp? Any way to control them? Can you actually currently build javacpp-presets on Windows using MinGW? |
I haven't tried for OpenCV, but you're right, we also need to modify the |
In any case, since SURF and SIFT are no longer part of the core of OpenCV, it makes sense to move to something like AKAZE. Do you have any good reasons for not switching to AKAZE? |
The idea for the Cookbook Examples if that people reading the book that has C++ examples can simply go to the Cookbook Examples and see how it works on JVM. I was thinking to have a set of some interesting algorithms, say AKAZE or LATCH in a separate set, independent of the Cookbook, may not have time for that for a couple of weeks. Beside that ther is a lot other interesting stuff in contrib beside xfeatures2d. I have the xfeatures2d wrappings working on Linux, including SURF and SIFT. Also ported most of the Cookbook code now to OpenCV 3. Most of the SURF and SIFT examples are working, one I did not have time to finish yet, though the issue is mostly with different use of vectors in OpenCV 3 (e,g., I also tested on Mac. OpenCV wrappers (without xfeatures2d) did not build complaining about missing headers in OpenCV and contrib can be build with Visiual Studio 2013 that is free, so technically there is a way to have Windows, Linux, and Mac covered. |
Correction to previous: Windows hopefully going to work too after issue #56 is resolved. |
Ok, good, but BTW it's not just about |
Other things in Wrapping for Cookbook Examples ported so far for OpenCV 3 are on branch WIP/opencv3. Work fine (except video in Chapter 10) on Ubuntu 64 and Mac. I will wait till Issue #56 is fixed before working on Windows version of opencv presets. At that time we can also disable |
Like I said, please do try to fix the Windows build. I can't do everything by myself, I'm just one guy, and this is something that anyone can do, so it's kind of low priority on my list. Besides, this is a bug in OpenCV, so we could also send them a bug report and maybe they'll fix it, eventually. :) |
I understand time constants. I am in the same boat. I do not understand why it is a bug in OpenCV, though that discussion should really move to Issue #56. |
@saudet Can you bump library versions (javacpp, etc.) from released "1.0" to next, say to "1.0.1-SNAPSHOT"? |
Does it really help? If I change the version, everyone has to rebuild all the native libraries. That seems inconvenient to me, so I tend to avoid changing the version until I make breaking changes. Is this alright for you though? In any case, thanks for the work on this module! |
Having a newer build with version the same as released one is confusing SBT (that I use for testing). I have to make up a different version number, test, then revert the version number before committing. Anyway I will create PR soon. |
Implemented in PR #75, |
I see, SBT doesn't like it. Thanks for the explanation and the PR! |
Add presets for the `xfeatures2d` module of OpenCV 3.0 (issue #54)
Included in version 1.1. Thanks for your time on this!! |
Some of the algorithms previously available in javacpp-presets moved in OpenCV 3 to xfeatures2d module. Those include SIFT, SURF, and related.There are also some other interesting algorithms in xfeatures2d module, like DAISY.
The text was updated successfully, but these errors were encountered: