Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
4317e27d
Commit
4317e27d
authored
Apr 18, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1128 from savuor:fix/xphoto_inpaint_copy
parents
51696198
e1fd2384
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
annf.hpp
modules/xphoto/src/annf.hpp
+12
-4
No files found.
modules/xphoto/src/annf.hpp
View file @
4317e27d
...
...
@@ -128,11 +128,19 @@ KDTree(const cv::Mat &img, const int _leafNumber, const int _zeroThresh)
leafNumber
(
_leafNumber
),
zeroThresh
(
_zeroThresh
)
///////////////////////////////////////////////////
{
CV_Assert
(
img
.
isContinuous
()
);
int
imgch
=
img
.
channels
();
CV_Assert
(
img
.
isContinuous
()
&&
imgch
<=
cn
);
for
(
size_t
i
=
0
;
i
<
img
.
total
();
i
++
)
{
cv
::
Vec
<
Tp
,
cn
>
v
=
cv
::
Vec
<
Tp
,
cn
>::
all
((
Tp
)
0
);
for
(
int
c
=
0
;
c
<
imgch
;
c
++
)
{
v
[
c
]
=
*
((
Tp
*
)(
img
.
data
)
+
i
*
imgch
+
c
);
}
data
.
push_back
(
v
);
}
std
::
copy
(
(
cv
::
Vec
<
Tp
,
cn
>
*
)
img
.
data
,
(
cv
::
Vec
<
Tp
,
cn
>
*
)
img
.
data
+
img
.
total
(),
std
::
back_inserter
(
data
)
);
generate_seq
(
std
::
back_inserter
(
idx
),
0
,
int
(
data
.
size
())
);
std
::
fill_n
(
std
::
back_inserter
(
nodes
),
int
(
data
.
size
()),
cv
::
Point2i
(
0
,
0
)
);
...
...
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