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
86803521
Commit
86803521
authored
May 21, 2011
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made number of bands in blending parameter
parent
97530caa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
blenders.hpp
modules/stitching/blenders.hpp
+1
-1
main.cpp
modules/stitching/main.cpp
+9
-4
No files found.
modules/stitching/blenders.hpp
View file @
86803521
...
...
@@ -43,7 +43,7 @@ private:
class
MultiBandBlender
:
public
Blender
{
public
:
MultiBandBlender
(
int
num_bands
=
7
)
{
setNumBands
(
num_bands
);
}
MultiBandBlender
(
int
num_bands
=
5
)
{
setNumBands
(
num_bands
);
}
int
numBands
()
const
{
return
num_bands_
;
}
void
setNumBands
(
int
val
)
{
num_bands_
=
val
;
}
...
...
modules/stitching/main.cpp
View file @
86803521
...
...
@@ -23,6 +23,7 @@ void printUsage()
<<
"
\t
[--warp (plane|cylindrical|spherical)]
\n
"
<<
"
\t
[--seam (no|voronoi|graphcut)]
\n
"
<<
"
\t
[--blend (no|feather|multiband)]
\n
"
<<
"
\t
[--numbands <int>]
\n
"
<<
"
\t
[--output <result_img>]
\n\n
"
;
cout
<<
"--matchconf
\n
"
<<
"
\t
Good values are in [0.2, 0.8] range usually.
\n\n
"
;
...
...
@@ -45,6 +46,7 @@ bool user_match_conf = false;
float
match_conf
=
0.6
f
;
int
seam_find_type
=
SeamFinder
::
VORONOI
;
int
blend_type
=
Blender
::
MULTI_BAND
;
int
numbands
=
5
;
string
result_name
=
"result.png"
;
int
parseCmdArgs
(
int
argc
,
char
**
argv
)
...
...
@@ -173,6 +175,11 @@ int parseCmdArgs(int argc, char** argv)
}
i
++
;
}
else
if
(
string
(
argv
[
i
])
==
"--numbands"
)
{
numbands
=
atoi
(
argv
[
i
+
1
]);
i
++
;
}
else
if
(
string
(
argv
[
i
])
==
"--output"
)
{
result_name
=
argv
[
i
+
1
];
...
...
@@ -410,14 +417,12 @@ int main(int argc, char* argv[])
if
(
static_cast
<
Blender
*>
(
blender
)
==
0
)
{
// Create blender
blender
=
Blender
::
createDefault
(
blend_type
);
if
(
blend_type
==
Blender
::
MULTI_BAND
)
{
// Ensure last pyramid layer area is about 1 pix
MultiBandBlender
*
mb
=
dynamic_cast
<
MultiBandBlender
*>
(
static_cast
<
Blender
*>
(
blender
));
mb
->
setNumBands
(
static_cast
<
int
>
(
ceil
(
log
(
static_cast
<
double
>
(
img_warped_f
.
size
().
area
()))
/
log
(
4.0
)))
);
mb
->
setNumBands
(
numbands
);
}
// Determine the final image size
...
...
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