1.外接USB摄像头
VideoCapture cap(1)
VideoCapture cap(2)......
2.读取板上的摄像头
VideoCapture cap("nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)I420, framerate=(fraction)24/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink");
test camera
终端 写入命令:nvgstcapture-1.0
close:q
capture:j
reference:
https://my.oschina.net/u/1046919/blog/1554452?utm_medium=referral