Skip to content

Commit

Permalink
Clear all warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cv3d committed Sep 20, 2018
1 parent 97bceb5 commit 098d9b5
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
10 changes: 5 additions & 5 deletions modules/calib3d/src/fisheye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArra

CV_Assert( m1type == CV_16SC2 || m1type == CV_32F || m1type <=0 );
map1.create( size, m1type <= 0 ? CV_16SC2 : m1type );
map2.create( size, map1.type() == CV_16SC2 ? CV_16UC1 : CV_32F );
map2.create( size, map1.type() == CV_16SC2 ? CV_16UC1 : CV_32FC1 );

CV_Assert((K.depth() == CV_32F || K.depth() == CV_64F) && (D.depth() == CV_32F || D.depth() == CV_64F));
CV_Assert((P.empty() || P.depth() == CV_32F || P.depth() == CV_64F) && (R.empty() || R.depth() == CV_32F || R.depth() == CV_64F));
Expand Down Expand Up @@ -664,9 +664,9 @@ void cv::fisheye::stereoRectify( InputArray K1, InputArray D1, InputArray K2, In

// apply to both views
Matx33d ri1 = wr * r_r.t();
Mat(ri1, false).convertTo(R1, R1.empty() ? CV_64F : R1.type());
Mat(ri1, false).convertTo(R1, R1.empty() ? CV_64F : R1.depth());
Matx33d ri2 = wr * r_r;
Mat(ri2, false).convertTo(R2, R2.empty() ? CV_64F : R2.type());
Mat(ri2, false).convertTo(R2, R2.empty() ? CV_64F : R2.depth());
Vec3d tnew = ri2 * tvec;

// calculate projection/camera matrices. these contain the relevant rectified image internal params (fx, fy=fx, cx, cy)
Expand All @@ -687,11 +687,11 @@ void cv::fisheye::stereoRectify( InputArray K1, InputArray D1, InputArray K2, In

Mat(Matx34d(fc_new, 0, cc_new[0].x, 0,
0, fc_new, cc_new[0].y, 0,
0, 0, 1, 0), false).convertTo(P1, P1.empty() ? CV_64F : P1.type());
0, 0, 1, 0), false).convertTo(P1, P1.empty() ? CV_64F : P1.depth());

Mat(Matx34d(fc_new, 0, cc_new[1].x, tnew[0]*fc_new, // baseline * focal length;,
0, fc_new, cc_new[1].y, 0,
0, 0, 1, 0), false).convertTo(P2, P2.empty() ? CV_64F : P2.type());
0, 0, 1, 0), false).convertTo(P2, P2.empty() ? CV_64F : P2.depth());

if (Q.needed())
Mat(Matx44d(1, 0, 0, -cc_new[0].x,
Expand Down
2 changes: 1 addition & 1 deletion modules/core/include/opencv2/core/hal/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef signed char schar;


//#define OPENCV_ENABLE_DEPRECATED_WARNING_ELEMDEPTH_ELEMTYPE_OVERLOAD
//#define OPENCV_DISABLE_DEPRECATED_WARNING_INT_ELEMTYPE_OVERLOAD
#define OPENCV_DISABLE_DEPRECATED_WARNING_INT_ELEMTYPE_OVERLOAD


#if defined(CV_TYPE_SAFE_API) && defined(__cplusplus)
Expand Down
3 changes: 2 additions & 1 deletion modules/imgproc/src/colormap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ static Mat interp1(InputArray _x, InputArray _Y, InputArray _xi)
case CV_32SC1: return interp1_<int>(x,Y,xi); break;
case CV_32FC1: return interp1_<float>(x,Y,xi); break;
case CV_64FC1: return interp1_<double>(x,Y,xi); break;
default:
CV_Error(Error::StsUnsupportedFormat, "");
}
CV_Error(Error::StsUnsupportedFormat, "");
}

namespace colormap
Expand Down
6 changes: 3 additions & 3 deletions modules/imgproc/src/featureselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static bool ocl_goodFeaturesToTrack( InputArray _image, OutputArray _corners,
}
}

Mat(corners).convertTo(_corners, _corners.fixedType() ? _corners.type() : CV_32F);
Mat(corners).convertTo(_corners, _corners.fixedType() ? _corners.depth() : CV_32F);
return true;
}

Expand Down Expand Up @@ -330,7 +330,7 @@ static bool openvx_harris(Mat image, OutputArray _corners,
keypoints.push_back(Point2f((float)kp.x, (float)kp.y));
}

Mat(keypoints).convertTo(_corners, _corners.fixedType() ? _corners.type() : CV_32F);
Mat(keypoints).convertTo(_corners, _corners.fixedType() ? _corners.depth() : CV_32F);

#ifdef VX_VERSION_1_1
//we should take user memory back before release
Expand Down Expand Up @@ -508,7 +508,7 @@ void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners,
}
}

Mat(corners).convertTo(_corners, _corners.fixedType() ? _corners.type() : CV_32F);
Mat(corners).convertTo(_corners, _corners.fixedType() ? _corners.depth() : CV_32F);
}

CV_IMPL void
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/test/test_goodfeaturetotrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ test_goodFeaturesToTrack( InputArray _image, OutputArray _corners,
}
}

Mat(corners).convertTo(_corners, _corners.fixedType() ? _corners.type() : CV_32F);
Mat(corners).convertTo(_corners, _corners.fixedType() ? _corners.depth() : CV_32F);

}

Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/test/test_imgwarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ void CV_UndistortMapTest::get_test_array_types_and_sizes( int test_case_idx, vec
types[INPUT][0] = types[INPUT][1] = depth;
dualChannel = cvtest::randInt(rng)%2 == 0;
types[OUTPUT][0] = types[OUTPUT][1] =
types[REF_OUTPUT][0] = types[REF_OUTPUT][1] = dualChannel ? CV_32FC2 : CV_32F;
types[REF_OUTPUT][0] = types[REF_OUTPUT][1] = dualChannel ? CV_32FC2 : CV_32FC1;
sizes[INPUT][0] = cvSize(3,3);
sizes[INPUT][1] = cvtest::randInt(rng)%2 ? cvSize(4,1) : cvSize(1,4);

Expand Down
3 changes: 3 additions & 0 deletions modules/imgproc/test/test_imgwarp_strict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ void CV_Remap_Test::generate_test_data()
*begin_y = static_cast<short>(rng.uniform(0, 1024));
}
break;

default:
CV_CheckType(mapy.type(), mapy.type() == CV_16UC1 || mapy.type() == CV_16SC1, "");
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions modules/ts/src/ts_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ void convert(const Mat& src, cv::OutputArray _dst, int dtype, double alpha, doub
case CV_64F:
convertTo((const double*)sptr, dptr, dtype, total, alpha, beta);
break;
case CV_16F:
break; //unhandled
}
}
}
Expand Down

0 comments on commit 098d9b5

Please sign in to comment.