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
8fd61c9a
Commit
8fd61c9a
authored
Aug 11, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3075 from akarsakov:ipp_imgproc_fix
parents
73115233
498da24b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
convert.cpp
modules/core/src/convert.cpp
+1
-1
color.cpp
modules/imgproc/src/color.cpp
+10
-10
morph.cpp
modules/imgproc/src/morph.cpp
+3
-2
No files found.
modules/core/src/convert.cpp
View file @
8fd61c9a
...
@@ -1619,7 +1619,7 @@ DEF_CVT_FUNC_F(8u16s, uchar, short, 8u16s_C1R)
...
@@ -1619,7 +1619,7 @@ DEF_CVT_FUNC_F(8u16s, uchar, short, 8u16s_C1R)
DEF_CVT_FUNC_F
(
8
s16s
,
schar
,
short
,
8
s16s_C1R
)
DEF_CVT_FUNC_F
(
8
s16s
,
schar
,
short
,
8
s16s_C1R
)
DEF_CVT_FUNC_F2
(
16u16
s
,
ushort
,
short
,
16u16
s_C1RSfs
)
DEF_CVT_FUNC_F2
(
16u16
s
,
ushort
,
short
,
16u16
s_C1RSfs
)
DEF_CVT_FUNC_F2
(
32
s16s
,
int
,
short
,
32
s16s_C1RSfs
)
DEF_CVT_FUNC_F2
(
32
s16s
,
int
,
short
,
32
s16s_C1RSfs
)
DEF_CVT_FUNC
_F2
(
32
f16s
,
float
,
short
,
32
f16s_C1RSfs
)
DEF_CVT_FUNC
(
32
f16s
,
float
,
short
)
DEF_CVT_FUNC
(
64
f16s
,
double
,
short
)
DEF_CVT_FUNC
(
64
f16s
,
double
,
short
)
DEF_CVT_FUNC_F
(
8u32
s
,
uchar
,
int
,
8u32
s_C1R
)
DEF_CVT_FUNC_F
(
8u32
s
,
uchar
,
int
,
8u32
s_C1R
)
...
...
modules/imgproc/src/color.cpp
View file @
8fd61c9a
...
@@ -3381,18 +3381,16 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
...
@@ -3381,18 +3381,16 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
_dst
.
create
(
sz
,
CV_8UC2
);
_dst
.
create
(
sz
,
CV_8UC2
);
dst
=
_dst
.
getMat
();
dst
=
_dst
.
getMat
();
#if
def HAVE_IPP
#if
defined(HAVE_IPP) && 0 // breaks OCL accuracy tests
CV_SUPPRESS_DEPRECATED_START
CV_SUPPRESS_DEPRECATED_START
#if 0
if
(
code
==
CV_BGR2BGR565
&&
scn
==
3
)
if
(
code
==
CV_BGR2BGR565
&&
scn
==
3
)
{
{
if
(
CvtColorIPPLoop
(
src
,
dst
,
IPPGeneralFunctor
((
ippiGeneralFunc
)
ippiBGRToBGR565_8u16u_C3R
)))
if
(
CvtColorIPPLoop
(
src
,
dst
,
IPPGeneralFunctor
((
ippiGeneralFunc
)
ippiBGRToBGR565_8u16u_C3R
)))
return
;
return
;
setIppErrorStatus
();
setIppErrorStatus
();
}
}
else
else
if
(
code
==
CV_BGRA2BGR565
&&
scn
==
4
)
#endif
if
(
code
==
CV_BGRA2BGR565
&&
scn
==
4
)
{
{
if
(
CvtColorIPPLoopCopy
(
src
,
dst
,
if
(
CvtColorIPPLoopCopy
(
src
,
dst
,
IPPReorderGeneralFunctor
(
ippiSwapChannelsC4C3RTab
[
depth
],
IPPReorderGeneralFunctor
(
ippiSwapChannelsC4C3RTab
[
depth
],
...
@@ -3787,6 +3785,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
...
@@ -3787,6 +3785,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
if
(
depth
==
CV_8U
||
depth
==
CV_16U
)
if
(
depth
==
CV_8U
||
depth
==
CV_16U
)
{
{
#if 0 // breaks OCL accuracy tests
if( code == CV_BGR2HSV_FULL && scn == 3 )
if( code == CV_BGR2HSV_FULL && scn == 3 )
{
{
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2HSVTab[depth], 2, 1, 0, depth)) )
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2HSVTab[depth], 2, 1, 0, depth)) )
...
@@ -3799,15 +3798,16 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
...
@@ -3799,15 +3798,16 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
return;
return;
setIppErrorStatus();
setIppErrorStatus();
}
}
else
if
(
code
==
CV_RGB2HSV_FULL
&&
scn
==
3
&&
depth
==
CV_16U
)
else if( code == CV_RGB2HSV_FULL && scn ==
4
)
{
{
if
(
CvtColorIPPLoop
Copy
(
src
,
dst
,
IPPGeneralFunctor
(
ippiRGB2HSVTab
[
depth
]
))
)
if( CvtColorIPPLoop
(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HSVTab[depth], 0, 1, 2, depth
)) )
return;
return;
setIppErrorStatus();
setIppErrorStatus();
}
} else
else
if
(
code
==
CV_RGB2HSV_FULL
&&
scn
==
4
)
#endif
if
(
code
==
CV_RGB2HSV_FULL
&&
scn
==
3
&&
depth
==
CV_16U
)
{
{
if
(
CvtColorIPPLoop
(
src
,
dst
,
IPPReorderGeneralFunctor
(
ippiSwapChannelsC4C3RTab
[
depth
],
ippiRGB2HSVTab
[
depth
],
0
,
1
,
2
,
depth
))
)
if
(
CvtColorIPPLoop
Copy
(
src
,
dst
,
IPPGeneralFunctor
(
ippiRGB2HSVTab
[
depth
]
))
)
return
;
return
;
setIppErrorStatus
();
setIppErrorStatus
();
}
}
...
...
modules/imgproc/src/morph.cpp
View file @
8fd61c9a
...
@@ -1268,10 +1268,11 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
...
@@ -1268,10 +1268,11 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
int
type
=
src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
int
type
=
src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
if
(
!
(
depth
==
CV_8U
||
depth
==
CV_32F
)
||
!
(
cn
==
1
||
cn
==
3
||
cn
==
4
)
||
if
(
!
(
depth
==
CV_8U
||
depth
==
CV_32F
)
||
!
(
cn
==
1
||
cn
==
3
||
cn
==
4
)
||
!
(
borderType
==
cv
::
BORDER_REPLICATE
||
(
borderType
==
cv
::
BORDER_CONSTANT
&&
borderValue
==
morphologyDefaultBorderValue
()
)
)
!
(
borderType
==
cv
::
BORDER_REPLICATE
||
(
borderType
==
cv
::
BORDER_CONSTANT
&&
borderValue
==
morphologyDefaultBorderValue
()
&&
||
!
(
op
==
MORPH_DILATE
||
op
==
MORPH_ERODE
)
||
_src
.
isSubmatrix
()
)
kernel
.
size
()
==
Size
(
3
,
3
))
)
||
!
(
op
==
MORPH_DILATE
||
op
==
MORPH_ERODE
)
||
_src
.
isSubmatrix
()
)
return
false
;
return
false
;
// In case BORDER_CONSTANT, IPPMorphReplicate works correct with kernels of size 3*3 only
if
(
borderType
==
cv
::
BORDER_CONSTANT
&&
kernel
.
data
)
if
(
borderType
==
cv
::
BORDER_CONSTANT
&&
kernel
.
data
)
{
{
int
x
,
y
;
int
x
,
y
;
...
...
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