解决cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can‘t find starting number 报错问题

环境:linux

在用cv::VideoCapture cap("video/test.avi")读取视频时,报错:

OpenCV(4.5.1) opencv-4.5.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): video/test.avi in function 'icvExtractPattern'

啥情况?

看下icvExtractPattern源码(中文是本人标注):

std::string icvExtractPattern(const std::string& filename, unsigned *offset)
{
    size_t len = filename.size();
    CV_Assert(!filename.empty());
    CV_Assert(o

你可能感兴趣的:(数字图像处理,c++)