cv :: Visual Studio中内存位置0x0000000296AFDAD0的异常

时间:2015-02-10 06:35:12

标签: c++ opencv

我正试图从图像矩阵中获取特征值。我尝试使用流媒体视频并没有收到错误。当我试图找到存储图像的特征值时,我得到cv::Exception at memory location 0x0000000296AFDAD0 error.

#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <iostream>
#include <stdio.h>

using namespace std;
using namespace cv;
void calceigen(Mat covarm){
Mat eigenvalues;
Mat eigenvectors;
eigen(covarm, eigenvalues, eigenvectors);
cout << eigenvalues;
cout << eigenvectors;
}

void covard(Mat g)
{
Mat covarm;
Mat b;
calcCovarMatrix(g, covarm, b, CV_COVAR_COLS, CV_64F);
calceigen(covarm);

}


int main(int argc, const char** argv)
{ 



cv::Mat image = cv::imread("C:/Users/DellPc/Desktop/images1.jpg");
//setup image files used in the capture process
Mat grayscaleFrame;
Mat graysc;







    //convert captured image to gray scale and equalize
    //cvtColor(image, grayscaleFrame, CV_BGR2GRAY);


    //resize(grayscaleFrame, graysc, Size(16, 16), 0, 0, INTER_LANCZOS4);

    int rows = image.rows;
    int cols = image.cols;
    cv::Size s = image.size();
    rows = s.height;
    cols = s.width;
    cout << rows << endl;
    cout << cols << endl;

    covard(image);
    //find faces and store them in the vector array
    imshow("small", image);
    waitKey(33);

return 0;
}

0 个答案:

没有答案