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

Capturing still via host does not work with OAK-D POE #1075

Open
martonmiklos opened this issue Sep 25, 2024 · 4 comments
Open

Capturing still via host does not work with OAK-D POE #1075

martonmiklos opened this issue Sep 25, 2024 · 4 comments

Comments

@martonmiklos
Copy link

martonmiklos commented Sep 25, 2024

I have a OAK-D POE from what I would like to capture depth and RGB images triggered remotely.

I tried to use the rgb_camera_control.py example but regardless if I press C key the still queue will never be non empty here:
https://github.com/luxonis/depthai-python/blob/main/examples/ColorCamera/rgb_camera_control.py#L152

I have increased the debug log with DEPTHAI_LEVEL=trace python rgb_camera_control.py and I see that the control command got sent:

[2024-09-25 21:32:10.646] [depthai] [trace] Sending message to device (control) - serialize time: 14µs, data size: 0, object type: 5 object data: 
0000: b9 1f 08 03 00 88 00 00 00 00 00 00 b9 03 00 00 00 b9 05 00 00 00 00 00 b9 05 00 00 00 00 00 00
0020: 00 00 00 00 00 00 00 00 b9 03 00 00 00 b9 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[19443010219A6F1300] [192.168.1.197] [1727292730.710] [host] [trace] Log vector decoded, size: 12
[19443010219A6F1300] [192.168.1.197] [28.690] [system] [trace] EV:1,S:0,IDS:3,IDD:0,TSS:28,TSN:690637588
[19443010219A6F1300] [192.168.1.197] [28.690] [system] [trace] EV:1,S:1,IDS:3,IDD:0,TSS:28,TSN:690752041

Sending other commands like camera focus works the same manner via the CameraControl:

            ctrl = dai.CameraControl()
            ctrl.setManualFocus(lensPos)
            controlQueue.send(ctrl)

so I do not think it is a network issue.

In my final phase of my depression I tried to add a script which does the same by:

# Script node
script = pipeline.create(dai.node.Script)
script.setScript('''
    import time
    ctrl = CameraControl()
    ctrl.setCaptureStill(True)
    while True:
        node.io['out'].send(ctrl)
        time.sleep(1)
''')
# Connections: Linking camera to XLink input, so that the frames will be sent to host
script.outputs['out'].link(camRgb.inputControl)

and I get still images fine.

@Erol444
Copy link
Member

Erol444 commented Sep 26, 2024

@martonmiklos so when clicking C key, a frame doesn't open up on the screen with the still image? What depthai library version are you using?

@martonmiklos
Copy link
Author

@martonmiklos so when clicking C key, a frame doesn't open up on the screen with the still image?

Yes exactly. I have added some print-s to indicate that stills in the queue but never got triggered

What depthai library version are you using?

From the depthai-python I checked out the latest master:
38e064d

Now as you mentioned it I checked out the 2.28.0 but the situation is the same.

@Erol444
Copy link
Member

Erol444 commented Sep 26, 2024

@martonmiklos how about opencv version? Does controlQueue.send(ctrl) actually get executed, and there's really no output from the still queue? And normal video stream is working as expected?

@martonmiklos
Copy link
Author

And normal video stream is working as expected?

Video and preview works ok.

Does controlQueue.send(ctrl) actually get executed, and there's really no output from the still queue?

As I mentioned above if I increase the trace level it is visible that it got sent out. Other type of controlQueue sends (like manual focus) functioning fine.

how about opencv version?

OpenCV Version: 4.5.4

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