-
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
Crush when calling stereoRectify. bug ? #1802
Comments
Could you try to set the "org.bytedeco.javacpp.nopointergc" system property to "true" and see if that helps?
|
Unfortunately, Disabling automatic garbage collection for pointers with setting the org.bytedeco.javacpp.noPointerGC variable did not help. The variable was set as follows in netbeans: Next add code
Log:
But I'm sure the variable 'noPointerGC=true' is set. |
Your sample code above runs fine for me on both Linux and Windows. |
Hello, I really want the procamtracker to work. I also tried to run on Java 1.8 - but it did not help solve the problem. I'll try build JavaCV-platform and check the code there. In any case, thanks for your attention to my problem. |
Like I said, please try with the snapshots. It might be an issue that was fixed recently. |
Samuel, thanks for reply! I have not worked with maven (pom.xml) before and have a trouble with understanding how to do the setup you wrote about. I would be grateful if you provide a mini-project with the correct settings for the build. |
That looks alright, so it looks like something about your machine is strange. You should try with another machine. |
I tryed on different PCs with Windows 10 x64 :( Can you say which version of Java are you using ? And which version of Windows ? Another moment, I run the code without connected cameras (realsense or web-camera) |
Windows 10, with both JDK8 and JDK11, your sample code works fine. |
To clarify, I copy/paste your code above #1802 (comment) in the main() method of a class and file named TestStereo.java, and then run this command, which executes without error: java -cp /path/to/javacv-platform.jar TestStereo.java |
Sorry for the silence. I was busy with another task. It's my mistake, I specified the wrong parameters to reproduce the error in #1802. Sorry, wasted so much time. Please use this file: And this calibration file camera-projector.yaml I put java code and calibration file in javacv folder. java -cp javacv-platform.jar CheckError.java |
Ah, I see what the problem is. The order of the parameters for stereoRectify() is a bit different from cvStereoRectify(). I didn't notice that when I had to update the code to work with recent versions of OpenCV where cvStereoRectify() isn't available anymore. As you can see, not many people are testing this code, so thank you very much for reporting this issue! I pushed a fix in commit d5943d7. Please give it a try with the snapshots: http://bytedeco.org/builds/ |
Hi! Wow, it's working now! It's funny - I wanted to dig deeper into what parameters were passed to the stereoRectify. As always, the cause of many mistakes is inattention. Thanks for your help. Now I'll try the procamtracker on the projector. And this issue has been resolved. |
Hey, I had the same issue with cvFindHomography and FindHomography which did not take the same parameters. I am not sure that JavaCV will have the trouble as it was updated already. |
The fix has been released with JavaCV 1.5.8. Thanks for reporting! |
Hello,
I get an error when calling stereoRectify:
I study works on dynamic projection.
In particular procamalib and procamtracker.
I received a calibration file through procamcalib and copied it into the procamtracker.
When I start tracking I get that error.
I also tried using the camera-projector.yaml from the PapART project, same bad result.
I found that the reason is in the stereoRectify call:
-MainFrame trackingWorker.execute()
----TrackingWorker.doInBackground
--------new ReflectanceInitializer
------------projectorDevice.getRectifyingHomography
-----------------stereoRectify < exception
Herethe code to reproduce the error:
I am expecting the result:
The text was updated successfully, but these errors were encountered: