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
37b1bc9d
Commit
37b1bc9d
authored
7 years ago
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8776 from sovrasov:inpaint_adv_formats
parents
27649de5
d9ffc4c8
master
4.3.0
4.2.0
4.1.2
4.1.2-openvino
4.1.1
4.1.1-openvino
4.1.0
4.1.0-openvino
4.0.1
4.0.1-openvino
4.0.0
4.0.0-rc
4.0.0-openvino
4.0.0-beta
4.0.0-alpha
3.4.10
3.4.9
3.4.8
3.4.7
3.4.6
3.4.5
3.4.4
3.4.3
3.4.3-openvino
3.4.2
3.4.2-openvino
3.4.1
3.4.1-cvsdk
3.4.0
3.4.0-rc
3.3.1
3.3.1-cvsdk
3.3.0
3.3.0-rc
3.3.0-cvsdk
No related merge requests found
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
photo.hpp
modules/photo/include/opencv2/photo.hpp
+1
-1
inpaint.cpp
modules/photo/src/inpaint.cpp
+0
-0
test_inpaint.cpp
modules/photo/test/test_inpaint.cpp
+23
-0
No files found.
modules/photo/include/opencv2/photo.hpp
View file @
37b1bc9d
...
...
@@ -89,7 +89,7 @@ enum
/** @brief Restores the selected region in an image using the region neighborhood.
@param src Input 8-bit
1-channel or
3-channel image.
@param src Input 8-bit
, 16-bit unsigned or 32-bit float 1-channel or 8-bit
3-channel image.
@param inpaintMask Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that
needs to be inpainted.
@param dst Output image with the same size and type as src .
...
...
This diff is collapsed.
Click to expand it.
modules/photo/src/inpaint.cpp
View file @
37b1bc9d
This diff is collapsed.
Click to expand it.
modules/photo/test/test_inpaint.cpp
View file @
37b1bc9d
...
...
@@ -117,3 +117,26 @@ void CV_InpaintTest::run( int )
}
TEST
(
Photo_Inpaint
,
regression
)
{
CV_InpaintTest
test
;
test
.
safe_run
();
}
typedef
testing
::
TestWithParam
<
std
::
tr1
::
tuple
<
int
>
>
formats
;
TEST_P
(
formats
,
1
c
)
{
const
int
type
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
Mat
src
(
100
,
100
,
type
);
src
.
setTo
(
Scalar
::
all
(
128
));
Mat
ref
=
src
.
clone
();
Mat
dst
,
mask
=
Mat
::
zeros
(
src
.
size
(),
CV_8U
);
circle
(
src
,
Point
(
50
,
50
),
5
,
Scalar
(
200
),
6
);
circle
(
mask
,
Point
(
50
,
50
),
5
,
Scalar
(
200
),
6
);
inpaint
(
src
,
mask
,
dst
,
10
,
INPAINT_NS
);
Mat
dst2
;
inpaint
(
src
,
mask
,
dst2
,
10
,
INPAINT_TELEA
);
ASSERT_LE
(
cv
::
norm
(
dst
,
ref
,
NORM_INF
),
3.
);
ASSERT_LE
(
cv
::
norm
(
dst2
,
ref
,
NORM_INF
),
3.
);
}
INSTANTIATE_TEST_CASE_P
(
Photo_Inpaint
,
formats
,
testing
::
Values
(
CV_32F
,
CV_16U
,
CV_8U
));
This diff is collapsed.
Click to expand it.
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