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
dfc508bb
Commit
dfc508bb
authored
May 11, 2015
by
laurentBerger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
problem float constant and position of > in vector
parent
05bc7621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
exampleBLOB.cpp
samples/cpp/exampleBLOB.cpp
+12
-11
No files found.
samples/cpp/exampleBLOB.cpp
View file @
dfc508bb
...
@@ -16,7 +16,7 @@ static void help()
...
@@ -16,7 +16,7 @@ static void help()
}
}
String
Legende
(
SimpleBlobDetector
::
Params
&
pAct
)
static
String
Legende
(
SimpleBlobDetector
::
Params
&
pAct
)
{
{
String
s
=
""
;
String
s
=
""
;
if
(
pAct
.
filterByArea
)
if
(
pAct
.
filterByArea
)
...
@@ -103,13 +103,13 @@ int main(int argc, char *argv[])
...
@@ -103,13 +103,13 @@ int main(int argc, char *argv[])
pDefaultBLOB
.
maxArea
=
5000
;
pDefaultBLOB
.
maxArea
=
5000
;
pDefaultBLOB
.
filterByCircularity
=
false
;
pDefaultBLOB
.
filterByCircularity
=
false
;
pDefaultBLOB
.
minCircularity
=
0.9
f
;
pDefaultBLOB
.
minCircularity
=
0.9
f
;
pDefaultBLOB
.
maxCircularity
=
std
::
numeric_limits
<
float
>::
max
()
;
pDefaultBLOB
.
maxCircularity
=
(
float
)
1e37
;
pDefaultBLOB
.
filterByInertia
=
false
;
pDefaultBLOB
.
filterByInertia
=
false
;
pDefaultBLOB
.
minInertiaRatio
=
0.1
f
;
pDefaultBLOB
.
minInertiaRatio
=
0.1
f
;
pDefaultBLOB
.
maxInertiaRatio
=
std
::
numeric_limits
<
float
>::
max
()
;
pDefaultBLOB
.
maxInertiaRatio
=
(
float
)
1e37
;
pDefaultBLOB
.
filterByConvexity
=
false
;
pDefaultBLOB
.
filterByConvexity
=
false
;
pDefaultBLOB
.
minConvexity
=
0.95
f
;
pDefaultBLOB
.
minConvexity
=
0.95
f
;
pDefaultBLOB
.
maxConvexity
=
std
::
numeric_limits
<
float
>::
max
()
;
pDefaultBLOB
.
maxConvexity
=
(
float
)
1e37
;
// Descriptor array (BLOB or MSER)
// Descriptor array (BLOB or MSER)
vector
<
String
>
typeDesc
;
vector
<
String
>
typeDesc
;
// Param array for BLOB
// Param array for BLOB
...
@@ -125,12 +125,8 @@ int main(int argc, char *argv[])
...
@@ -125,12 +125,8 @@ int main(int argc, char *argv[])
}
}
help
();
help
();
typeDesc
.
push_back
(
"BLOB"
);
pBLOB
.
push_back
(
pDefaultBLOB
);
pBLOB
.
back
().
filterByColor
=
true
;
pBLOB
.
back
().
blobColor
=
0
;
// This descriptor are going to be detect and compute BLOBS with
5
differents params
// This descriptor are going to be detect and compute BLOBS with
6
differents params
// Param for first BLOB detector we want all
// Param for first BLOB detector we want all
typeDesc
.
push_back
(
"BLOB"
);
// see http://docs.opencv.org/trunk/d0/d7a/classcv_1_1SimpleBlobDetector.html
typeDesc
.
push_back
(
"BLOB"
);
// see http://docs.opencv.org/trunk/d0/d7a/classcv_1_1SimpleBlobDetector.html
pBLOB
.
push_back
(
pDefaultBLOB
);
pBLOB
.
push_back
(
pDefaultBLOB
);
...
@@ -153,12 +149,17 @@ int main(int argc, char *argv[])
...
@@ -153,12 +149,17 @@ int main(int argc, char *argv[])
pBLOB
.
back
().
filterByInertia
=
true
;
pBLOB
.
back
().
filterByInertia
=
true
;
pBLOB
.
back
().
minInertiaRatio
=
0
;
pBLOB
.
back
().
minInertiaRatio
=
0
;
pBLOB
.
back
().
maxInertiaRatio
=
(
float
)
0.2
;
pBLOB
.
back
().
maxInertiaRatio
=
(
float
)
0.2
;
// Param for
Four
th BLOB detector we want ratio inertia
// Param for
fif
th BLOB detector we want ratio inertia
typeDesc
.
push_back
(
"BLOB"
);
typeDesc
.
push_back
(
"BLOB"
);
pBLOB
.
push_back
(
pDefaultBLOB
);
pBLOB
.
push_back
(
pDefaultBLOB
);
pBLOB
.
back
().
filterByConvexity
=
true
;
pBLOB
.
back
().
filterByConvexity
=
true
;
pBLOB
.
back
().
minConvexity
=
0.
;
pBLOB
.
back
().
minConvexity
=
0.
;
pBLOB
.
back
().
maxConvexity
=
(
float
)
0.9
;
pBLOB
.
back
().
maxConvexity
=
(
float
)
0.9
;
// Param for six BLOB detector we want blob with gravity center color equal to 0 bug #4321 must be fixed
typeDesc
.
push_back
(
"BLOB"
);
pBLOB
.
push_back
(
pDefaultBLOB
);
pBLOB
.
back
().
filterByColor
=
true
;
pBLOB
.
back
().
blobColor
=
0
;
itBLOB
=
pBLOB
.
begin
();
itBLOB
=
pBLOB
.
begin
();
vector
<
double
>
desMethCmp
;
vector
<
double
>
desMethCmp
;
...
@@ -180,7 +181,7 @@ int main(int argc, char *argv[])
...
@@ -180,7 +181,7 @@ int main(int argc, char *argv[])
// We can detect keypoint with detect method
// We can detect keypoint with detect method
vector
<
KeyPoint
>
keyImg
;
vector
<
KeyPoint
>
keyImg
;
vector
<
Rect
>
zone
;
vector
<
Rect
>
zone
;
vector
<
vector
<
Point
>>
region
;
vector
<
vector
<
Point
>
>
region
;
Mat
desc
,
result
(
img
.
rows
,
img
.
cols
,
CV_8UC3
);
Mat
desc
,
result
(
img
.
rows
,
img
.
cols
,
CV_8UC3
);
if
(
b
.
dynamicCast
<
SimpleBlobDetector
>
()
!=
NULL
)
if
(
b
.
dynamicCast
<
SimpleBlobDetector
>
()
!=
NULL
)
{
{
...
...
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