I use RPI camera module v2,it can get high fps with gst-launch-1.0 in terminal like below
gst-launch-1.0 rkv4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1280,height=720, framerate=60/1 ! videoconvert ! kmssink
but when I use opencv 3.4 with python code (like below) to open camera,it get only 10 FPS and very high cpu loading
cap = cv2.VideoCapture(‘rkv4l2src device=/dev/video0 io-mode=4 ! video/x-raw,format=NV12,width=1280,height=720, framerate=60/1 ! videoconvert ! appsink’)
If I remove ‘videoconvert’ from pipeline,FPS can up to 60 and more less CPU usage,but image will show in gray. so I think the problem is in ‘videoconvert’ plugin.
How can I improve ‘videoconvert’ performance?