Hello everybody.. .
i've got a problem when compiling my project
Here is my error message.
C:\Qt\2010.05\qt\mamayoquiero-build-desktop\release\mamayoquiero.exe exited with code -1073741515
Here is my code,
#include "opencv/cv.h"
#include "opencv/highgui.h"
#include "opencv2/opencv.hpp"
int main(int argc, char **argv)
{
CvCapture *capture;
IplImage *frame;
double t,ms = 0;
int key;
/* MURUPKAN KAMERANYA */
capture = cvCaptureFromCAM(0);
cvNamedWindow("video",1);
while (key != 'q')
{
t = (double)cvGetTickCount();
/* TAMPILKAN VIDEONYA */
frame = cvQueryFrame(capture);
cvShowImage("video",frame);
key = cvWaitKey(1);
/* DAPATKAN ELAPSED TIME */
t = (double)cvGetTickCount() -t;
ms += t / ((double)cvGetTickFrequency() * 1000.0);
/* OTOMATIS MENYIMPAN 3 DETIK SEKALI */
if (ceil(ms) >= 3000)
{
cvSaveImage("img.jpg",frame);
ms = 0;
}
}
/* BEBASKAN MEMORI */
cvReleaseCapture(&capture);
cvDestroyWindow("video");
return 0;
}
#include "opencv/cv.h"
#include "opencv/highgui.h"
#include "opencv2/opencv.hpp"
int main(int argc, char **argv)
{
CvCapture *capture;
IplImage *frame;
double t,ms = 0;
int key;
/* MURUPKAN KAMERANYA */
capture = cvCaptureFromCAM(0);
cvNamedWindow("video",1);
while (key != 'q')
{
t = (double)cvGetTickCount();
/* TAMPILKAN VIDEONYA */
frame = cvQueryFrame(capture);
cvShowImage("video",frame);
key = cvWaitKey(1);
/* DAPATKAN ELAPSED TIME */
t = (double)cvGetTickCount() -t;
ms += t / ((double)cvGetTickFrequency() * 1000.0);
/* OTOMATIS MENYIMPAN 3 DETIK SEKALI */
if (ceil(ms) >= 3000)
{
cvSaveImage("img.jpg",frame);
ms = 0;
}
}
/* BEBASKAN MEMORI */
cvReleaseCapture(&capture);
cvDestroyWindow("video");
return 0;
}
To copy to clipboard, switch view to plain text mode
In your opinion, why this is happening ? is it because i don't use any Qt Classes ?
thank you.
Added after 58 minutes:
hey i have solved the error by including stdio.h
but then, when i compile this project, another warning occured.
'key' is used uninitialized in this function.
what does this warning mean ? and how can i solve it ?
Added after 13 minutes:
ahh.. i can solve the previous warning by un-including the opencv.hpp
but still i can't compile it, this error message occured :
C:\Qt\2010.05\qt\mamayoquiero-build-desktop\release\mamayoquiero.exe exited with code -1073741515
i have googled about this error message, but still i can't find the explanation.
Any advice ?
Bookmarks