-
-
Notifications
You must be signed in to change notification settings - Fork 100
Description
Openpnp version: in 4.9.0-0,
System: Windows 11
Java version: 21
Code: https://github.com/MarginallyClever/Robot-Overlord-App/blob/opencv-again/src/main/java/com/marginallyclever/ro3/apps/webcampanel/WebCamPanel2.java (has main method)
OpenCV.loadLocally();
camera = new VideoCapture();
camera.open(0); // big delay, no exceptionAfter that I get an exception in Calib3d.estimateAffine3D():
Exception in thread "AWT-EventQueue-0" CvException [org.opencv.core.CvException: cv::Exception: OpenCV(4.9.0) C:\GHA-OCV-1\_work\ci-gha-workflow\ci-gha-workflow\opencv\modules\calib3d\src\ptsetreg.cpp:888: error: (-215:Assertion failed) count >= 0 && to.checkVector(3) == count in function 'cv::estimateAffine3D'
]
at opencv@4.9.0-0/org.opencv.calib3d.Calib3d.estimateAffine3D_2(Native Method)
at opencv@4.9.0-0/org.opencv.calib3d.Calib3d.estimateAffine3D(Calib3d.java:9270)
I have no idea if I'm doing it right. Can I get a pointer to some how-tos? Any docs more than the python API would be great.
I am aware of
- https://opencv-java-tutorials.readthedocs.io/en/latest/04-opencv-basics.html
- https://www.baeldung.com/java-opencv
- https://docs.opencv.org/4.x/d9/d52/tutorial_java_dev_intro.html
None of which are tailored for this library OR doing what I'm trying to do (structure from motion). I have also found https://docs.opencv.org/4.x/dc/d43/tutorial_camera_calibration_square_chess.html but I can't get it to work (I had it once during the pandemic but that code is long gone)
Any tips you have would be greatly appreciated!