Commit 8bad0099 authored by Balint Cristian's avatar Balint Cristian

Merge pull request #2 from Itseez/master

SYNC upstream
parents ae7e5a54 4d30d09b
......@@ -13,7 +13,7 @@ endif()
project(${the_target})
ocv_include_directories("${OpenCV_SOURCE_DIR}/include/opencv")
ocv_include_modules(${OPENCV_${the_target}_DEPS})
ocv_include_modules_recurse(${OPENCV_${the_target}_DEPS})
file(GLOB ${the_target}_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
......
......@@ -13,7 +13,7 @@ endif()
project(${the_target})
ocv_include_directories("${OpenCV_SOURCE_DIR}/include/opencv")
ocv_include_modules(${OPENCV_${the_target}_DEPS})
ocv_include_modules_recurse(${OPENCV_${the_target}_DEPS})
file(GLOB ${the_target}_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
......
......@@ -85,6 +85,7 @@ typedef cv::Ptr<AlignMTB> Ptr_AlignMTB;
typedef cv::Ptr<CalibrateDebevec> Ptr_CalibrateDebevec;
typedef cv::Ptr<CalibrateRobertson> Ptr_CalibrateRobertson;
typedef cv::Ptr<DenseOpticalFlow> Ptr_DenseOpticalFlow;
typedef cv::Ptr<DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
typedef cv::Ptr<MergeDebevec> Ptr_MergeDebevec;
typedef cv::Ptr<MergeMertens> Ptr_MergeMertens;
typedef cv::Ptr<MergeRobertson> Ptr_MergeRobertson;
......@@ -468,6 +469,11 @@ public:
Ptr_DenseOpticalFlow toPtrDenseOpticalFlow() { return Ptr_DenseOpticalFlow(); }
operator Ptr_DenseOpticalFlow() { return toPtrDenseOpticalFlow(); }
// --------------------------- Ptr_DualTVL1OpticalFlow -------------------
Bridge& operator=(const Ptr_DualTVL1OpticalFlow& ) { return *this; }
Ptr_DualTVL1OpticalFlow toPtrDualTVL1OpticalFlow() { return Ptr_DualTVL1OpticalFlow(); }
operator Ptr_DualTVL1OpticalFlow() { return toPtrDualTVL1OpticalFlow(); }
// --------------------------- Ptr_MergeDebevec -----------------------
Bridge& operator=(const Ptr_MergeDebevec& ) { return *this; }
Ptr_MergeDebevec toPtrMergeDebevec() { return Ptr_MergeDebevec(); }
......
......@@ -212,7 +212,7 @@ void calcMotionGradient( InputArray _mhi, OutputArray _mask,
float* orient_row = orient.ptr<float>(y);
uchar* mask_row = mask.ptr<uchar>(y);
fastAtan2(dY_max_row, dX_min_row, orient_row, size.width, true);
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++ )
......
......@@ -81,7 +81,7 @@ convertDepthToFloat(const cv::Mat& depth, const cv::Mat& mask, float scale, cv::
v_mat((int)n_points, 0) = (float)v;
T depth_i = depth.at<T>(v, u);
if (cvIsNaN(depth_i) || (depth_i == std::numeric_limits<T>::min()) || (depth_i == std::numeric_limits<T>::max()))
if (cvIsNaN((float)depth_i) || (depth_i == std::numeric_limits<T>::min()) || (depth_i == std::numeric_limits<T>::max()))
z_mat((int)n_points, 0) = std::numeric_limits<float>::quiet_NaN();
else
z_mat((int)n_points, 0) = depth_i * scale;
......@@ -111,7 +111,7 @@ convertDepthToFloat(const cv::Mat& depth, float scale, const cv::Mat &uv_mat, cv
{
T depth_i = depth.at < T > ((int)(*uv_iter)[1], (int)(*uv_iter)[0]);
if (cvIsNaN(depth_i) || (depth_i == std::numeric_limits < T > ::min())
if (cvIsNaN((float)depth_i) || (depth_i == std::numeric_limits < T > ::min())
|| (depth_i == std::numeric_limits < T > ::max()))
*z_mat_iter = std::numeric_limits<float>::quiet_NaN();
else
......
......@@ -118,8 +118,8 @@ int agast_cornerScore<AgastFeatureDetector::OAST_9_16>(const uchar* ptr, const i
while(true)
{
register const int cb = *pixel + b_test;
register const int c_b = *pixel - b_test;
register const int cb = *ptr + b_test;
register const int c_b = *ptr - b_test;
if(ptr[offset0] > cb)
if(ptr[offset2] > cb)
if(ptr[offset4] > cb)
......@@ -2189,8 +2189,8 @@ int agast_cornerScore<AgastFeatureDetector::AGAST_7_12d>(const uchar* ptr, const
while(true)
{
register const int cb = *pixel + b_test;
register const int c_b = *pixel - b_test;
register const int cb = *ptr + b_test;
register const int c_b = *ptr - b_test;
if(ptr[offset0] > cb)
if(ptr[offset5] > cb)
if(ptr[offset2] > cb)
......@@ -3401,8 +3401,8 @@ int agast_cornerScore<AgastFeatureDetector::AGAST_7_12s>(const uchar* ptr, const
while(true)
{
register const int cb = *pixel + b_test;
register const int c_b = *pixel - b_test;
register const int cb = *ptr + b_test;
register const int c_b = *ptr - b_test;
if(ptr[offset0] > cb)
if(ptr[offset5] > cb)
if(ptr[offset2] < c_b)
......@@ -9031,8 +9031,8 @@ int agast_cornerScore<AgastFeatureDetector::AGAST_5_8>(const uchar* ptr, const i
while(true)
{
register const int cb = *pixel + b_test;
register const int c_b = *pixel - b_test;
register const int cb = *ptr + b_test;
register const int c_b = *ptr - b_test;
if(ptr[offset0] > cb)
if(ptr[offset2] > cb)
if(ptr[offset3] > cb)
......
......@@ -337,9 +337,9 @@ static float calcOrientationHist( const Mat& img, Point pt, int radius,
len = k;
// compute gradient values, orientations and the weights over the pixel neighborhood
exp(W, W, len);
fastAtan2(Y, X, Ori, len, true);
magnitude(X, Y, Mag, len);
hal::exp(W, W, len);
hal::fastAtan2(Y, X, Ori, len, true);
hal::magnitude(X, Y, Mag, len);
for( k = 0; k < len; k++ )
{
......@@ -620,9 +620,9 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
}
len = k;
fastAtan2(Y, X, Ori, len, true);
magnitude(X, Y, Mag, len);
exp(W, W, len);
hal::fastAtan2(Y, X, Ori, len, true);
hal::magnitude(X, Y, Mag, len);
hal::exp(W, W, len);
for( k = 0; k < len; k++ )
{
......
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