szdxlyx 2014-12-15 11:07 采纳率: 0%
浏览 10806

Exception at memory location 求解决

我的是vs2010+opencv2.4.9 在调试运行时有时会出现这个问题:Unhandled exception at 0x75af812f in Contours.exe: Microsoft C++ exception: cv::Exception at memory location 0x0014eac8..
比如一个寻找二值图像轮廓并绘制的程序,源程序为:
#include "stdio.h"
#include "iostream"
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace std;
using namespace cv;

int main()
{
Mat image=imread("C:\Users\Administrator\Desktop\images\binary.bmp");
vector>contours;
findContours(image,contours,CV_RETR_EXTERNAL,CV_CHAIN_APPROX_NONE);
Mat result(image.size(),CV_8U,Scalar(255));
drawContours(result,contours,-1,Scalar(0,0,255),1);
namedWindow("show");
imshow("show",result);
waitKey();
}
这个问题困扰了我很久,求大神解救

  • 写回答

5条回答 默认 最新

  • devmiao 2014-12-15 12:43
    关注

    Mat image=imread("C:\Users\Administrator\Desktop\images\binary.bmp");

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器