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
18edd917
Commit
18edd917
authored
Jan 11, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10391 from ElenaGvozdeva:HAL_minMaxIdx
parents
64a9e923
cd1c8693
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
hal_replacement.hpp
modules/core/src/hal_replacement.hpp
+16
-0
stat.cpp
modules/core/src/stat.cpp
+4
-0
test_arithm.cpp
modules/core/test/test_arithm.cpp
+18
-0
No files found.
modules/core/src/hal_replacement.hpp
View file @
18edd917
...
@@ -712,6 +712,22 @@ inline int hal_ni_gemm64fc(const double* src1, size_t src1_step, const double* s
...
@@ -712,6 +712,22 @@ inline int hal_ni_gemm64fc(const double* src1, size_t src1_step, const double* s
#define cv_hal_gemm64fc hal_ni_gemm64fc
#define cv_hal_gemm64fc hal_ni_gemm64fc
//! @endcond
//! @endcond
/**
@brief Finds the global minimum and maximum in an array.
@param src_data,src_step Source image
@param width,height Source image dimensions
@param depth Depth of source image
@param minVal,maxVal Pointer to the returned global minimum and maximum in an array.
@param minIdx,maxIdx Pointer to the returned minimum and maximum location.
@param mask Specified array region.
*/
inline
int
hal_ni_minMaxIdx
(
const
uchar
*
src_data
,
size_t
src_step
,
int
width
,
int
height
,
int
depth
,
double
*
minVal
,
double
*
maxVal
,
int
*
minIdx
,
int
*
maxIdx
,
uchar
*
mask
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
//! @cond IGNORED
#define cv_hal_minMaxIdx hal_ni_minMaxIdx
//! @endcond
//! @}
//! @}
...
...
modules/core/src/stat.cpp
View file @
18edd917
...
@@ -2713,6 +2713,10 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
...
@@ -2713,6 +2713,10 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
Mat
src
=
_src
.
getMat
(),
mask
=
_mask
.
getMat
();
Mat
src
=
_src
.
getMat
(),
mask
=
_mask
.
getMat
();
if
(
src
.
dims
<=
2
)
CALL_HAL
(
minMaxIdx
,
cv_hal_minMaxIdx
,
src
.
data
,
src
.
step
,
src
.
cols
,
src
.
rows
,
src
.
depth
(),
minVal
,
maxVal
,
minIdx
,
maxIdx
,
mask
.
data
);
CV_OVX_RUN
(
!
ovx
::
skipSmallImages
<
VX_KERNEL_MINMAXLOC
>
(
src
.
cols
,
src
.
rows
),
CV_OVX_RUN
(
!
ovx
::
skipSmallImages
<
VX_KERNEL_MINMAXLOC
>
(
src
.
cols
,
src
.
rows
),
openvx_minMaxIdx
(
src
,
minVal
,
maxVal
,
minIdx
,
maxIdx
,
mask
))
openvx_minMaxIdx
(
src
,
minVal
,
maxVal
,
minIdx
,
maxIdx
,
mask
))
...
...
modules/core/test/test_arithm.cpp
View file @
18edd917
...
@@ -1867,6 +1867,24 @@ TEST(Core_BoolVector, support)
...
@@ -1867,6 +1867,24 @@ TEST(Core_BoolVector, support)
ASSERT_FLOAT_EQ
((
float
)
nz
/
n
,
(
float
)(
mean
(
test
)[
0
]));
ASSERT_FLOAT_EQ
((
float
)
nz
/
n
,
(
float
)(
mean
(
test
)[
0
]));
}
}
TEST
(
MinMaxLoc
,
Mat_UcharMax_Without_Loc
)
{
Mat_
<
uchar
>
mat
(
50
,
50
);
uchar
iMaxVal
=
numeric_limits
<
uchar
>::
max
();
mat
.
setTo
(
iMaxVal
);
double
min
,
max
;
Point
minLoc
,
maxLoc
;
minMaxLoc
(
mat
,
&
min
,
&
max
,
&
minLoc
,
&
maxLoc
,
Mat
());
ASSERT_EQ
(
iMaxVal
,
min
);
ASSERT_EQ
(
iMaxVal
,
max
);
ASSERT_EQ
(
Point
(
0
,
0
),
minLoc
);
ASSERT_EQ
(
Point
(
0
,
0
),
maxLoc
);
}
TEST
(
MinMaxLoc
,
Mat_IntMax_Without_Mask
)
TEST
(
MinMaxLoc
,
Mat_IntMax_Without_Mask
)
{
{
Mat_
<
int
>
mat
(
50
,
50
);
Mat_
<
int
>
mat
(
50
,
50
);
...
...
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