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
780f4ae7
Commit
780f4ae7
authored
May 12, 2015
by
laurentBerger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to implement remark included in message
parent
dfc508bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
detect_blob.png
data/detect_blob.png
+0
-0
detect_blob.cpp
samples/cpp/detect_blob.cpp
+5
-7
No files found.
data/detect_blob.png
0 → 100644
View file @
780f4ae7
33.3 KB
samples/cpp/
exampleBLOB
.cpp
→
samples/cpp/
detect_blob
.cpp
View file @
780f4ae7
...
...
@@ -9,9 +9,9 @@ using namespace cv;
static
void
help
()
{
cout
<<
"
\n
This program demonstrates how to use BLOB
and MSER to detect
region
\n
"
cout
<<
"
\n
This program demonstrates how to use BLOB
to detect and filter
region
\n
"
"Usage:
\n
"
" ./
BLOB_MSER <image1(../data/forme2.jp
g as default)>
\n
"
" ./
detect_blob <image1(../data/detect_blob.pn
g as default)>
\n
"
"Press a key when image window is active to change descriptor"
;
}
...
...
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
Mat
img
(
600
,
800
,
CV_8UC1
);
if
(
argc
==
1
)
{
fileName
.
push_back
(
"../data/
example_blob.bmp
"
);
fileName
.
push_back
(
"../data/
detect_blob.png
"
);
}
else
if
(
argc
==
2
)
{
...
...
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
help
();
return
(
0
);
}
img
=
imread
(
fileName
[
0
],
IMREAD_
UNCHANGED
);
img
=
imread
(
fileName
[
0
],
IMREAD_
COLOR
);
if
(
img
.
rows
*
img
.
cols
<=
0
)
{
cout
<<
"Image "
<<
fileName
[
0
]
<<
" is empty or cannot be found
\n
"
;
...
...
@@ -110,13 +110,11 @@ int main(int argc, char *argv[])
pDefaultBLOB
.
filterByConvexity
=
false
;
pDefaultBLOB
.
minConvexity
=
0.95
f
;
pDefaultBLOB
.
maxConvexity
=
(
float
)
1e37
;
// Descriptor array
(BLOB or MSER)
// Descriptor array
for BLOB
vector
<
String
>
typeDesc
;
// Param array for BLOB
vector
<
SimpleBlobDetector
::
Params
>
pBLOB
;
vector
<
SimpleBlobDetector
::
Params
>::
iterator
itBLOB
;
// Param array for MSER
// Color palette
vector
<
Vec3b
>
palette
;
for
(
int
i
=
0
;
i
<
65536
;
i
++
)
...
...
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