Commit 88930874 authored by tompollok's avatar tompollok

change area() emptiness checks to empty()

parent b5660357
......@@ -1767,7 +1767,7 @@ void drawMarker(const Ptr<Dictionary> &dictionary, int id, int sidePixels, Outpu
void _drawPlanarBoardImpl(Board *_board, Size outSize, OutputArray _img, int marginSize,
int borderBits) {
CV_Assert(outSize.area() > 0);
CV_Assert(!outSize.empty());
CV_Assert(marginSize >= 0);
_img.create(outSize, CV_8UC1);
......
......@@ -53,7 +53,7 @@ using namespace std;
*/
void CharucoBoard::draw(Size outSize, OutputArray _img, int marginSize, int borderBits) {
CV_Assert(outSize.area() > 0);
CV_Assert(!outSize.empty());
CV_Assert(marginSize >= 0);
_img.create(outSize, CV_8UC1);
......
......@@ -532,7 +532,7 @@ void cv::omnidir::initUndistortRectifyMap(InputArray K, InputArray D, InputArray
void cv::omnidir::undistortImage(InputArray distorted, OutputArray undistorted,
InputArray K, InputArray D, InputArray xi, int flags, InputArray Knew, const Size& new_size, InputArray R)
{
Size size = new_size.area() != 0 ? new_size : distorted.size();
Size size = new_size.empty() ? distorted.size() : new_size;
cv::Mat map1, map2;
omnidir::initUndistortRectifyMap(K, D, xi, R, Knew, size, CV_16SC2, map1, map2, flags);
......
......@@ -66,7 +66,7 @@ namespace cv{
}
double TrackingFunctionPF::calc(const double* x) const{
Rect rect=rectFromRow(x);
if(rect.area()==0){
if(rect.empty()){
return 2.0;
}
return _origHist.dist(TrackingHistogram(_image(rect),_nh,_ns,_nv));
......
......@@ -261,7 +261,7 @@ void DisparityWLSFilterImpl::filter_(InputArray disparity_map_left, InputArray l
resize_factor = disparity_map_left.cols()/(float)left_view.cols();
else
resize_factor = 1.0;
if(ROI.area()!=0) /* user provided a ROI */
if(!ROI.empty()) /* user provided a ROI */
valid_disp_ROI = ROI;
else
valid_disp_ROI = Rect(left_offset,top_offset,
......
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