当前位置:网站首页>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
边栏推荐
- There are a group of students in the class who have got the test results in Chinese and mathematics. Please select the students whose total score is the first
- The source of everything, the choice of code branching strategy
- Installation and operation of orb-slam2 under ROS
- CMD CPM command summary
- How to reinstall win7 system?
- 复制列表时踩过的坑:浅拷贝与深拷贝
- Dataframe sorting: datetime format splitting; Delete a specific line; Group integration.
- Personally test five efficient and practical ways to get rid of orders, and quickly collect them to help you quickly find high-quality objects!
- Jsd-2204-cool shark Mall (Management Commodity module) -day02
- [untitled]
猜你喜欢
![[noip2001 popularization group] packing problem](/img/b7/1310b3e68d0ee016465fc069315af6.png)
[noip2001 popularization group] packing problem

STM——EXTI外部中断学习笔记

Parallelloopbody in opencv

snownlp库各功能及用法

Functions and usage of snownlp Library

LeetCode·每日一题·919.完全二叉树插入器·层次遍历·BFS

规范自己debug的流程

Anti electronic ink screen st7302

Implement a method to find the sum of the number k and m in the array
![[translation] safety. Value of sboms](/img/8b/1ad825e7c9b6a87ca1fea812556f3a.jpg)
[translation] safety. Value of sboms
随机推荐
canvas——绘制曲线——挂钟,饼图,五角星
Get twice the result with half the effort: learn the web performance test case design model
Golang 中‘...‘的用法
【C进阶】深入探索数据的存储(深度剖析+典例解读)
Method of manually cloning virtual machine in esxi6.7
canvas——绘制文本——饼图的修改
c语言分层理解(c语言函数)
ENVI_ Idl: create HDF5 file and write data (take writing GeoTIFF file to HDF file as an example) + detailed parsing
Safety margin of mass consumption
Nahamcon CTF 2022 babyrev reverse analysis
如何正确计算 Kubernetes 容器 CPU 使用率
Understand preloading and lazy loading, and learn slow animation
Detailed explanation of extended physics informedneural networks paper
js中数组排序的方法有哪些
[translation] cloud like internal load balancer for kubernetes?
How to design test cases according to the requirements of login testing?
Software testing post: Ali has three sides. Fortunately, he has made full preparations and has been offered
dataframe整理:datetime格式分拆;删除特定行;分组整合。
如何根据登录测试的需求设计测试用例?
[C language] deeply understand integer lifting and arithmetic conversion