Skip to content
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

Long delay when opening camera 0 #112

Open
i-make-robots opened this issue Apr 8, 2024 · 0 comments
Open

Long delay when opening camera 0 #112

i-make-robots opened this issue Apr 8, 2024 · 0 comments

Comments

@i-make-robots
Copy link

i-make-robots commented Apr 8, 2024

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 exception

After 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

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant