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
cb9e110a
Commit
cb9e110a
authored
Nov 01, 2017
by
elenagvo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add HAL for BoxFilter
parent
800294ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
6 deletions
+31
-6
hal_replacement.hpp
modules/imgproc/src/hal_replacement.hpp
+19
-0
smooth.cpp
modules/imgproc/src/smooth.cpp
+12
-6
No files found.
modules/imgproc/src/hal_replacement.hpp
View file @
cb9e110a
...
...
@@ -664,6 +664,25 @@ inline int hal_ni_threshold(const uchar* src_data, size_t src_step, uchar* dst_d
#define cv_hal_threshold hal_ni_threshold
//! @endcond
/**
@brief Calculate box filter
@param src_depth, dst_depth Depths of source and destination image
@param src_data, src_step Source image
@param dst_data, dst_step Destination image
@param ksize Size of kernel
@param anchor Anchor point
@param normalize If true then result is normalized
@param border_type Border type
@param margins Margins for source image
@param width, height Source image dimensions
@param cn Number of channels
*/
inline
int
hal_ni_boxFilter
(
int
src_depth
,
int
dst_depth
,
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
CvSize
ksize
,
CvPoint
anchor
,
bool
normalize
,
int
border_type
,
CvRect
margins
,
int
width
,
int
height
,
int
cn
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
//! @cond IGNORED
#define cv_hal_boxFilter hal_ni_boxFilter
//! @endcond
//! @}
#if defined __GNUC__
...
...
modules/imgproc/src/smooth.cpp
View file @
cb9e110a
...
...
@@ -1552,12 +1552,6 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
if
(
src
.
cols
==
1
)
ksize
.
width
=
1
;
}
#ifdef HAVE_TEGRA_OPTIMIZATION
if
(
tegra
::
useTegra
()
&&
tegra
::
box
(
src
,
dst
,
ksize
,
anchor
,
normalize
,
borderType
)
)
return
;
#endif
CV_IPP_RUN_FAST
(
ipp_boxfilter
(
src
,
dst
,
ksize
,
anchor
,
normalize
,
borderType
));
Point
ofs
;
Size
wsz
(
src
.
cols
,
src
.
rows
);
...
...
@@ -1565,6 +1559,18 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
src
.
locateROI
(
wsz
,
ofs
);
borderType
=
(
borderType
&~
BORDER_ISOLATED
);
CvRect
margin
=
cvRect
(
ofs
.
x
,
ofs
.
y
,
wsz
.
width
-
src
.
cols
-
ofs
.
x
,
wsz
.
height
-
src
.
rows
-
ofs
.
y
);
CALL_HAL
(
boxFilter
,
cv_hal_boxFilter
,
sdepth
,
ddepth
,
src
.
ptr
(),
src
.
step
,
dst
.
ptr
(),
dst
.
step
,
(
CvSize
)(
ksize
),
(
CvPoint
)(
anchor
),
normalize
,
borderType
,
margin
,
src
.
cols
,
src
.
rows
,
cn
);
#ifdef HAVE_TEGRA_OPTIMIZATION
if
(
tegra
::
useTegra
()
&&
tegra
::
box
(
src
,
dst
,
ksize
,
anchor
,
normalize
,
borderType
)
)
return
;
#endif
CV_IPP_RUN_FAST
(
ipp_boxfilter
(
src
,
dst
,
ksize
,
anchor
,
normalize
,
borderType
));
Ptr
<
FilterEngine
>
f
=
createBoxFilter
(
src
.
type
(),
dst
.
type
(),
ksize
,
anchor
,
normalize
,
borderType
);
...
...
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