Merge pull request #475 from mshabunin:hal_interface

pull/479/head
Alexander Alekhin 9 years ago
commit 742d9c932d
  1. 8
      modules/aruco/src/dictionary.cpp
  2. 3
      modules/optflow/src/motempl.cpp
  3. 10
      modules/sfm/src/libmv_light/CMake/Installation.cmake
  4. 13
      modules/xfeatures2d/src/sift.cpp
  5. 2
      modules/ximgproc/src/fgs_filter.cpp
  6. 14
      modules/ximgproc/src/precomp.hpp
  7. 5
      modules/ximgproc/src/sparse_match_interpolators.cpp
  8. 2
      modules/xphoto/src/grayworld_white_balance.cpp

@ -41,7 +41,7 @@ the use of this software, even if advised of the possibility of such damage.
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include "predefined_dictionaries.hpp"
#include "opencv2/core/hal/hal.hpp"
namespace cv {
namespace aruco {
@ -77,7 +77,7 @@ bool Dictionary::identify(const Mat &onlyBits, int &idx, int &rotation,
int currentMinDistance = markerSize * markerSize + 1;
int currentRotation = -1;
for(unsigned int r = 0; r < 4; r++) {
int currentHamming = hal::normHamming(
int currentHamming = cv::hal::normHamming(
bytesList.ptr(m)+r*candidateBytes.cols,
candidateBytes.ptr(),
candidateBytes.cols);
@ -112,7 +112,7 @@ int Dictionary::getDistanceToId(InputArray bits, int id, bool allRotations) cons
Mat candidateBytes = getByteListFromBits(bits.getMat());
int currentMinDistance = int(bits.total() * bits.total());
for(unsigned int r = 0; r < nRotations; r++) {
int currentHamming = hal::normHamming(
int currentHamming = cv::hal::normHamming(
bytesList.ptr(id) + r*candidateBytes.cols,
candidateBytes.ptr(),
candidateBytes.cols);
@ -331,7 +331,7 @@ static int _getSelfDistance(const Mat &marker) {
Mat bytes = Dictionary::getByteListFromBits(marker);
int minHamming = (int)marker.total() + 1;
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;
}
return minHamming;

@ -41,6 +41,7 @@
#include "precomp.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/hal/hal.hpp"
#include "opencl_kernels_optflow.hpp"
namespace cv {
@ -212,7 +213,7 @@ void calcMotionGradient( InputArray _mhi, OutputArray _mask,
float* orient_row = orient.ptr<float>(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
for( x = 0; x < size.width; x++ )

@ -1,9 +1,9 @@
#Install macro for libmv libraries
MACRO (LIBMV_INSTALL_LIB name)
set_target_properties( ${name}
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib
)
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${name} EXPORT OpenCVModules
ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
ENDMACRO (LIBMV_INSTALL_LIB)
ENDMACRO (LIBMV_INSTALL_LIB)

@ -105,6 +105,7 @@
#include "precomp.hpp"
#include <iostream>
#include <stdarg.h>
#include <opencv2/core/hal/hal.hpp>
namespace cv
{
@ -337,9 +338,9 @@ static float calcOrientationHist( const Mat& img, Point pt, int radius,
len = k;
// compute gradient values, orientations and the weights over the pixel neighborhood
hal::exp(W, W, len);
hal::fastAtan2(Y, X, Ori, len, true);
hal::magnitude(X, Y, Mag, len);
cv::hal::exp32f(W, W, len);
cv::hal::fastAtan2(Y, X, Ori, len, true);
cv::hal::magnitude32f(X, Y, Mag, len);
for( k = 0; k < len; k++ )
{
@ -620,9 +621,9 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
}
len = k;
hal::fastAtan2(Y, X, Ori, len, true);
hal::magnitude(X, Y, Mag, len);
hal::exp(W, W, len);
cv::hal::fastAtan2(Y, X, Ori, len, true);
cv::hal::magnitude32f(X, Y, Mag, len);
cv::hal::exp32f(W, W, len);
for( k = 0; k < len; k++ )
{

@ -35,7 +35,7 @@
*/
#include "precomp.hpp"
#include "opencv2/hal/intrin.hpp"
#include "opencv2/core/hal/intrin.hpp"
#include <vector>
namespace cv {

@ -2,26 +2,26 @@
* 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,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * 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
* without specific prior written permission.
*
*
* 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
* warranties of merchantability and fitness for a particular purpose are disclaimed.

@ -38,6 +38,7 @@
#include "opencv2/ximgproc/sparse_match_interpolator.hpp"
#include <algorithm>
#include <vector>
#include "opencv2/core/hal/hal.hpp"
using namespace std;
@ -768,7 +769,7 @@ void EdgeAwareInterpolatorImpl::RansacInterpolation_ParBody::operator() (const R
KNNdistances = inst->NNdistances.ptr<float>(i);
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);
for(int j=0;j<inst->k;j++)
@ -878,4 +879,4 @@ bool operator<(const SparseMatch& lhs,const SparseMatch& rhs)
}
}
}
}

@ -40,7 +40,7 @@
#include "opencv2/xphoto.hpp"
#include "opencv2/core.hpp"
#include "opencv2/hal/intrin.hpp"
#include "opencv2/core/hal/intrin.hpp"
namespace cv { namespace xphoto {

Loading…
Cancel
Save