Ask Your Question

George123's profile - activity

2013-10-03 20:46:08 -0600 received badge  Student (source)
2013-05-15 12:34:36 -0600 asked a question Heap-Error with findContours

When I try function findContours() I get the Run-Error: "Debug Assertion Failed! ... File:f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c Line:1322 ... Expression:_CrtIsValidHeapPointer(pUserData) ..."

My Code is very simple:

  src = imread("D:/A1/auto5.jpg", 1 );
  cvtColor( src, src_gray, COLOR_BGR2GRAY );
  blur( src_gray, src_gray, Size(3,3) );
  Mat canny_output;
  vector<vector<Point> > contours;
  vector<Vec4i> hierarchy;
  Canny( src_gray, canny_output, thresh, thresh*2, 3 );
  findContours( canny_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );*

I'am using MS Visual Studio 2012

Any ideas?