Skip to content

Long delay when opening camera 0  #112

@i-make-robots

Description

@i-make-robots

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions