Hi folks,
I'm writing a simple tracking program in visual studio 2010 and have this error.
My program works fine --it just read an image from a video sequence in a loop, classify blobs, and track them--, but when it loads the image number 301, in the middle of the video sequence, while calling the function:
cvUpdateTracks(blobs, trks, 10.0, 10);
I got this error:
Run-Time Check Failure #3 - The variable 'track' is being used without being initialized.
I have no variable called 'track' in my code... do you have any idea what could be the problem?
Thank you!
Here you have some lines of my code:
unsigned int result = cvLabel(&img_etiq, labelImg, blobs);
threshold(matblobs, matblobs, 0.4*maxval8, 255, CV_THRESH_BINARY);
IplImage img_etiq=matblobs;
cvSetImageROI(&img_etiq, cvRect(0, 0, 320, 240));
IplImage *labelImg = cvCreateImage(cvGetSize(&img_etiq), IPL_DEPTH_LABEL, 1);
CvBlobs blobs;
unsigned int result = cvLabel(&img_etiq, labelImg, blobs);
[...]
cvFilterByArea(blobs, 4, 1000);
ERROR-> cvUpdateTracks(blobs, trks, 10.0, 10);