How to use cap of usb camera to write data when deepstream app is running?

In my deepstream app, the usb device is designed to link both camera and led, reads from camera and writes to control led, when detect some object, I need use cap of the device to set data to control led, how can I get the cap of the device to write data when the app is running? I am using python.

Thanks

deepstrem version is 6.1.1

Your topic was posted in the wrong category. I am moving this to the DeepStream SDK category for visibility.

Can you describe the details of your ā€œusb deviceā€ and the meaning of the ā€œcap of the deviceā€?
Can you get the camera informatin via v4l2ctl command?

v4l2ctl command runs well

Thanks man

hi,

Thanks for your reply.

1 The device is integrated device, integrates a camera and a led panel, camera is responsible for catch picture for analysis, and led panel is to show result.

2 The device connects to Xavier NX, to catch picture just need to add ā€œ/dev/video0ā€ to pipeline, link and play, it runs well.

3 To turn on led panel to show something, I use python code as following:
cap = cv2.VideoCapture(ā€œ/dev/video0ā€)
if cap.isOpened():
cap.set(0x0a, 0x11)
when streamapp doesn’t run, it works well too.

4 But, when the deepstream app is running, the cap like above can not be opened, so the led can not be operated, I think it is due to conflict.

5 Now, I want to know if there is a device handle like cap to operate led in deepstream app, thus need not to get another device handle to avoid this confilct.

Any question above the description, I will make clear at first time, any advice, much appreciated. ^_^

please check this again, can we get some error information?

currently, deepstream only get pictures from device.

Hi,

No error information, just cap.isOpened() is False, and led control doesn’t work.

Anyway, thanks

deepstream uses gstreamer plugin v4l2src to get pictures from camera, you can use v4l2src to send message to camera, please refer to v4l2src

OK,I will try, Thanks

Is this still an issue to support? Thanks

Yes, do you know the possible python API for this?

you can call set_property to set v4l2src’s extra-controls property. like this:
pgie.set_property(ā€˜config-file-path’, ā€œdstest1_pgie_config.txtā€)

hi, the issue is fixed, like you said, using ā€œset_propertyā€, thank you very much ^_^

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.