Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
b2678a01
Commit
b2678a01
authored
Dec 04, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revamped
parent
dd2cace5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
squares.cpp
samples/cpp/squares.cpp
+16
-2
No files found.
samples/cpp/squares.cpp
View file @
b2678a01
// The "Square Detector" program.
// It loads several images s
ubsequent
ally and tries to find squares in
// It loads several images s
equenti
ally 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
<<
"
\n
A 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
<
vector
<
Point
>
>
squares
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment