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
ac2dc295
Commit
ac2dc295
authored
Nov 14, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15852 from akhakim:gauss_blur_kernel_5x5
parents
d1c4e4b5
beb14c70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
2 deletions
+53
-2
gfluidimgproc.cpp
modules/gapi/src/backends/fluid/gfluidimgproc.cpp
+12
-2
gfluidimgproc_func.dispatch.cpp
...s/gapi/src/backends/fluid/gfluidimgproc_func.dispatch.cpp
+22
-0
gfluidimgproc_func.hpp
modules/gapi/src/backends/fluid/gfluidimgproc_func.hpp
+19
-0
gfluidimgproc_func.simd.hpp
modules/gapi/src/backends/fluid/gfluidimgproc_func.simd.hpp
+0
-0
No files found.
modules/gapi/src/backends/fluid/gfluidimgproc.cpp
View file @
ac2dc295
...
...
@@ -599,6 +599,7 @@ static void run_sepfilter(Buffer& dst, const View& src,
{
constexpr
int
kMax
=
11
;
GAPI_Assert
(
kxLen
<=
kMax
&&
kyLen
<=
kMax
);
GAPI_Assert
(
kxLen
==
kyLen
);
const
SRC
*
in
[
kMax
];
DST
*
out
;
...
...
@@ -625,6 +626,13 @@ static void run_sepfilter(Buffer& dst, const View& src,
int
border
=
xborder
;
run_sepfilter3x3_impl
(
out
,
in
,
width
,
chan
,
kx
,
ky
,
border
,
scale
,
delta
,
buf
,
y
,
y0
);
}
else
if
(
kxLen
==
5
&&
kyLen
==
5
)
{
int
y
=
dst
.
y
();
int
y0
=
dst
.
priv
().
writeStart
();
run_sepfilter5x5_impl
(
out
,
in
,
width
,
chan
,
kx
,
ky
,
xborder
,
scale
,
delta
,
buf
,
y
,
y0
);
}
else
{
int
length
=
chan
*
width
;
...
...
@@ -788,7 +796,9 @@ GAPI_FLUID_KERNEL(GFluidGaussBlur, cv::gapi::imgproc::GGaussBlur, true)
Buffer
&
dst
,
Buffer
&
scratch
)
{
int
kxsize
=
ksize
.
width
;
GAPI_Assert
(
ksize
.
height
==
ksize
.
width
);
GAPI_Assert
((
ksize
.
height
==
3
)
||
(
ksize
.
height
==
5
));
const
int
kxsize
=
ksize
.
width
;
int
kysize
=
ksize
.
height
;
auto
*
kx
=
scratch
.
OutLine
<
float
>
();
// cached kernX data
...
...
@@ -801,7 +811,7 @@ GAPI_FLUID_KERNEL(GFluidGaussBlur, cv::gapi::imgproc::GGaussBlur, true)
constexpr
int
buffSize
=
5
;
GAPI_Assert
(
ksize
.
height
<=
buffSize
);
float
*
buf
[
buffSize
]
{
};
float
*
buf
[
buffSize
]
=
{
nullptr
};
buf
[
0
]
=
ky
+
kysize
;
for
(
int
i
=
1
;
i
<
ksize
.
height
;
++
i
)
...
...
modules/gapi/src/backends/fluid/gfluidimgproc_func.dispatch.cpp
View file @
ac2dc295
...
...
@@ -119,6 +119,28 @@ RUN_SEPFILTER3X3_IMPL( float, float)
#undef RUN_SEPFILTER3X3_IMPL
#define RUN_SEPFILTER5x5_IMPL(DST, SRC) \
void run_sepfilter5x5_impl(DST out[], const SRC *in[], int width, int chan, \
const float kx[], const float ky[], int border, \
float scale, float delta, \
float *buf[], int y, int y0) \
{ \
CV_CPU_DISPATCH(run_sepfilter5x5_impl, \
(out, in, width, chan, kx, ky, border, scale, delta, buf,y, y0), \
CV_CPU_DISPATCH_MODES_ALL); \
}
RUN_SEPFILTER5x5_IMPL
(
uchar
,
uchar
)
RUN_SEPFILTER5x5_IMPL
(
short
,
uchar
)
RUN_SEPFILTER5x5_IMPL
(
float
,
uchar
)
RUN_SEPFILTER5x5_IMPL
(
ushort
,
ushort
)
RUN_SEPFILTER5x5_IMPL
(
short
,
ushort
)
RUN_SEPFILTER5x5_IMPL
(
float
,
ushort
)
RUN_SEPFILTER5x5_IMPL
(
short
,
short
)
RUN_SEPFILTER5x5_IMPL
(
float
,
short
)
RUN_SEPFILTER5x5_IMPL
(
float
,
float
)
#undef RUN_SEPFILTER5x5_IMPL
//-------------------------
//
// Fluid kernels: Filter 2D
...
...
modules/gapi/src/backends/fluid/gfluidimgproc_func.hpp
View file @
ac2dc295
...
...
@@ -78,6 +78,25 @@ RUN_SEPFILTER3X3_IMPL( float, float)
#undef RUN_SEPFILTER3X3_IMPL
#define RUN_SEPFILTER5x5_IMPL(DST, SRC) \
void run_sepfilter5x5_impl(DST out[], const SRC *in[], int width, int chan, \
const float kx[], const float ky[], int border, \
float scale, float delta, \
float *buf[], int y, int y0);
RUN_SEPFILTER5x5_IMPL
(
uchar
,
uchar
)
RUN_SEPFILTER5x5_IMPL
(
short
,
uchar
)
RUN_SEPFILTER5x5_IMPL
(
float
,
uchar
)
RUN_SEPFILTER5x5_IMPL
(
ushort
,
ushort
)
RUN_SEPFILTER5x5_IMPL
(
short
,
ushort
)
RUN_SEPFILTER5x5_IMPL
(
float
,
ushort
)
RUN_SEPFILTER5x5_IMPL
(
short
,
short
)
RUN_SEPFILTER5x5_IMPL
(
float
,
short
)
RUN_SEPFILTER5x5_IMPL
(
float
,
float
)
#undef RUN_SEPFILTER5x5_IMPL
//-------------------------
//
// Fluid kernels: Filter 2D
...
...
modules/gapi/src/backends/fluid/gfluidimgproc_func.simd.hpp
View file @
ac2dc295
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