An example using the Hough circle detector
#include <iostream>
using namespace cv;
using namespace std;
static void help()
{
cout << "\nThis program demonstrates circle finding with the Hough transform.\n"
"Usage:\n"
"./houghcircles <image_name>, Default is ../data/board.jpg\n" << endl;
}
int main(
int argc,
char** argv)
{
const char* filename = argc >= 2 ? argv[1] : "../data/board.jpg";
{
help();
cout << "can not open " << filename << endl;
return -1;
}
vector<Vec3f> circles;
100, 30, 1, 30
);
for(
size_t i = 0;
i < circles.size();
i++ )
{
}
imshow(
"detected circles", cimg);
return 0;
}