Any news on when next version of opencv4tegra is due out?
Ultimately, I need to run a CSI camera from OpenCV inside Python. I have a gstreamer pipe that almost works, but need to migrate to python. I would like to split the video stream into a high res stream for cuda processing and a low res stream for preview. The following command works, but slow (seems to run on the ARM cores) - thought is that videocrop and videoscale are not GPU enabled.
gst-launch -v nvcamerasrc fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvvidconv flip-method=2 tnr=6 ! ‘video/x-raw, width=(int)1920, height=(int)1080, format=(string)BGRx’ ! tee name=tp tp. ! queue max-size-buffers=4 ! ximagesink name=highres tp. ! queue ! videocrop left=240 right=240 ! videoscale ! ‘video/x-raw, width=(int)640, height=(int)480, format=(string)BGRx, pixel-aspect-ratio=(fraction)1/1’ ! ximagesink name=lowres
And I get the following warnings:
WARNING: from element /GstPipeline:pipeline0/GstXImageSink:lowres: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2854): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstXImageSink:lowres:
There may be a timestamping problem, or this computer is too slow.
The following almost works but high res image is blank. Speed looks reasonable.
gst-launch -v nvcamerasrc fpsRange=“30.0 30.0” ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvtee name=tp tp. ! nvvidconv flip-method=2 ! queue ! ‘video/x-raw, width=(int)640, height=(int)480, format=(string)BGRx, pixel-aspect-ratio=(fraction)1/1’ ! ximagesink name=lowres tp. ! nvvidconv flip-method=2 ! queue ! ximagesink name=highres
Can anyone give me an example the syntax to integrate either of the above into cv2 and python? The following fails to open the camera
mycam = cv2.VideoCapture(“gst-launch -v nvcamerasrc name=devkitCamera fpsRange="30.0 30.0" ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1’ ! nvvidconv flip-method=2”)