Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Access CSI camera on Jetson platform
Browse files Browse the repository at this point in the history
  • Loading branch information
minghongx committed May 6, 2023
1 parent 3e3bc97 commit c471d15
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/jetbot.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import atexit
from typing import Optional

import cv2
from adafruit_motorkit import MotorKit

cam = cv2.VideoCapture(
"nvarguscamerasrc sensor-id=0 !"
"video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1 ! "
"nvvidconv flip-method=0 ! "
"video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! "
"videoconvert ! "
"video/x-raw, format=(string)BGR ! appsink"
, cv2.CAP_GSTREAMER)

_kit = MotorKit()

lmotor = _kit.motor1
Expand Down

0 comments on commit c471d15

Please sign in to comment.