OpenCV 拼接,C++ - 未处理的异常
OpenCV Stitching, C++ - Unhandled exception
我试图将三个图像拼接在一起。为此,我选择了OpenCV 2.4.10和Microsoft Visual C++ 2010 Express。
图像为1500x1500像素,读取时为CV_8UC3。
我正在构建 32 位,并且已经获得了一些使用 OpenCV 的其他东西,所以我想该项目已使用路径等正确设置。
奇怪的是,我只是偶尔收到此错误,并且只有当我尝试拼接两个以上的图像时。
这里是错误消息:
拼接测试中0x5841dcaa未处理的异常.exe: 0xC0000005:访问违规读取位置0x00000004。
之后,我会自动进入"Chores.cpp"的第 99 行或"TaskCollection.cpp"的第 189 行,所以我认为这是错误的根源。(路径 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src)
这是代码:
#include <iostream>
//OPENCV
#include <opencv2corecore.hpp>
#include <opencv2highguihighgui.hpp>
#include <opencv2imgprocimgproc.hpp>
//OPENCV STITCHING
#include <opencv2stitchingstitcher.hpp>
using namespace std;
using namespace cv;
int main(){
Mat panoramaImage;
vector<Mat> inputImages;
inputImages.push_back(imread("../../V1.bmp"));
inputImages.push_back(imread("../../V2.bmp"));
inputImages.push_back(imread("../../V3.bmp"));
Stitcher stitcher = Stitcher::createDefault();
Stitcher::Status stitcherStatus = stitcher.stitch(inputImages, panoramaImage);
imshow("Stitching Result", panoramaImage);
waitKey(0);
return 0;
}
有人有建议吗?
问题已解决 - 我发现在发布时,我的预处理器定义中有"_DEBUG;"。仍然很奇怪,错误只是偶尔发生...
相关文章:
- 如何修复链表类实现的未处理异常0xDDDDDDDD
- VisualC++ 2010 有没有办法找出有关未处理异常错误的更多详细信息
- C++ 程序中双链表的未处理异常
- 运算符重载时未处理<<异常
- 实验室中0x6BE20E11 (ucrtbased.dll) 的未处理异常.exe: 0xC0000005:访问冲突读取
- ImageMagick 的未处理异常
- 类数组大小为的未处理异常
- 尝试将构造函数设置为 0 - c++ 的未处理异常
- Dijkstra 中0x001e1078 s_Algorithm.exe的未处理异常:0xC0000005:访问冲突读取位置0xbaadf00d
- 运算符重载未处理异常
- 尝试使用 fread 读取文本文件时发生 'System.AccessViolationException' 类型的未处理异常
- c++中的Guard,在main中未处理异常时不调用析构函数
- 某些内存位置的未处理异常
- 错误 linkedlist .exe 中0x00D0345E处的未处理异常: 0xC0000005:访问违规写入位置0x
- 仅在发布模式下使用 glGenBuffer 的未处理异常 - QT
- 如何分析VS2010在调试模式下捕获的未处理异常
- glDrawArrays上的openGL未处理异常(GL_TRIANGLES,0,model.indicesCount)
- 使用Boost Spirit解析语法的未处理异常
- 解析"%Z" C++ 中将错误作为访问 voilation 的未处理异常给出?
- 为什么在win32计时器回调中引发的未处理异常未被调试器视为未处理异常