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

Device calibration is not working #13

Open
MichaelSom opened this issue May 16, 2019 · 1 comment
Open

Device calibration is not working #13

MichaelSom opened this issue May 16, 2019 · 1 comment

Comments

@MichaelSom
Copy link

When I run the python examples with Python 3.6.7:
In leapuvc.py in retrieveLeapCalibration, there is the property knocking routine that retrieves the device calibration data and writes it to a struct. In the for-loop, the sharpness is correctly set on my device, however, the cap.get(cv2.CAP_PROP_SATURATION) always reads the same value, namely the one I set when I do cap.set(cv2.CAP_PROP_SATURATION, [value]).

When I run the python examples with Python 2.7.15:
The cap.set(cv2.CAP_PROP_SHARPNESS) is also not working and doesn't set the value at all.
Additionally, I get the following error in the line after the knocking:

Traceback (most recent call last):
File "stereoExample.py", line 6, in
leap = leapuvc.leapImageThread(source=2, resolution=(640, 480))
File "/home/michi/anyexo_ws/src/any_haptics/leapuvc/Python/leapuvc.py", line 33, in init
self.calibration = retrieveLeapCalibration(self.cam, self.resolution)
File "/home/michi/anyexo_ws/src/any_haptics/leapuvc/Python/leapuvc.py", line 175, in retrieveLeapCalibration
calibrationArray = struct.unpack('BBBBIffffffffffffffffffffffffffffffffffffI', bytes(calibrationBytes))
struct.error: unpack requires a string argument of length 156

I also tested to retrieve the calibration data natively with v4l2-ctl --device=2 --set-ctr=sharpness=100
Again, the setting works fine, but the saturation value is not changing.

Additional Info:
Linux 4.18.0-17-generic
opencv-python Version: 4.1.0.25

@msuencksen
Copy link

I believe I see the simular issue on both Windows and Linux.

The false calibration data blocks the rectify option.
On linux the rectified result from CameraControlExample.py is:

Screenshot-LeapUVC-rectify

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