some improvements on tutorials

This commit is contained in:
Suleyman TURKMEN
2017-07-26 08:39:53 +03:00
parent 8e6e05ed3f
commit 89480801b8
41 changed files with 261 additions and 188 deletions
@@ -21,7 +21,7 @@ namespace
const std::string usage = "Usage : tutorial_HoughCircle_Demo <path_to_input_image>\n";
// initial and max values of the parameters of interests.
const int cannyThresholdInitialValue = 200;
const int cannyThresholdInitialValue = 100;
const int accumulatorThresholdInitialValue = 50;
const int maxAccumulatorThreshold = 200;
const int maxCannyThreshold = 255;
@@ -55,15 +55,13 @@ int main(int argc, char** argv)
{
Mat src, src_gray;
if (argc < 2)
{
std::cerr<<"No input image specified\n";
std::cout<<usage;
return -1;
}
// Read the image
src = imread( argv[1], IMREAD_COLOR );
String imageName("../data/stuff.jpg"); // by default
if (argc > 1)
{
imageName = argv[1];
}
src = imread( imageName, IMREAD_COLOR );
if( src.empty() )
{