|
小弟的代码:
#-*- coding: utf-8 -*-
import face_recognition
import dlib
import cv2
import time
from exceptions import Exception
# 调用openCV 库,获取摄像头影像
stream = cv2.VideoCapture(0)
#stream.set(6,cv2.VideoWriter_fourcc(*'MJPG'))
stream.set(6,cv2.VideoWriter_fourcc('M','J','P','G'))
stream.set(3,640)
stream.set(4,480)
stream.set(5,30)
运行起来出这个错误:
(process:1301): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
VIDEOIO ERROR: V4L: Property <unknown property string>(6) not supported by device
VIDEOIO ERROR: V4L2: Unable to get property <unknown property string>(6) - Invalid argument
我已经把opencv重新编译 带了V4L=ON 这个参数,请问这个问题怎么解决呢
|
|