An example using the Hough circle detector
#include <iostream>
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)
{
"{help h ||}{@image|../data/board.jpg|}"
);
if (parser.has("help"))
{
help();
return 0;
}
string filename = parser.get<string>("@image");
if (filename.empty())
{
help();
cout << "no image_name provided" << endl;
return -1;
}
{
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;
}