当前位置:网站首页>Opencv error: (parameter or structure field)) unrecognized or unsupported array type in functon 'cvgetmat‘
Opencv error: (parameter or structure field)) unrecognized or unsupported array type in functon 'cvgetmat‘
2022-07-26 03:11:00 【Xuan yanru Liu】
1. Error message

2. Code
#include <iostream>
#include <libavutil/avutil.h>
#include <opencv2/highgui.hpp>
#include <opencv4/opencv2/imgproc.hpp>
main()
{
cv::VideoCapture videoshow;
cv::Mat image;
videoshow.open("/home/lfh/ picture /vedio_test.avi");
cv::namedWindow(" Read screen display ");
while(1)
{
videoshow.read(image);
cv::imshow(" Read screen display ", image);
waitKey(20);
}
videoshow.~VideoCapture();
return 0;
}
3. Reason and modification
The problem lies in the loop ,while(1) It means to always execute the code in the loop body , But the length of video file is limited , So when the video is finished, something goes wrong . Change the loop body to
while(videoshow.read(image))
{
cv::imshow(" Read screen display ", image);
waitKey(20);
}
that will do . Because if videoshow.read(image) Data can also be read , Returns the 1
边栏推荐
猜你喜欢

Opening method of win11 microphone permission

Opencv报错:(parameter or structure field))Unrecognized or unsupported array type in functon ‘cvGetMat‘

YOLOv3: An Incremental Improvement

URDF 语法详解

Installation and operation of orb-slam2 under ROS
![[sql] usage of self connection](/img/92/92474343b4b4e6ea60453b4799cb55.jpg)
[sql] usage of self connection

Oxycon 2022 network capture frontier conference is about to open!

How to close the case prompt icon of win11? Closing method of win11 case prompt Icon

File operation (I) -- File introduction and file opening and closing methods

经典面试问题——OOP语言的三大特征
随机推荐
Opencv 在图像上进行标注(画框+写字)
在混合云中管理数据库:八个关键注意事项
Hello World driver (II) - primary version
Dataframe sorting: datetime format splitting; Delete a specific line; Group integration.
What's good for starting a business with 10000 yuan? Is we media OK?
MySQL tutorial: MySQL database learning classic (from getting started to mastering)
Detailed explanation of extended physics informedneural networks paper
Golang 中‘...‘的用法
Multithreaded programming
STM32——DMA笔记
Opencv 以指定格式保存图片
What is the difference between heap memory and stack memory?
ENVI_ Idl: create HDF5 file and write data (take writing GeoTIFF file to HDF file as an example) + detailed parsing
STM32——PWM学习笔记
Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
如何用U盘进行装机?
重装Win7系统如何进行?
dataframe整理:datetime格式分拆;删除特定行;分组整合。
Nahamcon CTF 2022 babyrev reverse analysis
Service gateway (zuul)