Skip to content

Commit 4d30d09

Browse files
committed
Merge pull request opencv#210 from vpisarev/extending_hal_part1
fixed contrib code to match the HAL
2 parents ac461ea + cdddcc8 commit 4d30d09

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

modules/optflow/src/motempl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void calcMotionGradient( InputArray _mhi, OutputArray _mask,
212212
float* orient_row = orient.ptr<float>(y);
213213
uchar* mask_row = mask.ptr<uchar>(y);
214214

215-
fastAtan2(dY_max_row, dX_min_row, orient_row, size.width, true);
215+
hal::fastAtan2(dY_max_row, dX_min_row, orient_row, size.width, true);
216216

217217
// make orientation zero where the gradient is very small
218218
for( x = 0; x < size.width; x++ )

modules/rgbd/src/depth_to_3d.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ convertDepthToFloat(const cv::Mat& depth, const cv::Mat& mask, float scale, cv::
8181
v_mat((int)n_points, 0) = (float)v;
8282
T depth_i = depth.at<T>(v, u);
8383

84-
if (cvIsNaN(depth_i) || (depth_i == std::numeric_limits<T>::min()) || (depth_i == std::numeric_limits<T>::max()))
84+
if (cvIsNaN((float)depth_i) || (depth_i == std::numeric_limits<T>::min()) || (depth_i == std::numeric_limits<T>::max()))
8585
z_mat((int)n_points, 0) = std::numeric_limits<float>::quiet_NaN();
8686
else
8787
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
111111
{
112112
T depth_i = depth.at < T > ((int)(*uv_iter)[1], (int)(*uv_iter)[0]);
113113

114-
if (cvIsNaN(depth_i) || (depth_i == std::numeric_limits < T > ::min())
114+
if (cvIsNaN((float)depth_i) || (depth_i == std::numeric_limits < T > ::min())
115115
|| (depth_i == std::numeric_limits < T > ::max()))
116116
*z_mat_iter = std::numeric_limits<float>::quiet_NaN();
117117
else

modules/xfeatures2d/src/sift.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ static float calcOrientationHist( const Mat& img, Point pt, int radius,
337337
len = k;
338338

339339
// compute gradient values, orientations and the weights over the pixel neighborhood
340-
exp(W, W, len);
341-
fastAtan2(Y, X, Ori, len, true);
342-
magnitude(X, Y, Mag, len);
340+
hal::exp(W, W, len);
341+
hal::fastAtan2(Y, X, Ori, len, true);
342+
hal::magnitude(X, Y, Mag, len);
343343

344344
for( k = 0; k < len; k++ )
345345
{
@@ -620,9 +620,9 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
620620
}
621621

622622
len = k;
623-
fastAtan2(Y, X, Ori, len, true);
624-
magnitude(X, Y, Mag, len);
625-
exp(W, W, len);
623+
hal::fastAtan2(Y, X, Ori, len, true);
624+
hal::magnitude(X, Y, Mag, len);
625+
hal::exp(W, W, len);
626626

627627
for( k = 0; k < len; k++ )
628628
{

0 commit comments

Comments
 (0)