Skip to content

Device calibration is not working #13

@MichaelSom

Description

@MichaelSom

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

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