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
dcc4d364
Commit
dcc4d364
authored
Apr 23, 2014
by
Alexander Alekhin
Committed by
OpenCV Buildbot
Apr 23, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2651 from ilya-lavrenov:ipp_minmaxidx_3cn
parents
8114e071
493679dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
16 deletions
+28
-16
persistence.cpp
modules/core/src/persistence.cpp
+0
-1
stat.cpp
modules/core/src/stat.cpp
+28
-15
No files found.
modules/core/src/persistence.cpp
View file @
dcc4d364
...
...
@@ -2217,7 +2217,6 @@ icvXMLParse( CvFileStorage* fs )
ptr
=
icvXMLSkipSpaces
(
fs
,
ptr
,
CV_XML_INSIDE_TAG
);
if
(
memcmp
(
ptr
,
"<?xml"
,
5
)
!=
0
)
CV_PARSE_ERROR
(
"Valid XML should start with
\'
<?xml ...?>
\'
"
);
ptr
=
icvXMLParseTag
(
fs
,
ptr
,
&
key
,
&
list
,
&
tag_type
);
...
...
modules/core/src/stat.cpp
View file @
dcc4d364
...
...
@@ -1359,30 +1359,37 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
double
*
maxVal
,
int
*
minIdx
,
int
*
maxIdx
,
InputArray
_mask
)
{
CV_Assert
(
(
_src
.
channels
()
==
1
&&
(
_mask
.
empty
()
||
_mask
.
type
()
==
CV_8U
))
||
(
_src
.
channels
()
>=
1
&&
_mask
.
empty
()
&&
!
minIdx
&&
!
maxIdx
)
);
int
type
=
_src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
CV_Assert
(
(
cn
==
1
&&
(
_mask
.
empty
()
||
_mask
.
type
()
==
CV_8U
))
||
(
cn
>
1
&&
_mask
.
empty
()
&&
!
minIdx
&&
!
maxIdx
)
);
CV_OCL_RUN
(
_src
.
isUMat
()
&&
_src
.
dims
()
<=
2
&&
(
_mask
.
empty
()
||
_src
.
size
()
==
_mask
.
size
()),
ocl_minMaxIdx
(
_src
,
minVal
,
maxVal
,
minIdx
,
maxIdx
,
_mask
))
Mat
src
=
_src
.
getMat
(),
mask
=
_mask
.
getMat
();
int
depth
=
src
.
depth
(),
cn
=
src
.
channels
();
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
size_t
total_size
=
src
.
total
();
int
rows
=
src
.
size
[
0
],
cols
=
(
int
)(
total_size
/
rows
);
if
(
cn
==
1
&&
(
src
.
dims
==
2
||
(
src
.
isContinuous
()
&&
mask
.
isContinuous
()
&&
cols
>
0
&&
(
size_t
)
rows
*
cols
==
total_size
)
)
)
if
(
src
.
dims
==
2
||
(
src
.
isContinuous
()
&&
mask
.
isContinuous
()
&&
cols
>
0
&&
(
size_t
)
rows
*
cols
==
total_size
)
)
{
IppiSize
sz
=
{
cols
,
rows
};
int
type
=
src
.
type
();
IppiSize
sz
=
{
cols
*
cn
,
rows
};
if
(
!
mask
.
empty
()
)
{
typedef
IppStatus
(
CV_STDCALL
*
ippiMaskMinMaxIndxFuncC1
)(
const
void
*
,
int
,
const
void
*
,
int
,
IppiSize
,
Ipp32f
*
,
Ipp32f
*
,
IppiPoint
*
,
IppiPoint
*
);
typedef
IppStatus
(
CV_STDCALL
*
ippiMaskMinMaxIndxFuncC1
)(
const
void
*
,
int
,
const
void
*
,
int
,
IppiSize
,
Ipp32f
*
,
Ipp32f
*
,
IppiPoint
*
,
IppiPoint
*
);
CV_SUPPRESS_DEPRECATED_START
ippiMaskMinMaxIndxFuncC1
ippFuncC1
=
type
==
CV_8UC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_8u_C1MR
:
type
==
CV_16UC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_16u_C1MR
:
type
==
CV_32FC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_32f_C1MR
:
0
;
type
==
CV_8UC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_8u_C1MR
:
#ifndef HAVE_IPP_ICV_ONLY
type
==
CV_8SC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_8s_C1MR
:
#endif
type
==
CV_16UC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_16u_C1MR
:
type
==
CV_32FC1
?
(
ippiMaskMinMaxIndxFuncC1
)
ippiMinMaxIndx_32f_C1MR
:
0
;
CV_SUPPRESS_DEPRECATED_END
if
(
ippFuncC1
)
{
Ipp32f
min
,
max
;
...
...
@@ -1413,11 +1420,17 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
else
{
typedef
IppStatus
(
CV_STDCALL
*
ippiMinMaxIndxFuncC1
)(
const
void
*
,
int
,
IppiSize
,
Ipp32f
*
,
Ipp32f
*
,
IppiPoint
*
,
IppiPoint
*
);
CV_SUPPRESS_DEPRECATED_START
ippiMinMaxIndxFuncC1
ippFuncC1
=
type
==
CV_8UC1
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_8u_C1R
:
type
==
CV_16UC1
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_16u_C1R
:
type
==
CV_32FC1
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_32f_C1R
:
0
;
depth
==
CV_8U
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_8u_C1R
:
#ifndef HAVE_IPP_ICV_ONLY
depth
==
CV_8S
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_8s_C1R
:
#endif
depth
==
CV_16U
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_16u_C1R
:
depth
==
CV_32F
?
(
ippiMinMaxIndxFuncC1
)
ippiMinMaxIndx_32f_C1R
:
0
;
CV_SUPPRESS_DEPRECATED_END
if
(
ippFuncC1
)
{
Ipp32f
min
,
max
;
...
...
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