From b2678a01ee43167b15df2d614e49d52c0154b214 Mon Sep 17 00:00:00 2001 From: Gary Bradski Date: Sat, 4 Dec 2010 08:30:13 +0000 Subject: [PATCH] revamped --- samples/cpp/squares.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/samples/cpp/squares.cpp b/samples/cpp/squares.cpp index 1744fc53f..9c46f9ccd 100644 --- a/samples/cpp/squares.cpp +++ b/samples/cpp/squares.cpp @@ -1,5 +1,5 @@ // The "Square Detector" program. -// It loads several images subsequentally and tries to find squares in +// It loads several images sequentially and tries to find squares in // each image #include "opencv2/core/core.hpp" @@ -13,6 +13,20 @@ using namespace cv; using namespace std; +void help() +{ + cout << + "\nA program using pyramid scaling, Canny, contours, contour simpification and\n" + "memory storage (it's got it all folks) to find\n" + "squares in a list of images pic1-6.png\n" + "Returns sequence of squares detected on the image.\n" + "the sequence is stored in the specified memory storage\n" + "Call:\n" + "./squares\n" + "Using OpenCV version %s\n" << CV_VERSION << "\n" << endl; +} + + int thresh = 50, N = 11; const char* wndname = "Square Detection Demo"; @@ -129,7 +143,7 @@ int main(int argc, char** argv) { static const char* names[] = { "pic1.png", "pic2.png", "pic3.png", "pic4.png", "pic5.png", "pic6.png", 0 }; - + help(); namedWindow( wndname, 1 ); vector > squares;