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
fb456eb6
Commit
fb456eb6
authored
Nov 21, 2016
by
LaurentBerger
Committed by
Alexander Alekhin
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #7691 from LaurentBerger:I7676
* Solve issue 7676 * I7676 bis
parent
866f8eb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
detect_blob.cpp
samples/cpp/detect_blob.cpp
+9
-9
detect_mser.cpp
samples/cpp/detect_mser.cpp
+10
-10
No files found.
samples/cpp/detect_blob.cpp
View file @
fb456eb6
...
...
@@ -21,14 +21,14 @@ static String Legende(SimpleBlobDetector::Params &pAct)
String
s
=
""
;
if
(
pAct
.
filterByArea
)
{
String
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
minArea
))
->
str
();
String
sup
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
maxArea
))
->
str
();
String
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
minArea
).
str
();
String
sup
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
maxArea
).
str
();
s
=
" Area range ["
+
inf
+
" to "
+
sup
+
"]"
;
}
if
(
pAct
.
filterByCircularity
)
{
String
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
minCircularity
))
->
str
();
String
sup
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
maxCircularity
))
->
str
();
String
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
minCircularity
).
str
();
String
sup
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
maxCircularity
).
str
();
if
(
s
.
length
()
==
0
)
s
=
" Circularity range ["
+
inf
+
" to "
+
sup
+
"]"
;
else
...
...
@@ -36,7 +36,7 @@ static String Legende(SimpleBlobDetector::Params &pAct)
}
if
(
pAct
.
filterByColor
)
{
String
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
blobColor
))
->
str
();
String
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
blobColor
).
str
();
if
(
s
.
length
()
==
0
)
s
=
" Blob color "
+
inf
;
else
...
...
@@ -44,8 +44,8 @@ static String Legende(SimpleBlobDetector::Params &pAct)
}
if
(
pAct
.
filterByConvexity
)
{
String
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
minConvexity
))
->
str
();
String
sup
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
maxConvexity
))
->
str
();
String
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
minConvexity
).
str
();
String
sup
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
maxConvexity
).
str
();
if
(
s
.
length
()
==
0
)
s
=
" Convexity range["
+
inf
+
" to "
+
sup
+
"]"
;
else
...
...
@@ -53,8 +53,8 @@ static String Legende(SimpleBlobDetector::Params &pAct)
}
if
(
pAct
.
filterByInertia
)
{
String
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
minInertiaRatio
))
->
str
();
String
sup
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
maxInertiaRatio
))
->
str
();
String
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
minInertiaRatio
).
str
();
String
sup
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
maxInertiaRatio
).
str
();
if
(
s
.
length
()
==
0
)
s
=
" Inertia ratio range ["
+
inf
+
" to "
+
sup
+
"]"
;
else
...
...
samples/cpp/detect_mser.cpp
View file @
fb456eb6
...
...
@@ -73,25 +73,25 @@ struct MSERParams
static
String
Legende
(
MSERParams
&
pAct
)
{
String
s
=
""
;
String
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
minArea
))
->
str
();
String
sup
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
maxArea
))
->
str
();
String
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
minArea
).
str
();
String
sup
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
maxArea
).
str
();
s
=
" Area["
+
inf
+
","
+
sup
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
delta
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
delta
).
str
();
s
+=
" del. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
pAct
.
maxVariation
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
pAct
.
maxVariation
).
str
();
s
+=
" var. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
minDiversity
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
minDiversity
).
str
();
s
+=
" div. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
pass2Only
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
pass2Only
).
str
();
s
+=
" pas. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
maxEvolution
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
maxEvolution
).
str
();
s
+=
"RGb-> evo. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
areaThreshold
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
areaThreshold
).
str
();
s
+=
" are. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
minMargin
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
minMargin
).
str
();
s
+=
" mar. ["
+
inf
+
"]"
;
inf
=
static_cast
<
ostringstream
*>
(
&
(
ostringstream
()
<<
(
int
)
pAct
.
edgeBlurSize
))
->
str
();
inf
=
static_cast
<
const
ostringstream
&>
(
ostringstream
()
<<
(
int
)
pAct
.
edgeBlurSize
).
str
();
s
+=
" siz. ["
+
inf
+
"]"
;
return
s
;
}
...
...
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