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
e15a2ea9
Commit
e15a2ea9
authored
Nov 10, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed remap with transparent border (ticket #582)
parent
e6b2efeb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
types_c.h
modules/core/include/opencv2/core/types_c.h
+1
-0
imgproc.hpp
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
+4
-3
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+2
-6
No files found.
modules/core/include/opencv2/core/types_c.h
View file @
e15a2ea9
...
...
@@ -513,6 +513,7 @@ IplConvKernelFP;
/* extra border mode */
#define IPL_BORDER_REFLECT_101 4
#define IPL_BORDER_TRANSPARENT 5
#define IPL_IMAGE_MAGIC_VAL ((int)sizeof(IplImage))
#define CV_TYPE_NAME_IMAGE "opencv-image"
...
...
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
View file @
e15a2ea9
...
...
@@ -60,9 +60,10 @@ namespace cv
//! various border interpolation methods
enum
{
BORDER_REPLICATE
=
IPL_BORDER_REPLICATE
,
BORDER_CONSTANT
=
IPL_BORDER_CONSTANT
,
BORDER_REFLECT
=
IPL_BORDER_REFLECT
,
BORDER_REFLECT_101
=
IPL_BORDER_REFLECT_101
,
BORDER_REFLECT101
=
BORDER_REFLECT_101
,
BORDER_WRAP
=
IPL_BORDER_WRAP
,
BORDER_TRANSPARENT
,
BORDER_DEFAULT
=
BORDER_REFLECT_101
,
BORDER_ISOLATED
=
16
};
BORDER_REFLECT
=
IPL_BORDER_REFLECT
,
BORDER_WRAP
=
IPL_BORDER_WRAP
,
BORDER_REFLECT_101
=
IPL_BORDER_REFLECT_101
,
BORDER_REFLECT101
=
BORDER_REFLECT_101
,
BORDER_TRANSPARENT
=
IPL_BORDER_TRANSPARENT
,
BORDER_DEFAULT
=
BORDER_REFLECT_101
,
BORDER_ISOLATED
=
16
};
//! 1D interpolation function: returns coordinate of the "donor" pixel for the specified location p.
CV_EXPORTS_W
int
borderInterpolate
(
int
p
,
int
len
,
int
borderType
);
...
...
modules/imgproc/src/imgwarp.cpp
View file @
e15a2ea9
...
...
@@ -2175,9 +2175,7 @@ static void remapBicubic( const Mat& _src, Mat& _dst, const Mat& _xy,
else
{
int
x
[
4
],
y
[
4
];
if
(
borderType
==
BORDER_TRANSPARENT
&&
((
unsigned
)(
sx
+
1
)
>=
(
unsigned
)
ssize
.
width
||
(
unsigned
)(
sy
+
1
)
>=
(
unsigned
)
ssize
.
height
)
)
if
(
borderType
==
BORDER_TRANSPARENT
)
continue
;
if
(
borderType
==
BORDER_CONSTANT
&&
...
...
@@ -2277,9 +2275,7 @@ static void remapLanczos4( const Mat& _src, Mat& _dst, const Mat& _xy,
else
{
int
x
[
8
],
y
[
8
];
if
(
borderType
==
BORDER_TRANSPARENT
&&
((
unsigned
)(
sx
+
3
)
>=
(
unsigned
)
ssize
.
width
||
(
unsigned
)(
sy
+
3
)
>=
(
unsigned
)
ssize
.
height
)
)
if
(
borderType
==
BORDER_TRANSPARENT
)
continue
;
if
(
borderType
==
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