Commit f529a1df authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed HAL headers location

parent fc5be800
...@@ -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;
......
...@@ -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++ )
......
...@@ -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++ )
{ {
......
...@@ -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 {
......
...@@ -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.
......
...@@ -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.0f,0.0f); Point2f average = Point2f(0.0f,0.0f);
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
...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment