在VisualStudio 2013中导致断点的OpenCV C++ HOW圆

在VisualStudio 2013中导致断点的OpenCV C++ HOW圆,c++,opencv,visual-studio-2013,C++,Opencv,Visual Studio 2013,我一直在从视频源中检测帧中的圆圈 脚本将捕获一帧,检测任何圆,然后分析它们,然后再拍摄另一帧,再次重复该过程 每次我运行这个脚本时,脚本都会获取第一帧,检测循环,然后在该帧中分析所有循环后,将出现一个断点,其中指定给RtlValidateHeap的地址无效 我对整个脚本进行了注释,并慢慢地将其缩小到我能够确定是HoughCircles函数导致了问题的地方 还有其他人经历过吗 这就是它的价值所在: HoughCircles( greyGB, // Mat input source

我一直在从视频源中检测帧中的圆圈

脚本将捕获一帧,检测任何圆,然后分析它们,然后再拍摄另一帧,再次重复该过程

每次我运行这个脚本时,脚本都会获取第一帧,检测循环,然后在该帧中分析所有循环后,将出现一个断点,其中指定给RtlValidateHeap的地址无效

我对整个脚本进行了注释,并慢慢地将其缩小到我能够确定是HoughCircles函数导致了问题的地方

还有其他人经历过吗

这就是它的价值所在:

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
        );

在本例中,答案似乎是MSVS2013安装与opencv2.4.10不兼容。答案是忘记MSVS13,而安装MS Visual C++ 2010代替。唯一棘手的是找到一个注册密钥来激活免费版本的MSVC10。使用这个:6VPJ7-H3CXH-HBTPT-X4T74-3YVY7

否则,排序后,请按照以下说明在MSVC10中配置opencv:

现在一切都好了