OpenCV error: (-215:Assertion failed) number < max_number in function ‘cv::icvExtractPattern‘ 解决方法

这篇具有很好参考价值的文章主要介绍了OpenCV error: (-215:Assertion failed) number < max_number in function ‘cv::icvExtractPattern‘ 解决方法。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

使用opencv4.7.0的VideoCapture时遇到问题

[ERROR:0@0.286] global cap.cpp:166 cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.7.0) D:\gitlabrunner\builds\9mBtm_2r\0\3rdparty\opencv-build\opencv\modules\videoio\src\cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'cv::icvExtractPattern'

 运行debug模式打印信息

[ INFO:0@0.060] global videoio_registry.cpp:232 cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(9, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930); OBSENSOR(920)
[ INFO:0@0.061] global backend_plugin.cpp:383 cv::impl::getPluginCandidates Found 3 plugin(s) for FFMPEG
[ INFO:0@0.061] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load G:\project\featurebooster_cpp\build\Debug\opencv_videoio_ffmpeg470_64d.dll => FAILED
[ INFO:0@0.062] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg470_64d.dll => FAILED
[ INFO:0@0.062] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg470_64.dll => FAILED
[ INFO:0@0.063] global backend_plugin.cpp:383 cv::impl::getPluginCandidates Found 2 plugin(s) for GSTREAMER
[ INFO:0@0.063] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load G:\project\featurebooster_cpp\build\Debug\opencv_videoio_gstreamer470_64d.dll => FAILED
[ INFO:0@0.063] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_gstreamer470_64d.dll => FAILED
[ INFO:0@0.063] global backend_plugin.cpp:383 cv::impl::getPluginCandidates Found 2 plugin(s) for INTEL_MFX
[ INFO:0@0.063] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load G:\project\featurebooster_cpp\build\Debug\opencv_videoio_intel_mfx470_64d.dll => FAILED
[ INFO:0@0.064] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_intel_mfx470_64d.dll => FAILED
[ INFO:0@0.128] global cap_msmf.cpp:1027 CvCapture_MSMF::configureHW MSMF: Using D3D11 video acceleration on GPU device: Intel(R) UHD Graphics 770
OpenCV(4.7.0) Error: Assertion failed (number < max_number) in cv::icvExtractPattern, file D:\gitlabrunner\builds\9mBtm_2r\0\3rdparty\opencv-build\opencv\modules\videoio\src\cap_images.cpp, line 267
[ERROR:0@0.353] global cap.cpp:166 cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.7.0) D:\gitlabrunner\builds\9mBtm_2r\0\3rdparty\opencv-build\opencv\modules\videoio\src\cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'cv::icvExtractPattern'

错误信息红色加粗,发现是运行时load视频编解码用的ddl失败。尝试把需要的opencv_videoio_ffmpeg470_64d.dll放到build/debug文件夹(可执行.exe同路径)下即可。ddl可在opencv库中的bin文件夹找到,如果没有opencv_videoio_ffmpeg470_64d.dll,可使用opencv_videoio_ffmpeg470_64.dll。

具体步骤:

把opencv_videoio_ffmpeg470_64.dll拷贝到需要运行的exe的同文件。

in function 'cv::icvextractpattern,opencv,图像处理,c++

VideoWriter等其他视频编解码接口遇到相同问题解决方法相同。文章来源地址https://www.toymoban.com/news/detail-771279.html

到了这里,关于OpenCV error: (-215:Assertion failed) number < max_number in function ‘cv::icvExtractPattern‘ 解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包