Xcode7.3.1-为什么无法使用退出代码找到并结束图像:255

时间:2016-07-13 08:22:57

标签: c++ xcode

#include <iostream>
#include <string>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>

using namespace std;
using namespace cv;



int main()
{
char filename[] = "IMG_0851";
Mat image; //create an image matrix

我想分析灰度图像

image = cvLoadImage(filename,CV_LOAD_IMAGE_GRAYSCALE); //load image in grayscale directly
if (image.empty())
{

    cout << "Image could not be found" << endl;
    return -1;
}

imshow("Image in RGB", image);


cvWaitKey(0); //wait for a keystroke in the window

return 0;
}

构建成功但是,无法找到图像&amp;程序结束退出代码:255。

0 个答案:

没有答案