-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How to use BestOf2NearestMatcher apply2()? #2027
Comments
…Info` from `cv::detail` (issue bytedeco/javacv#2027)
It's a bit hard to use std::vector with Pointer objects like that, so I've mapped those to CameraParamsVector, ImageFeaturesVector, and MatchesInfoVector in commit bytedeco/javacpp-presets@7882024. Please give it a try with the snapshots: http://bytedeco.org/builds/ |
Thank you. I was able to get it to build successfully using the snapshot, however I am getting a link error when I run the application. I would assume this is an issue with my build.gradle file but I am not. Do you have any suggestions?
|
You'll need to use the snapshots for the others as well
|
I have updated those as well and still have the same issues. Is there perhaps an additional class that I need to be loading with the Loader? Thank you for all your help.
|
The version for OpenCV is 4.7.0, not 4.6.0, that will not work, that's normal.
|
Thank you. I have updated all the versions, but I am still having the same issue. Am I just using this the wrong way? Here is my function
The error I am getting is from the MatchesInfoVector() on the third line
|
Looks like openblas is missing from your dependencies. That's probably why it doesn't work. |
Thank you. Still running into the same issues with openblas as a dependency.
|
Please set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console. |
Attached is the additional log information. |
It just looks it's not finding the libraries anywhere. What is the content of your APK file? |
Are you sure the versions match? |
Thank you. I believe they are this is from my build.gradle. I pulled the versions from
|
Yes, but please check the files manually |
Thank you. What files specifically are you looking for? I could not find any version information on the .so files. I have cleaned out the build directory and done a fresh build to try to ensure the latest version and still having the same issue. |
Maybe it's a problem with the CI. I've restarted the last builds for android-arm64 and they should get redeployed correctly. Please purge your local cache and try again. |
Thank you for all your help. I believe I have this working now. As I continued to test I ran into another roadblock that seems similar to my original question. After getting the features and matches I am subsetting with leaveBiggestComponent as shown below. For this the return type is an IntPointer and I am having trouble converting this to an IntVector so I can use it in a list type. It looks like IntVector has a constructor that takes a pointer, but when I use that it causes an out of memory exception. Any suggestions?
Thanks |
We can call get() on that as well to convert it to an array. |
Thank you. Is there a reason this cannot me called with a single channel grayscale image?
|
What is the best way to try to get help with this. Everything compiles and seems to be running ok, so I believe the upgrade that you made is good. I have code working in python that I need to replicate in java, and there seems to be differences in the outputs from JavaCV vs OpenCV for python. For example, with JavaCV when I compute key points I get different key points every time it runs this does not seem correct to me. Thank you in advance.
|
JavaCV uses the C++ API, so if you get different results on each run like that, it indicates the memory is probably getting corrupted somewhere. In particular, you'll need to make sure nothing gets deallocated prematurely. |
I am getting crashes when calling the apply function for my camera estimator do you have any suggestions?
Thanks, |
If you have working code in C++, I can probably tell you what is wrong with your code.
|
BTW, one way to make sure nothing gets deallocated prematurely is to keep a reference of everything in fields. |
This is probably a simple answer but I am new to javacv. I am translating some python to javacv and I am having issues calling the apply2 function of the BestOf2NearestMatcher. I am trying to pass a list of ImageFeatures as the first parameter but I am getting a type mismatch error. The documentation for apply2 says it accepts StdVector opencv_stitching.ImageFeatures. How can I convert my List to properly pass to the apply2 function?
Here is my function
The text was updated successfully, but these errors were encountered: