Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv::Exception at memory location 0x000000484DBDDFA0.

When i run my program in VS 2015 this is the error im getting :

Unhandled exception at 0x00007FFA3A268B9C in opencv.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000484DBDDFA0.

my program is :


include <stdio.h>

include <opencv cv.h="">

include <opencv highgui.h="">

include <opencv cxcore.h="">

/------ Declaration des variables globales ------/ char key; CvHaarClassifierCascade cascade; CvMemStorage *storage; /---------- Declaration des fonctions -----------/ void detectFaces(IplImage *img); /------------------------------------------------/ int main(void) { / Declaration des variables */ CvCapture *capture; IplImage *img; const char *filename = "C:Users\Acer\Desktop\faceDetect\haarcascade_frontalface_alt.xml";

/* Chargement du classifieur */
cascade = (CvHaarClassifierCascade*)cvLoadHaarClassifierCascade(filename, cvSize(24, 24));

/* Ouverture du flux video de la camera */
capture = cvCreateCameraCapture(-1);

// Ouverture d'un fichier video  
//capture = cvCreateFileCapture("C:Users\Acer\Desktop\faceDetect\cam.avi");  

/* Initialisation de l'espace memoire */
storage = cvCreateMemStorage(0);

/* Creation d'une fenetre */
cvNamedWindow("Window-FT", 1);

/* Boucle de traitement */
while (key != 'q')
{
    img = cvQueryFrame(capture);
    detectFaces(img);
    key = cvWaitKey(10);
}

/* Liberation de l'espace memoire*/
cvReleaseCapture(&capture);
cvDestroyWindow("Window-FT");
cvReleaseHaarClassifierCascade(&cascade);
cvReleaseMemStorage(&storage);

return 0;

} /------------------------------------------------/ void detectFaces(IplImage img) { / Declaration des variables */ int i; CvSeq *faces = cvHaarDetectObjects(img, cascade, storage, 1.1, 3, 0, cvSize(40, 40));

for (i = 0; i<(faces ? faces->total : 0); i++)
{
    CvRect *r = (CvRect*)cvGetSeqElem(faces, i);
    cvRectangle(img, cvPoint(r->x, r->y), cvPoint(r->x + r->width, r->y + r->height), CV_RGB(255, 0, 0), 1, 8, 0);
}

cvShowImage("Window-FT", img);

}


click to hide/show revision 2
No.2 Revision

updated 2016-01-21 08:38:06 -0600

berak gravatar image

cv::Exception at memory location 0x000000484DBDDFA0.

When i run my program in VS 2015 this is the error im getting :

Unhandled exception at 0x00007FFA3A268B9C in opencv.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000484DBDDFA0.

my program is :


include <stdio.h>

include <opencv cv.h="">

include <opencv highgui.h="">

include <opencv cxcore.h="">

/------

#include <stdio.h>  
#include <opencv/cv.h>  
#include <opencv/highgui.h>  
#include <opencv/cxcore.h>  
/*------ Declaration des variables globales ------/
------*/
char key;
CvHaarClassifierCascade cascade;
*cascade;
CvMemStorage *storage;
/---------- /*---------- Declaration des fonctions -----------/
-----------*/
void detectFaces(IplImage *img);
/------------------------------------------------/
/*------------------------------------------------*/
int main(void)
{
    / /* Declaration des variables */
    CvCapture *capture;
    IplImage *img;
    const char *filename = "C:Users\Acer\Desktop\faceDetect\haarcascade_frontalface_alt.xml";

"C:Users\Acer\Desktop\faceDetect\haarcascade_frontalface_alt.xml";

    /* Chargement du classifieur */
 cascade = (CvHaarClassifierCascade*)cvLoadHaarClassifierCascade(filename, cvSize(24, 24));

 /* Ouverture du flux video de la camera */
 capture = cvCreateCameraCapture(-1);

 // Ouverture d'un fichier video  
 //capture = cvCreateFileCapture("C:Users\Acer\Desktop\faceDetect\cam.avi");  

 /* Initialisation de l'espace memoire */
 storage = cvCreateMemStorage(0);

 /* Creation d'une fenetre */
 cvNamedWindow("Window-FT", 1);

 /* Boucle de traitement */
 while (key != 'q')
 {
     img = cvQueryFrame(capture);
     detectFaces(img);
     key = cvWaitKey(10);
 }

 /* Liberation de l'espace memoire*/
 cvReleaseCapture(&capture);
 cvDestroyWindow("Window-FT");
 cvReleaseHaarClassifierCascade(&cascade);
 cvReleaseMemStorage(&storage);

 return 0;

} /------------------------------------------------/ /*------------------------------------------------*/ void detectFaces(IplImage img) *img) { / /* Declaration des variables */ int i; CvSeq *faces = cvHaarDetectObjects(img, cascade, storage, 1.1, 3, 0, cvSize(40, 40));

40));

    for (i = 0; i<(faces ? faces->total : 0); i++)
 {
     CvRect *r = (CvRect*)cvGetSeqElem(faces, i);
     cvRectangle(img, cvPoint(r->x, r->y), cvPoint(r->x + r->width, r->y + r->height), CV_RGB(255, 0, 0), 1, 8, 0);
 }

 cvShowImage("Window-FT", img);
}

}