在读取视频文件调用默认的摄像头cv.VideoCapture(0)
会出现下面的视频格式问题
CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(unsupported media type)
解决的方法:
调用参数:cv.CAP_DSHOW
cv.VideoCapture(0 + cv.CAP_DSHOW)
在读取视频文件调用默认的摄像头cv.VideoCapture(0)
会出现下面的视频格式问题
CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(unsupported media type)
调用参数:cv.CAP_DSHOW
cv.VideoCapture(0 + cv.CAP_DSHOW)