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
eb2c9f15
Commit
eb2c9f15
authored
Apr 02, 2018
by
Vitaly Tuzov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed mask reduction in seamless_clone
parent
fb6db3dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
seamless_cloning.cpp
modules/photo/src/seamless_cloning.cpp
+12
-12
No files found.
modules/photo/src/seamless_cloning.cpp
View file @
eb2c9f15
...
...
@@ -75,26 +75,26 @@ void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point
{
if
(
gray
.
at
<
uchar
>
(
i
,
j
)
==
255
)
{
min
x
=
std
::
min
(
minx
,
i
);
max
x
=
std
::
max
(
maxx
,
i
);
min
y
=
std
::
min
(
miny
,
j
);
max
y
=
std
::
max
(
maxy
,
j
);
min
y
=
std
::
min
(
miny
,
i
);
max
y
=
std
::
max
(
maxy
,
i
);
min
x
=
std
::
min
(
minx
,
j
);
max
x
=
std
::
max
(
maxx
,
j
);
}
}
}
int
lenx
=
maxx
-
minx
;
int
leny
=
maxy
-
miny
;
int
lenx
=
maxx
-
minx
+
1
;
int
leny
=
maxy
-
miny
+
1
;
int
minxd
=
p
.
y
-
lenx
/
2
;
int
m
axxd
=
p
.
y
+
lenx
/
2
;
int
m
inyd
=
p
.
x
-
leny
/
2
;
int
maxyd
=
p
.
x
+
leny
/
2
;
int
minxd
=
p
.
x
-
lenx
/
2
;
int
m
inyd
=
p
.
y
-
leny
/
2
;
int
m
axxd
=
minxd
+
lenx
;
int
maxyd
=
minyd
+
leny
;
CV_Assert
(
minxd
>=
0
&&
minyd
>=
0
&&
maxxd
<=
dest
.
rows
&&
maxyd
<=
dest
.
cols
);
Rect
roi_d
(
min
yd
,
minxd
,
leny
,
lenx
);
Rect
roi_s
(
min
y
,
minx
,
leny
,
lenx
);
Rect
roi_d
(
min
xd
,
minyd
,
lenx
,
leny
);
Rect
roi_s
(
min
x
,
miny
,
lenx
,
leny
);
Mat
destinationROI
=
dest
(
roi_d
).
clone
();
...
...
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