openCV_FFMPEG **.opencv 2.4.11中的dll错误,用于IP摄像机访问
opencv_ffmpeg**.dll error in OpenCV 2.4.11 for IP Camera Access?
我尝试通过Windows上使用OpenCV 2.4.11从IP摄像机中获取实时流。但是,它会引起错误,当我调试A访问时, Unhandled exception at 0x0000000066E5377F (opencv_ffmpeg2411_64.dll) in opencvAxisExp.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
我使用下面的代码来做到;
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <iostream>
int main(int, char**) {
cv::VideoCapture vcap;
cv::Mat image;
// This works on a D-Link CDS-932L
//const std::string videoStreamAddress = "http://user:pass@ip_address:port/axis-cgi/jpg/image.cgi?camera=1&resolution=320x240&compression=25 ";
const std::string videoStreamAddress = "http:/user:pass@ip_address:port/axis-cgi/mjpg/video.cgi";
//open the video stream and make sure it's opened
if (!vcap.open(videoStreamAddress)) {
std::cout << "Error opening video stream or file" << std::endl;
return -1;
}
for (;;) {
if (!vcap.read(image)) {
std::cout << "No frame" << std::endl;
cv::waitKey();
}
cv::imshow("Output Window", image);
if (cv::waitKey(1) >= 0) break;
}
}
这是DLL错误还是这里缺少什么?你有什么建议吗?感谢您的任何评论。
我想您可能会缺少mjpg
后缀。请参阅此答案。
相关文章:
- 需要帮助在 c++ 中将字符串转换为字符 ----错误 "const char *" 类型的值不能用于初始化 "char" 类型的实体
- Arduino 用于语句错误。令牌之前的预期')' ';'。如何解决这个问题?
- 将 SFML 用于代码块C++出现错误库 SFML
- 用于查找数组中最大元素的出现次数的代码,给出分段错误
- 为什么这个分配器不适用于"std::allocate_shared"?奇怪的模板替换错误
- 我正在尝试学习如何在 c++ 中传递指针,但出现错误:没有用于调用"test"的匹配函数。我做错了什么?
- 谁能告诉我,程序中的错误是什么?该程序仅用于获取文件扩展名
- 我已经安装了用于c++编程的升华3,但在编写了一个简单的程序后,我遇到了以下错误
- 如何修复用于根据参数返回不同类型的模板类中的错误C2679?
- 致命错误:cuda.h:没有用于 c++ 的此类文件或目录
- 卤化物:较大图像的去马赛克算法错误.似乎适用于 16x16 图像
- 向量迭代器不兼容的错误,用于保存另一个向量的迭代器的向量
- MFC 对话框属性表用法在 VS 2017 中产生错误,适用于 VS 2013
- G++ (C++14) 链接器错误,用于处理 C++03 代码
- 回调方法显示错误,类型为"void(*)"的值不能用于初始化类型的实体
- C++天鹅座的错误;没有用于调用"std::basic_fstream..."的匹配函数
- 不能创建对象,构造函数错误(用于对象初始化)
- 是否有一种方法在试图写入文件的进程中生成错误?(用于测试目的)
- C++ "<<"运算符错误(用于引用向量的内容)
- Mergevec.obj:10个未解决的链接错误(用于haartraining的OpenCV样本收集)