Tag: opencvdotnet

OpenCV:cvHoughCircles使用中出错

我使用cvHoughCircles在下图中找到两个白色椭圆: 我首先使用阈值来定位白色区域,然后使用霍夫变换。 但输出结果不正确,如下所示: 我无法理解发生了什么? 为什么它检测到3个圆圈以及为什么只有一个被正确检测? 有什么建议? 以下是我的代码: #include “opencv2/highgui/highgui.hpp” #include “opencv2/imgproc/imgproc.hpp” #include #include #include #include #include #include “opencv/cv.h” #include “opencv/highgui.h” #include #include using namespace cv; using namespace std; int main( ) { IplImage* image = cvLoadImage( “testing.bmp”, CV_LOAD_IMAGE_GRAYSCALE ); IplImage* src = cvLoadImage(“testing.bmp”); CvMemStorage* storage = cvCreateMemStorage(0); cvThreshold( src, src, 200, 255, CV_THRESH_BINARY ); CvSeq* […]