luxonis / depthai-experiments

Experimental projects we've done with DepthAI.
MIT License
799 stars 356 forks source link

OAK-D-SR Camera save color image and depth image by record.py #485

Open Jalen-Xu opened 1 year ago

Jalen-Xu commented 1 year ago

Hi,

I want to save some RGB images and depth images from SR camera by running record.py file, but it reports an error. save

ToonTielen commented 1 year ago

Above stated error from @Jalen-Xu is fixed by the commit of @Erol444. However I am running in the following error:

Closing OAK camera
Traceback (most recent call last):
  File "/home/mic-733ao/depthai-experiments/gen2-record-replay/record.py", line 95, in <module>
    cam = create_cam(socket)
  File "/home/mic-733ao/depthai-experiments/gen2-record-replay/record.py", line 52, in create_cam
    cam = oak.create_camera(socket, encode=dai.VideoEncoderProperties.Profile.MJPEG)
  File "/home/mic-733ao/.local/lib/python3.8/site-packages/depthai_sdk/oak_camera.py", line 126, in create_camera
    comp = CameraComponent(self._pipeline,
  File "/home/mic-733ao/.local/lib/python3.8/site-packages/depthai_sdk/components/camera_component.py", line 61, in __init__
    self._create_node(self._pipeline, source.upper())
AttributeError: 'depthai.CameraBoardSocket' object has no attribute 'upper'
Erol444 commented 1 year ago

@ToonTielen what's the args you are using? I'll fix asap

ToonTielen commented 1 year ago

@ToonTielen what's the args you are using? I'll fix asap

I did not give any arguments, so all are on default value.