图像处理42-霍夫圆变换

 使用 Hough 变换在灰度图像中查找圆。

void cv::HoughCircles(InputArray image,
                    OutputArray circles,
                    int method,
                    double dp,
                    double minDist,
                    double param1 = 100,
                    double param2 = 100,
                    int minRadius = 0,
                    int maxRadius = 0
                    )

该函数使用 Hough 变换的修改在灰度图像中查找圆。

例子: :

#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <math.h>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
Mat img, gray;
if( argc 

猜你喜欢

转载自blog.csdn.net/u013480226/article/details/124000544