I've asked this question on opencv.org, without any luck, so no I hope that someone here can help me.
I am developing a face/eye tracking software. To measure some values from the eyes (blinks for example). But when I want to use the method
cv::findContour()
The program crashes with a : "Windows has triggered a breakpoint in eyeTracking.exe....." No error message from opencv in the console.
m = ~currentWebCamFrame(trackP.EyePosition(false));
cv::cvtColor(m,n, CV_RGB2GRAY);
cv::threshold(n, m, threshold-value, 255,CV_THRESH_BINARY);
cv::erode(m, n, cv::Mat(),cv::Point(-1,-1),n_erode_dilate);
cv::dilate(n, m, cv::Mat(),cv::Point(-1,-1),n_erode_dilate);
test = m.clone();
if((!test.empty()) && (test.type() == CV_8UC1)){
std::vector< std::vector<cv::Point> > contours;
cv::findContours( test, contours, CV_RETR_EXTERNAL,CV_CHAIN_APPROX_NONE );
};
I've searched the internet and found a couple of similar posts like this, without any solution.
My post @ opencv.org : http://answers.opencv.org/question/12887/opencvfindcontour-crashes-v244-ms-visual-studio/ Where the image is visible right before the findContour is called.
Ive tried to solve this now for a couple of days, without any luck. So I really hope that someone here can help me fix this problem.
edit: When clicking on continue on the breakpoint window, this message comes up:
Unhandled exception at 0x770540f2 in eyeTracking.exe: 0xC0000374: A heap is damaged.
Thanks!