0

I have been detecting circles in frames from a video feed.

The script will capture a frame, detect any circle/s and then analyse them before taking another frame to repeat the process all over again.

Each time I ran this, the script would take the first frame, detect the circle/s and then once all circles had been analysed in that frame a breakpoint would occur with "Invalid address specified to RtlValidateHeap".

I commented out the entire script and slowly narrowed it down to where I was able to determine that it was the HoughCircles function that was causing the problem.

Has anyone else experienced this?

This is the function for what it is worth:

HoughCircles(
        greyGB, // Mat input source
        circles, // vector<vec3f> output vector that stores sets of 3 values: x_{c}, y_{c}, r for each detected circle.
        CV_HOUGH_GRADIENT, // detection method
        1, // The inverse ratio of resolution (size of image / int)
        grey.rows / 8, // minimum distance between center of two circles
        120, // Upper threshold for the internal Canny edge detector (should be 3x next number)
        40, // Threshold for center detection (minimum number of votes) (lower this if no circles detected)
        12, // Minimum radius to be detected. If unknown, put zero as default.
        80 // Maximum radius to be detected. If unknown, put zero as default
        );
rnrover
  • 15
  • 3

1 Answers1

0

It would seem that the answer is that the MSVS2013 installation is "incompatible" with the opencv2.4.10 in this instance. The answer was to forget MSVS13 and install MS Visual C++ 2010 instead. The only tricky bit with that is finding a registration key to activate the free version of MSVC10. Use this one: 6VPJ7-H3CXH-HBTPT-X4T74-3YVY7

Otherwise, once you have that sorted, follow these instructions to configure opencv in MSVC10: Installing OpenCV 2.4.3 in Visual C++ 2010 Express

All good now!

Community
  • 1
  • 1
rnrover
  • 15
  • 3