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
5bf8109d
Commit
5bf8109d
authored
May 23, 2011
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor memory optimization in opencv_stitching
parent
4827fbf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
blenders.cpp
modules/stitching/blenders.cpp
+1
-2
main.cpp
modules/stitching/main.cpp
+4
-2
No files found.
modules/stitching/blenders.cpp
View file @
5bf8109d
...
...
@@ -160,8 +160,7 @@ void MultiBandBlender::prepare(Rect dst_roi)
Blender
::
prepare
(
dst_roi
);
dst_pyr_laplace_
.
resize
(
num_bands_
+
1
);
dst_pyr_laplace_
[
0
].
create
(
dst_roi
.
size
(),
CV_32FC3
);
dst_pyr_laplace_
[
0
].
setTo
(
Scalar
::
all
(
0
));
dst_pyr_laplace_
[
0
]
=
dst_
;
dst_band_weights_
.
resize
(
num_bands_
+
1
);
dst_band_weights_
[
0
].
create
(
dst_roi
.
size
(),
CV_32F
);
...
...
modules/stitching/main.cpp
View file @
5bf8109d
...
...
@@ -78,7 +78,7 @@ vector<string> img_names;
bool
trygpu
=
false
;
double
work_megapix
=
0.3
;
double
seam_megapix
=
0.1
;
double
compose_megapix
=
1
;
double
compose_megapix
=
6
;
int
ba_space
=
BundleAdjuster
::
FOCAL_RAY_SPACE
;
float
conf_thresh
=
1.
f
;
bool
wave_correct
=
true
;
...
...
@@ -453,6 +453,7 @@ int main(int argc, char* argv[])
else
img
=
full_img
;
full_img
.
release
();
Size
img_size
=
img
.
size
();
// Update cameras paramters
cameras
[
img_idx
].
focal
*=
compose_work_aspect
;
...
...
@@ -462,9 +463,10 @@ int main(int argc, char* argv[])
img_warped
);
img_warped
.
convertTo
(
img_warped_f
,
CV_32F
);
img_warped
.
release
();
img
.
release
();
// Warp current image mask
mask
.
create
(
img
.
size
()
,
CV_8U
);
mask
.
create
(
img
_size
,
CV_8U
);
mask
.
setTo
(
Scalar
::
all
(
255
));
warper
->
warp
(
mask
,
static_cast
<
float
>
(
cameras
[
img_idx
].
focal
),
cameras
[
img_idx
].
R
,
mask_warped
,
INTER_NEAREST
,
BORDER_CONSTANT
);
...
...
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