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
cb0fc230
Commit
cb0fc230
authored
Sep 09, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Sep 09, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1387 from vpisarev:ipp_imgwarp
parents
45512a93
e85e4d3a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+0
-0
morph.cpp
modules/imgproc/src/morph.cpp
+12
-15
No files found.
modules/imgproc/src/imgwarp.cpp
View file @
cb0fc230
This diff is collapsed.
Click to expand it.
modules/imgproc/src/morph.cpp
View file @
cb0fc230
...
...
@@ -1213,11 +1213,10 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
}
static
bool
IPPMorphOp
(
int
op
,
InputArray
_src
,
OutputArray
_dst
,
InputArray
_kernel
,
const
Point
&
anchor
,
int
iterations
,
const
Mat
&
_kernel
,
Point
anchor
,
int
iterations
,
int
borderType
,
const
Scalar
&
borderValue
)
{
Mat
src
=
_src
.
getMat
(),
kernel
=
_kernel
.
getMat
()
;
Mat
src
=
_src
.
getMat
(),
kernel
=
_kernel
;
if
(
!
(
src
.
depth
()
==
CV_8U
||
src
.
depth
()
==
CV_32F
)
||
(
iterations
>
1
)
||
!
(
borderType
==
cv
::
BORDER_REPLICATE
||
(
borderType
==
cv
::
BORDER_CONSTANT
&&
borderValue
==
morphologyDefaultBorderValue
())
)
||
!
(
op
==
MORPH_DILATE
||
op
==
MORPH_ERODE
)
)
...
...
@@ -1248,9 +1247,6 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
}
Size
ksize
=
kernel
.
data
?
kernel
.
size
()
:
Size
(
3
,
3
);
Point
normanchor
=
normalizeAnchor
(
anchor
,
ksize
);
CV_Assert
(
normanchor
.
inside
(
Rect
(
0
,
0
,
ksize
.
width
,
ksize
.
height
))
);
_dst
.
create
(
src
.
size
(),
src
.
type
()
);
Mat
dst
=
_dst
.
getMat
();
...
...
@@ -1265,7 +1261,7 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
if
(
!
kernel
.
data
)
{
ksize
=
Size
(
1
+
iterations
*
2
,
1
+
iterations
*
2
);
norm
anchor
=
Point
(
iterations
,
iterations
);
anchor
=
Point
(
iterations
,
iterations
);
rectKernel
=
true
;
iterations
=
1
;
}
...
...
@@ -1273,7 +1269,7 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
{
ksize
=
Size
(
ksize
.
width
+
(
iterations
-
1
)
*
(
ksize
.
width
-
1
),
ksize
.
height
+
(
iterations
-
1
)
*
(
ksize
.
height
-
1
)),
normanchor
=
Point
(
normanchor
.
x
*
iterations
,
norm
anchor
.
y
*
iterations
);
anchor
=
Point
(
anchor
.
x
*
iterations
,
anchor
.
y
*
iterations
);
kernel
=
Mat
();
rectKernel
=
true
;
iterations
=
1
;
...
...
@@ -1283,7 +1279,7 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
if
(
iterations
>
1
)
return
false
;
return
IPPMorphReplicate
(
op
,
src
,
dst
,
kernel
,
ksize
,
norm
anchor
,
rectKernel
);
return
IPPMorphReplicate
(
op
,
src
,
dst
,
kernel
,
ksize
,
anchor
,
rectKernel
);
}
#endif
...
...
@@ -1292,17 +1288,18 @@ static void morphOp( int op, InputArray _src, OutputArray _dst,
Point
anchor
,
int
iterations
,
int
borderType
,
const
Scalar
&
borderValue
)
{
Mat
kernel
=
_kernel
.
getMat
();
Size
ksize
=
kernel
.
data
?
kernel
.
size
()
:
Size
(
3
,
3
);
anchor
=
normalizeAnchor
(
anchor
,
ksize
);
CV_Assert
(
anchor
.
inside
(
Rect
(
0
,
0
,
ksize
.
width
,
ksize
.
height
))
);
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
if
(
IPPMorphOp
(
op
,
_src
,
_dst
,
_
kernel
,
anchor
,
iterations
,
borderType
,
borderValue
)
)
if
(
IPPMorphOp
(
op
,
_src
,
_dst
,
kernel
,
anchor
,
iterations
,
borderType
,
borderValue
)
)
return
;
#endif
Mat
src
=
_src
.
getMat
(),
kernel
=
_kernel
.
getMat
();
Size
ksize
=
kernel
.
data
?
kernel
.
size
()
:
Size
(
3
,
3
);
anchor
=
normalizeAnchor
(
anchor
,
ksize
);
CV_Assert
(
anchor
.
inside
(
Rect
(
0
,
0
,
ksize
.
width
,
ksize
.
height
))
);
Mat
src
=
_src
.
getMat
();
_dst
.
create
(
src
.
size
(),
src
.
type
()
);
Mat
dst
=
_dst
.
getMat
();
...
...
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