Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
742d9c93
Commit
742d9c93
authored
Dec 17, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #475 from mshabunin:hal_interface
parents
fc5be800
9c80c40c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
29 deletions
+30
-29
dictionary.cpp
modules/aruco/src/dictionary.cpp
+4
-4
motempl.cpp
modules/optflow/src/motempl.cpp
+2
-1
Installation.cmake
modules/sfm/src/libmv_light/CMake/Installation.cmake
+5
-6
sift.cpp
modules/xfeatures2d/src/sift.cpp
+7
-6
fgs_filter.cpp
modules/ximgproc/src/fgs_filter.cpp
+1
-1
precomp.hpp
modules/ximgproc/src/precomp.hpp
+7
-7
sparse_match_interpolators.cpp
modules/ximgproc/src/sparse_match_interpolators.cpp
+3
-3
grayworld_white_balance.cpp
modules/xphoto/src/grayworld_white_balance.cpp
+1
-1
No files found.
modules/aruco/src/dictionary.cpp
View file @
742d9c93
...
@@ -41,7 +41,7 @@ the use of this software, even if advised of the possibility of such damage.
...
@@ -41,7 +41,7 @@ the use of this software, even if advised of the possibility of such damage.
#include <opencv2/core.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/imgproc.hpp>
#include "predefined_dictionaries.hpp"
#include "predefined_dictionaries.hpp"
#include "opencv2/core/hal/hal.hpp"
namespace
cv
{
namespace
cv
{
namespace
aruco
{
namespace
aruco
{
...
@@ -77,7 +77,7 @@ bool Dictionary::identify(const Mat &onlyBits, int &idx, int &rotation,
...
@@ -77,7 +77,7 @@ bool Dictionary::identify(const Mat &onlyBits, int &idx, int &rotation,
int
currentMinDistance
=
markerSize
*
markerSize
+
1
;
int
currentMinDistance
=
markerSize
*
markerSize
+
1
;
int
currentRotation
=
-
1
;
int
currentRotation
=
-
1
;
for
(
unsigned
int
r
=
0
;
r
<
4
;
r
++
)
{
for
(
unsigned
int
r
=
0
;
r
<
4
;
r
++
)
{
int
currentHamming
=
hal
::
normHamming
(
int
currentHamming
=
cv
::
hal
::
normHamming
(
bytesList
.
ptr
(
m
)
+
r
*
candidateBytes
.
cols
,
bytesList
.
ptr
(
m
)
+
r
*
candidateBytes
.
cols
,
candidateBytes
.
ptr
(),
candidateBytes
.
ptr
(),
candidateBytes
.
cols
);
candidateBytes
.
cols
);
...
@@ -112,7 +112,7 @@ int Dictionary::getDistanceToId(InputArray bits, int id, bool allRotations) cons
...
@@ -112,7 +112,7 @@ int Dictionary::getDistanceToId(InputArray bits, int id, bool allRotations) cons
Mat
candidateBytes
=
getByteListFromBits
(
bits
.
getMat
());
Mat
candidateBytes
=
getByteListFromBits
(
bits
.
getMat
());
int
currentMinDistance
=
int
(
bits
.
total
()
*
bits
.
total
());
int
currentMinDistance
=
int
(
bits
.
total
()
*
bits
.
total
());
for
(
unsigned
int
r
=
0
;
r
<
nRotations
;
r
++
)
{
for
(
unsigned
int
r
=
0
;
r
<
nRotations
;
r
++
)
{
int
currentHamming
=
hal
::
normHamming
(
int
currentHamming
=
cv
::
hal
::
normHamming
(
bytesList
.
ptr
(
id
)
+
r
*
candidateBytes
.
cols
,
bytesList
.
ptr
(
id
)
+
r
*
candidateBytes
.
cols
,
candidateBytes
.
ptr
(),
candidateBytes
.
ptr
(),
candidateBytes
.
cols
);
candidateBytes
.
cols
);
...
@@ -331,7 +331,7 @@ static int _getSelfDistance(const Mat &marker) {
...
@@ -331,7 +331,7 @@ static int _getSelfDistance(const Mat &marker) {
Mat
bytes
=
Dictionary
::
getByteListFromBits
(
marker
);
Mat
bytes
=
Dictionary
::
getByteListFromBits
(
marker
);
int
minHamming
=
(
int
)
marker
.
total
()
+
1
;
int
minHamming
=
(
int
)
marker
.
total
()
+
1
;
for
(
int
r
=
1
;
r
<
4
;
r
++
)
{
for
(
int
r
=
1
;
r
<
4
;
r
++
)
{
int
currentHamming
=
hal
::
normHamming
(
bytes
.
ptr
(),
bytes
.
ptr
()
+
bytes
.
cols
*
r
,
bytes
.
cols
);
int
currentHamming
=
cv
::
hal
::
normHamming
(
bytes
.
ptr
(),
bytes
.
ptr
()
+
bytes
.
cols
*
r
,
bytes
.
cols
);
if
(
currentHamming
<
minHamming
)
minHamming
=
currentHamming
;
if
(
currentHamming
<
minHamming
)
minHamming
=
currentHamming
;
}
}
return
minHamming
;
return
minHamming
;
...
...
modules/optflow/src/motempl.cpp
View file @
742d9c93
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include "precomp.hpp"
#include "precomp.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/hal/hal.hpp"
#include "opencl_kernels_optflow.hpp"
#include "opencl_kernels_optflow.hpp"
namespace
cv
{
namespace
cv
{
...
@@ -212,7 +213,7 @@ void calcMotionGradient( InputArray _mhi, OutputArray _mask,
...
@@ -212,7 +213,7 @@ void calcMotionGradient( InputArray _mhi, OutputArray _mask,
float
*
orient_row
=
orient
.
ptr
<
float
>
(
y
);
float
*
orient_row
=
orient
.
ptr
<
float
>
(
y
);
uchar
*
mask_row
=
mask
.
ptr
<
uchar
>
(
y
);
uchar
*
mask_row
=
mask
.
ptr
<
uchar
>
(
y
);
hal
::
fastAtan2
(
dY_max_row
,
dX_min_row
,
orient_row
,
size
.
width
,
true
);
cv
::
hal
::
fastAtan2
(
dY_max_row
,
dX_min_row
,
orient_row
,
size
.
width
,
true
);
// make orientation zero where the gradient is very small
// make orientation zero where the gradient is very small
for
(
x
=
0
;
x
<
size
.
width
;
x
++
)
for
(
x
=
0
;
x
<
size
.
width
;
x
++
)
...
...
modules/sfm/src/libmv_light/CMake/Installation.cmake
View file @
742d9c93
#Install macro for libmv libraries
#Install macro for libmv libraries
MACRO
(
LIBMV_INSTALL_LIB name
)
MACRO
(
LIBMV_INSTALL_LIB name
)
set_target_properties
(
${
name
}
if
(
NOT BUILD_SHARED_LIBS
)
PROPERTIES
ocv_install_target
(
${
name
}
EXPORT OpenCVModules
ARCHIVE
_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/lib
ARCHIVE
DESTINATION
${
OPENCV_3P_LIB_INSTALL_PATH
}
COMPONENT dev
)
)
endif
(
)
ENDMACRO
(
LIBMV_INSTALL_LIB
)
ENDMACRO
(
LIBMV_INSTALL_LIB
)
\ No newline at end of file
modules/xfeatures2d/src/sift.cpp
View file @
742d9c93
...
@@ -105,6 +105,7 @@
...
@@ -105,6 +105,7 @@
#include "precomp.hpp"
#include "precomp.hpp"
#include <iostream>
#include <iostream>
#include <stdarg.h>
#include <stdarg.h>
#include <opencv2/core/hal/hal.hpp>
namespace
cv
namespace
cv
{
{
...
@@ -337,9 +338,9 @@ static float calcOrientationHist( const Mat& img, Point pt, int radius,
...
@@ -337,9 +338,9 @@ static float calcOrientationHist( const Mat& img, Point pt, int radius,
len
=
k
;
len
=
k
;
// compute gradient values, orientations and the weights over the pixel neighborhood
// compute gradient values, orientations and the weights over the pixel neighborhood
hal
::
exp
(
W
,
W
,
len
);
cv
::
hal
::
exp32f
(
W
,
W
,
len
);
hal
::
fastAtan2
(
Y
,
X
,
Ori
,
len
,
true
);
cv
::
hal
::
fastAtan2
(
Y
,
X
,
Ori
,
len
,
true
);
hal
::
magnitude
(
X
,
Y
,
Mag
,
len
);
cv
::
hal
::
magnitude32f
(
X
,
Y
,
Mag
,
len
);
for
(
k
=
0
;
k
<
len
;
k
++
)
for
(
k
=
0
;
k
<
len
;
k
++
)
{
{
...
@@ -620,9 +621,9 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
...
@@ -620,9 +621,9 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
}
}
len
=
k
;
len
=
k
;
hal
::
fastAtan2
(
Y
,
X
,
Ori
,
len
,
true
);
cv
::
hal
::
fastAtan2
(
Y
,
X
,
Ori
,
len
,
true
);
hal
::
magnitude
(
X
,
Y
,
Mag
,
len
);
cv
::
hal
::
magnitude32f
(
X
,
Y
,
Mag
,
len
);
hal
::
exp
(
W
,
W
,
len
);
cv
::
hal
::
exp32f
(
W
,
W
,
len
);
for
(
k
=
0
;
k
<
len
;
k
++
)
for
(
k
=
0
;
k
<
len
;
k
++
)
{
{
...
...
modules/ximgproc/src/fgs_filter.cpp
View file @
742d9c93
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
*/
*/
#include "precomp.hpp"
#include "precomp.hpp"
#include "opencv2/hal/intrin.hpp"
#include "opencv2/
core/
hal/intrin.hpp"
#include <vector>
#include <vector>
namespace
cv
{
namespace
cv
{
...
...
modules/ximgproc/src/precomp.hpp
View file @
742d9c93
...
@@ -2,26 +2,26 @@
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* If you do not agree to this license, do not download, install,
* copy or use the software.
* copy or use the software.
*
*
*
*
* License Agreement
* License Agreement
* For Open Source Computer Vision Library
* For Open Source Computer Vision Library
* (3 - clause BSD License)
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
modules/ximgproc/src/sparse_match_interpolators.cpp
View file @
742d9c93
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "opencv2/ximgproc/sparse_match_interpolator.hpp"
#include "opencv2/ximgproc/sparse_match_interpolator.hpp"
#include <algorithm>
#include <algorithm>
#include <vector>
#include <vector>
#include "opencv2/core/hal/hal.hpp"
using
namespace
std
;
using
namespace
std
;
...
@@ -768,7 +769,7 @@ void EdgeAwareInterpolatorImpl::RansacInterpolation_ParBody::operator() (const R
...
@@ -768,7 +769,7 @@ void EdgeAwareInterpolatorImpl::RansacInterpolation_ParBody::operator() (const R
KNNdistances
=
inst
->
NNdistances
.
ptr
<
float
>
(
i
);
KNNdistances
=
inst
->
NNdistances
.
ptr
<
float
>
(
i
);
if
(
inc
>
0
)
//forward pass
if
(
inc
>
0
)
//forward pass
{
{
hal
::
exp
(
KNNdistances
,
KNNdistances
,
inst
->
k
);
cv
::
hal
::
exp32f
(
KNNdistances
,
KNNdistances
,
inst
->
k
);
Point2f
average
=
Point2f
(
0.0
f
,
0.0
f
);
Point2f
average
=
Point2f
(
0.0
f
,
0.0
f
);
for
(
int
j
=
0
;
j
<
inst
->
k
;
j
++
)
for
(
int
j
=
0
;
j
<
inst
->
k
;
j
++
)
...
@@ -878,4 +879,4 @@ bool operator<(const SparseMatch& lhs,const SparseMatch& rhs)
...
@@ -878,4 +879,4 @@ bool operator<(const SparseMatch& lhs,const SparseMatch& rhs)
}
}
}
}
}
}
\ No newline at end of file
modules/xphoto/src/grayworld_white_balance.cpp
View file @
742d9c93
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include "opencv2/xphoto.hpp"
#include "opencv2/xphoto.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core.hpp"
#include "opencv2/hal/intrin.hpp"
#include "opencv2/
core/
hal/intrin.hpp"
namespace
cv
{
namespace
xphoto
{
namespace
cv
{
namespace
xphoto
{
...
...
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