# Can't open CSI camera

**URL:** <https://forum.theavr.org/t/cant-open-csi-camera/173>\
**Category:** AVR Drone Software\
**Created:** [September 21, 2022, 3:26am UTC](https://forum.theavr.org/t/cant-open-csi-camera/173 "2022-09-21T03:26:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunter](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@Hunter](https://forum.theavr.org/u/Hunter)\
**Post date:** [September 21, 2022, 3:26am UTC](https://forum.theavr.org/t/cant-open-csi-camera/173/1 "2022-09-21T03:26:09Z")

</div>

Our CSI camera works when using `nvgstcapture-1.0`  
And it shows up when using `v4l2-ctl`

```auto
vi-output, imx219 7-0010 (platform:54080000.vi:0):
	/dev/video0

```

But when I try to open it using opencv:

```auto
>>> connection_string = f"v4l2src device=/dev/video0 io-mode=2 ! image/jpeg,width=1280,height=720,framerate=60/1 ! jpegparse ! nvv4l2decoder mjpeg=1 ! nvvidconv ! videorate ! video/x-raw,format=BGRx,framerate=30/1 ! videoconvert ! video/x-raw,width=1280,height=720,format=BGRx ! appsink"
>>> cv = cv2.VideoCapture(connection_string)
>>> print(cv.read())
(False, None)
>>>

```

I coppied most of this out of the **capture\_device.py**

---

<div class="post-metadata">

**Author:** ![bhanner-bell](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/bhanner-bell/32/20_2.png) [@bhanner-bell](https://forum.theavr.org/u/bhanner-bell)\
**Post date:** [September 22, 2022, 1:47pm UTC](https://forum.theavr.org/t/cant-open-csi-camera/173/2 "2022-09-22T13:47:35Z")

</div>

Hey Hunter,

capture\_device.py is from a time when we used python to perform Apriltag detection. We’ve now moved to using the Nvidia Apriltag library so we can make use of the GPU on the Jetson.

We use the [Libargus API](https://docs.nvidia.com/jetson/l4t-multimedia/group__LibargusAPI.html) now to get the camera images into [our software](https://github.com/bellflight/AVR-2022/blob/main/VMC/apriltag/c/src/avrapriltags.cpp#L63).

Are you trying to use the camera outside of the Apriltag module or are you seeing the Apriltag module fail?
