Skip to content

calibrate.py problem #1245

Description

@olivergh1708

Describe the bug
I have two luxonis cameras (OAK-D and OAK-D-LITE) and I am having problems using the calibrate.py script with both of them.

  • OAK-D camera:
    The RGB camera is blurry and cannot identify the charuco board.
python3 calibrate.py -s 3.85 --board OAK-D -nx 35 -ny 20
[OK] OpenCV version 4.5.5 is correct.
Cam: color and focus: True
Cam: left and focus: False
Cam: right and focus: False
Saving dataset to: dataset
Sensor name for color is IMX378
Sensor name for left is OV9282
Sensor name for right is OV9282
Starting image capture. Press the [ESC] key to abort.
Will take 39 total images.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Start capturing...
new minimum: {'ts': 0.0333479999999895, 'indicies': {'color': 0, 'left': 0, 'right': 0}} min required: 0.2
Time stamp of color is 1 day, 17:19:03.736332
Markers count ... 0
Total markers needed -> 140
Status of color is False
Time stamp of left is 1 day, 17:19:03.736166
Markers count ... 271
Total markers needed -> 140
py: Saved image as: dataset/left/p0_0.png
Status of left is True
Time stamp of right is 1 day, 17:19:03.769513
Markers count ... 299
Total markers needed -> 140
py: Saved image as: dataset/right/p0_0.png
Status of right is True
py: Capture failed, unable to find chessboard! Fix position and press spacebar again
Image
  • OAK-D-LITE
    In this case I couldn't even open the video stream.
python3 calibrate.py -s 7.70 --board OAK-D-LITE -nx 17 -ny 9 -v3
[OK] OpenCV version 4.5.5 is correct.
Cam: color and focus: True
Cam: left and focus: False
Cam: right and focus: False
Saving dataset to: dataset
Sensor name for color is IMX214
Sensor name for left is OV7251
Sensor name for right is OV7251
Starting image capture. Press the [ESC] key to abort.
Will take 39 total images.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
  File "/home/it_poc/workspaces/oliver_aruco/depthai/calibrate.py", line 1255, in <module>
    Main().run()
  File "/home/it_poc/workspaces/oliver_aruco/depthai/calibrate.py", line 1246, in run
    self.capture_images_sync()
  File "/home/it_poc/workspaces/oliver_aruco/depthai/calibrate.py", line 920, in capture_images_sync
    combinedImage = np.hstack((combinedImage, subImage))
  File "/home/it_poc/.local/lib/python3.10/site-packages/numpy/core/shape_base.py", line 359, in hstack
    return _nx.concatenate(arrs, 1, dtype=dtype, casting=casting)
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 239 and the array at index 1 has size 240

Could you give me some advice on how I could manage to do a calibration of the camera please.

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