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
fd3a6f0d
Commit
fd3a6f0d
authored
Apr 06, 2014
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cv::blur
parent
a624ec16
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
18 deletions
+37
-18
mathfuncs.cpp
modules/core/src/mathfuncs.cpp
+2
-2
matmul.cpp
modules/core/src/matmul.cpp
+11
-1
matrix.cpp
modules/core/src/matrix.cpp
+1
-1
accum.cpp
modules/imgproc/src/accum.cpp
+3
-3
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+4
-0
smooth.cpp
modules/imgproc/src/smooth.cpp
+15
-10
test_boxfilter.cpp
modules/imgproc/test/ocl/test_boxfilter.cpp
+1
-1
No files found.
modules/core/src/mathfuncs.cpp
View file @
fd3a6f0d
...
...
@@ -766,7 +766,7 @@ void polarToCart( InputArray src1, InputArray src2,
CV_Assert
(
ippFunc
!=
0
);
IppStatus
status
=
ippFunc
(
Mag
.
data
,
Angle
.
data
,
X
.
data
,
Y
.
data
,
static_cast
<
int
>
(
cn
*
X
.
total
()));
if
(
status
==
ippStsNoErr
)
if
(
status
>=
0
)
return
;
}
#endif
...
...
@@ -2240,7 +2240,7 @@ void pow( InputArray _src, double power, OutputArray _dst )
ippsPowx_32f_A21
((
const
Ipp32f
*
)
src
.
data
,
(
Ipp32f
)
power
,
(
Ipp32f
*
)
dst
.
data
,
(
Ipp32s
)(
src
.
total
()
*
cn
))
:
ippsPowx_64f_A50
((
const
Ipp64f
*
)
src
.
data
,
power
,
(
Ipp64f
*
)
dst
.
data
,
(
Ipp32s
)(
src
.
total
()
*
cn
));
if
(
status
==
ippStsNoErr
)
if
(
status
>=
0
)
return
;
}
#endif
...
...
modules/core/src/matmul.cpp
View file @
fd3a6f0d
...
...
@@ -2212,7 +2212,7 @@ void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray
Mat
src1
=
_src1
.
getMat
(),
src2
=
_src2
.
getMat
();
CV_Assert
(
src1
.
size
==
src2
.
size
);
_dst
.
create
(
src1
.
dims
,
src1
.
size
,
src1
.
type
()
);
_dst
.
create
(
src1
.
dims
,
src1
.
size
,
type
);
Mat
dst
=
_dst
.
getMat
();
float
falpha
=
(
float
)
alpha
;
...
...
@@ -2223,6 +2223,16 @@ void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray
if
(
src1
.
isContinuous
()
&&
src2
.
isContinuous
()
&&
dst
.
isContinuous
()
)
{
size_t
len
=
src1
.
total
()
*
cn
;
//#ifdef HAVE_IPP
// if (depth == CV_32F)
// {
// IppStatus status = ippmSaxpy_vava_32f((const Ipp32f *)src1.data, 1, 0, falpha,
// (const Ipp32f *)src2.data, 1, 0, (Ipp32f *)dst.data, 1, 0, (int)len, 1);
// printf("%s\n", ippGetStatusString(status));
// if (status >= 0)
// return;
// }
//#endif
func
(
src1
.
data
,
src2
.
data
,
dst
.
data
,
(
int
)
len
,
palpha
);
return
;
}
...
...
modules/core/src/matrix.cpp
View file @
fd3a6f0d
...
...
@@ -2987,7 +2987,7 @@ void cv::transpose( InputArray _src, OutputArray _dst )
type
==
CV_32FC4
?
(
ippiTranspose
)
ippiTranspose_32f_C4R
:
0
;
IppiSize
roiSize
=
{
src
.
cols
,
src
.
rows
};
if
(
ippFunc
!=
0
&&
ippFunc
(
src
.
data
,
(
int
)
src
.
step
,
dst
.
data
,
(
int
)
dst
.
step
,
roiSize
)
==
ippStsNoErr
)
if
(
ippFunc
!=
0
&&
ippFunc
(
src
.
data
,
(
int
)
src
.
step
,
dst
.
data
,
(
int
)
dst
.
step
,
roiSize
)
>=
0
)
return
;
#endif
...
...
modules/imgproc/src/accum.cpp
View file @
fd3a6f0d
...
...
@@ -501,7 +501,7 @@ void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _m
status
=
ippFuncMask
(
src
.
data
,
srcstep
,
(
Ipp8u
*
)
mask
.
data
,
maskstep
,
(
Ipp32f
*
)
dst
.
data
,
dststep
,
ippiSize
(
size
.
width
,
size
.
height
));
if
(
status
==
ippStsNoErr
)
if
(
status
>=
0
)
return
;
}
}
...
...
@@ -582,7 +582,7 @@ void cv::accumulateProduct( InputArray _src1, InputArray _src2,
status
=
ippFuncMask
(
src1
.
data
,
src1step
,
src2
.
data
,
src2step
,
(
Ipp8u
*
)
mask
.
data
,
maskstep
,
(
Ipp32f
*
)
dst
.
data
,
dststep
,
ippiSize
(
size
.
width
,
size
.
height
));
if
(
status
==
ippStsNoErr
)
if
(
status
>=
0
)
return
;
}
}
...
...
@@ -661,7 +661,7 @@ void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst,
status
=
ippFuncMask
(
src
.
data
,
srcstep
,
(
Ipp8u
*
)
mask
.
data
,
maskstep
,
(
Ipp32f
*
)
dst
.
data
,
dststep
,
ippiSize
(
size
.
width
,
size
.
height
),
(
Ipp32f
)
alpha
);
if
(
status
==
ippStsNoErr
)
if
(
status
>=
0
)
return
;
}
}
...
...
modules/imgproc/src/imgwarp.cpp
View file @
fd3a6f0d
...
...
@@ -4048,8 +4048,12 @@ public:
////Aug 2013: problem in IPP 7.1, 8.0 : sometimes function return ippStsCoeffErr
IppStatus status = func( src.data, srcsize, (int)src.step[0], srcroi, dst.data,
(int)dst.step[0], dstroi, coeffs, mode );
<<<<<<< HEAD
printf("%d\n", status);
if( status != ippStsNoErr)
=======
if( status < 0)
>>>>>>> cv::blur
*ok = false;
}
private:
...
...
modules/imgproc/src/smooth.cpp
View file @
fd3a6f0d
...
...
@@ -858,11 +858,17 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
return
;
#endif
/*
#ifdef HAVE_IPP
bool isolated = (borderType & BORDER_ISOLATED) != 0;
if (!normalize && !isolated && (borderType & ~BORDER_ISOLATED) == BORDER_REPLICATE && ddepth == sdepth &&
(anchor == Point(-1, -1) || anchor == Point(ksize.width >> 1, ksize.height >> 1)) && ksize.width == ksize.width)
int
ippBorderType
=
borderType
&
~
BORDER_ISOLATED
;
Point
ocvAnchor
,
ippAnchor
;
ocvAnchor
.
x
=
anchor
.
x
<
0
?
ksize
.
width
/
2
:
anchor
.
x
;
ocvAnchor
.
y
=
anchor
.
y
<
0
?
ksize
.
height
/
2
:
anchor
.
y
;
ippAnchor
.
x
=
ksize
.
width
/
2
-
(
ksize
.
width
%
2
==
0
?
1
:
0
);
ippAnchor
.
y
=
ksize
.
height
/
2
-
(
ksize
.
height
%
2
==
0
?
1
:
0
);
if
(
normalize
&&
!
src
.
isSubmatrix
()
&&
ddepth
==
sdepth
&&
(
ippBorderType
==
BORDER_REPLICATE
||
ippBorderType
==
BORDER_CONSTANT
)
&&
ocvAnchor
==
ippAnchor
)
{
Ipp32s
bufSize
;
IppiSize
roiSize
=
ippiSize
(
dst
.
cols
,
dst
.
rows
),
maskSize
=
ippiSize
(
ksize
.
width
,
ksize
.
height
);
...
...
@@ -874,11 +880,11 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
{ \
Ipp8u * buffer = ippsMalloc_8u(bufSize); \
ippType borderValue[4] = { 0, 0, 0, 0 }; \
ippBorderType = ippBorderType == BORDER_CONSTANT ? ippBorderConst : ippBorderType == BORDER_REPLICATE ? ippBorderRepl : -1; \
CV_Assert(ippBorderType >= 0); \
IppStatus status = ippiFilterBoxBorder_##flavor((ippType *)src.data, (int)src.step, (ippType *)dst.data, (int)dst.step, roiSize, maskSize, \
ippBorderRepl, borderValue, buffer); \
ippFree(buffer); \
printf("%d\n", status); \
IPPI_CALL(status); \
(IppiBorderType)ippBorderType, borderValue, buffer); \
ippsFree(buffer); \
if (status >= 0) \
return; \
} \
...
...
@@ -914,7 +920,6 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
}
#undef IPP_FILTER_BOX_BORDER
#endif
*/
Ptr
<
FilterEngine
>
f
=
createBoxFilter
(
src
.
type
(),
dst
.
type
(),
ksize
,
anchor
,
normalize
,
borderType
);
...
...
@@ -2024,7 +2029,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
IppStatus status = ippiFilterMedianBorder_##flavor((const ippType *)src0.data, (int)src0.step, \
(ippType *)dst.data, (int)dst.step, dstRoiSize, maskSize, \
ippBorderRepl, (ippType)0, buffer); \
ipp
i
Free(buffer); \
ipp
s
Free(buffer); \
if (status >= 0) \
return; \
} \
...
...
modules/imgproc/test/ocl/test_boxfilter.cpp
View file @
fd3a6f0d
...
...
@@ -102,7 +102,7 @@ typedef BoxFilterBase BoxFilter;
OCL_TEST_P
(
BoxFilter
,
Mat
)
{
for
(
int
j
=
0
;
j
<
100
;
j
++
)
for
(
int
j
=
0
;
j
<
test_loop_times
;
j
++
)
{
random_roi
();
...
...
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