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

leap_uvc python scripts return identity camera parameters #16

Open
HyperLethalVector opened this issue Sep 27, 2020 · 1 comment
Open

Comments

@HyperLethalVector
Copy link

As issue describes, the leapuvc python scripts return identity camera paremeters,

they shouldn't be?
image

@JurajVincur
Copy link

In order to get the calibration data on Win it is necessary to use DSHOW backend. However, it looks like using DSHOW backend currently breaks other things so after you get the calibration data create new MSMF capture in regular way.
Following should work.

import cv2
import leapuvc

capResolution = (640, 480)
cam = cv2.VideoCapture(0 + cv2.CAP_DSHOW)
cam.set(cv2.CAP_PROP_FRAME_WIDTH, capResolution[0])
cam.set(cv2.CAP_PROP_FRAME_HEIGHT, capResolution[1])
calibration = leapuvc.retrieveLeapCalibration(cam, capResolution)
cam.release()

print(calibration)

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

2 participants