Is jetson nano compatible with Rpi camera V2.1?

Hi I’m trying to use Rpi Camera with Jetson Nano for lane detection.

When I check with “ls /dev/video*”, I can see “/dev/video0” and streaming with gstreamer also works well.

But, when i try to deal camera with opencv function “cv2.VideoCapture(0)”, it always shows green window.

Code works on Rpi 3B+ with Pi cam v2.1 and not on Jetson Nano. Is there any solution for my problem?

Hi fbkc0331, see this post for creating cv2.VideoCapture() with MIPI CSI camera:

https://devtalk.nvidia.com/default/topic/1064372/jetson-nano/how-to-slove-opencv-green-screen-/post/5389765/#5389765

You may wish to use a lower resolution than the post above, like so:

cap = cv2.VideoCapture('nvarguscamerasrc ! video/x-raw(memory:NVMM), width=1280, height=720, format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink' , cv2.CAP_GSTREAMER)

Thank’s for your help! Problem solved. Have a great day :)