Fix squares sample failure when a single file passed

This commit is contained in:
Alex Kalmuk 2021-04-27 11:06:10 +03:00
parent a08eac452e
commit b04d6a2d9b

View File

@ -123,14 +123,14 @@ static void findSquares( const Mat& image, vector<vector<Point> >& squares )
int main(int argc, char** argv)
{
static const char* names[] = { "pic1.png", "pic2.png", "pic3.png",
const char* names[] = { "pic1.png", "pic2.png", "pic3.png",
"pic4.png", "pic5.png", "pic6.png", 0 };
help(argv[0]);
if( argc > 1)
{
names[0] = argv[1];
names[1] = "0";
names[1] = 0;
}
for( int i = 0; names[i] != 0; i++ )