GMSL camera(s) access by Python

Dear,

I’m trying to access GMSL camera(s) from python.

Even some related threads as follow:

I’m not sure the issue was cleared.

Does anyone have an idea to access GMSL camera(s) with Python?

Thanks,

1 Like

Dear ddpx2,

Do you have any reason to use Python?
Because the souce codes for DriveWorks/NvMedia are all based on C++. Thanks.
BTW I hope this link helps for your topic. Thanks.
https://devtalk.nvidia.com/default/topic/1044512/general/opencv-unable-to-stop-the-stream-inappropriate-ioctl-for-device/?offset=2#5299842

Thanks Steve,

I’ll test it and update~

Steve,

I’ve installed OpenCV on DRIVE AGX Xavier Dev. system and tested with Python.
Then, how can I access GMSL camera here?

To capture frame at Python as follow;

import cv2

cap = cv2.VideoCapture(<b>0</b>)

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()
...

Python requires the device index or video file name.
e.g /dev/video0, /dev/video1… or 0, 1 etc

And, when multiple GMSL cameras are installed, how can I pass mask info like selector_mask.

Thanks,

1 Like

Facing the same problem. Can’t get the video capture device. Anybody figured it out?

Hi @farhan3,

Please help to change your DevZone account to use corporate or university email address by following below links, and then create a new topic linked to this topic for your problem. Thanks!

https://developer.nvidia.com/user -> “Edit Profile” -> “Change email” -> “CHANGE”

@farhan3

Very long time ago, I posted it.

After all, I could not access GMSL cameras in the Python code.
Instead of, you could find GMSL to USB adapters on the web.
For AR0231 sensors, following would he helpful;

Thanks,