Hello everyone,
i’m working on the jetson TX2 where i’m trying to implement Yolo using the onBoard camera to test what is detects. the problem is that i don’t know which command should i type in order to tell the camera to displays a live video.(regardless of linking the camera to to work with Yolo).
I’ve looked this up and came to the result which i have to downlaod G-streamer G-streamer, which i don’t know how.
Thank you very much it works. I just have one more question. Do you an easy method that enables me to record a video using this on Board camera? . I’ve posted an independent topic regarding this because I’ve tried a lot of python scripts but unfortunately no work. All the scripts I tried return the following error :
Called with args:
Namespace(fps=30, image_height=480, image_width=640, rec_sec=5, rtsp_latency=200, rtsp_uri=None, text=‘TX2 DEMO’, ts_file=‘output’, use_rtsp=False, use_usb=False, video_dev=1)
OpenCV version: 4.1.2-dev
[ WARN:0] global /home/khaled/opencv/modules/videoio/src/cap_gstreamer.cpp (713) open OpenCV | GStreamer warning: Error opening bin: could not link nvarguscamerasrc0 to nvvconv0, nvarguscamerasrc0 can’t handle caps video/x-raw(memory:NVMM), width=(int)2592, height=(int)1458, format=(string)I420, framerate=(fraction)30/1
[ WARN:0] global /home/khaled/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Failed to open camera!
another script returned the following error:
python3 cam_capture.py
[ WARN:0] global /home/khaled/opencv/modules/videoio/src/cap_gstreamer.cpp (1759) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0] global /home/khaled/opencv/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/khaled/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
select timeout
VIDIOC_DQBUF: Resource temporarily unavailable
Traceback (most recent call last):
File “cam_capture.py”, line 57, in
cv2.imshow(‘frame’,frame)
cv2.error: OpenCV(4.1.2-dev) /home/khaled/opencv/modules/highgui/src/window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow’
Thank you very much for your help. It actually works except that i didn’t find the command in the Documentation above that enables me to capture an Image.
where: 1 stands for the video snap which practically means image. But the problem is that a video snap(image) is being taken from a video that has a resolution of 640480, where the CSI onboard_camera offers 19201080.
So I’m trying to capture an image using full resolution of the On_board CSI camera.
the following command makes it possible to capture a video with 1920*1080 :