diff --git a/modules/cudaarithm/include/opencv2/cudaarithm.hpp b/modules/cudaarithm/include/opencv2/cudaarithm.hpp index 246d0dfd313..60ec3ca49f2 100644 --- a/modules/cudaarithm/include/opencv2/cudaarithm.hpp +++ b/modules/cudaarithm/include/opencv2/cudaarithm.hpp @@ -662,11 +662,11 @@ CV_EXPORTS_W void countNonZero(InputArray src, OutputArray dst, Stream& stream = @param dim Dimension index along which the matrix is reduced. 0 means that the matrix is reduced to a single row. 1 means that the matrix is reduced to a single column. @param reduceOp Reduction operation that could be one of the following: -- **CV_REDUCE_SUM** The output is the sum of all rows/columns of the matrix. -- **CV_REDUCE_AVG** The output is the mean vector of all rows/columns of the matrix. -- **CV_REDUCE_MAX** The output is the maximum (column/row-wise) of all rows/columns of the +- **REDUCE_SUM** The output is the sum of all rows/columns of the matrix. +- **REDUCE_AVG** The output is the mean vector of all rows/columns of the matrix. +- **REDUCE_MAX** The output is the maximum (column/row-wise) of all rows/columns of the matrix. -- **CV_REDUCE_MIN** The output is the minimum (column/row-wise) of all rows/columns of the +- **REDUCE_MIN** The output is the minimum (column/row-wise) of all rows/columns of the matrix. @param dtype When it is negative, the destination vector will have the same type as the source matrix. Otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), mtx.channels()) . @@ -675,7 +675,7 @@ matrix. Otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), mtx.channe The function reduce reduces the matrix to a vector by treating the matrix rows/columns as a set of 1D vectors and performing the specified operation on the vectors until a single row/column is obtained. For example, the function can be used to compute horizontal and vertical projections of a -raster image. In case of CV_REDUCE_SUM and CV_REDUCE_AVG , the output may have a larger element +raster image. In case of REDUCE_SUM and REDUCE_AVG , the output may have a larger element bit-depth to preserve accuracy. And multi-channel arrays are also supported in these two reduction modes. diff --git a/modules/xobjdetect/src/lbpfeatures.cpp b/modules/xobjdetect/src/lbpfeatures.cpp index 3f67ea88af7..4e1c8d29705 100644 --- a/modules/xobjdetect/src/lbpfeatures.cpp +++ b/modules/xobjdetect/src/lbpfeatures.cpp @@ -93,7 +93,7 @@ void CvLBPEvaluator::generateFeatures() CvLBPEvaluator::Feature::Feature() { - rect = cvRect(0, 0, 0, 0); + rect = Rect(0, 0, 0, 0); } CvLBPEvaluator::Feature::Feature( int offset, int x, int y, int _blockWidth, int _blockHeight ) @@ -108,7 +108,7 @@ CvLBPEvaluator::Feature::Feature( int offset, int x, int y, int _blockWidth, int void CvLBPEvaluator::Feature::calcPoints(int offset) { - Rect tr = rect = cvRect(x_, y_, block_w_, block_h_); + Rect tr = rect = Rect(x_, y_, block_w_, block_h_); CV_SUM_OFFSETS( p[0], p[1], p[4], p[5], tr, offset ) tr.x += 2*rect.width; CV_SUM_OFFSETS( p[2], p[3], p[6], p[7], tr, offset ) diff --git a/modules/xobjdetect/src/precomp.hpp b/modules/xobjdetect/src/precomp.hpp index 0fa5d928176..cd454645158 100644 --- a/modules/xobjdetect/src/precomp.hpp +++ b/modules/xobjdetect/src/precomp.hpp @@ -46,14 +46,9 @@ the use of this software, even if advised of the possibility of such damage. #define __OPENCV_XOBJDETECT_PRECOMP_HPP__ #include - #include - #include -#include - #include - #include #include diff --git a/modules/xobjdetect/src/waldboost.cpp b/modules/xobjdetect/src/waldboost.cpp index 38b18a9df17..9601755a101 100644 --- a/modules/xobjdetect/src/waldboost.cpp +++ b/modules/xobjdetect/src/waldboost.cpp @@ -73,14 +73,14 @@ static void compute_min_step(const Mat &data_pos, const Mat &data_neg, size_t n_ Mat reduced_pos, reduced_neg; - reduce(data_pos, reduced_pos, 1, CV_REDUCE_MIN); - reduce(data_neg, reduced_neg, 1, CV_REDUCE_MIN); + reduce(data_pos, reduced_pos, 1, REDUCE_MIN); + reduce(data_neg, reduced_neg, 1, REDUCE_MIN); min(reduced_pos, reduced_neg, data_min); data_min -= 0.01; Mat data_max; - reduce(data_pos, reduced_pos, 1, CV_REDUCE_MAX); - reduce(data_neg, reduced_neg, 1, CV_REDUCE_MAX); + reduce(data_pos, reduced_pos, 1, REDUCE_MAX); + reduce(data_neg, reduced_neg, 1, REDUCE_MAX); max(reduced_pos, reduced_neg, data_max); data_max += 0.01; diff --git a/modules/xobjdetect/src/wbdetector.cpp b/modules/xobjdetect/src/wbdetector.cpp index 47f593464dd..0add44bad3a 100644 --- a/modules/xobjdetect/src/wbdetector.cpp +++ b/modules/xobjdetect/src/wbdetector.cpp @@ -108,8 +108,8 @@ void WBDetectorImpl::train( vector pos_imgs = read_imgs(pos_samples_path); vector neg_imgs = sample_patches(neg_imgs_path, 24, 24, pos_imgs.size() * 10); - assert(pos_imgs.size()); - assert(neg_imgs.size()); + CV_Assert(pos_imgs.size()); + CV_Assert(neg_imgs.size()); int n_features; Mat pos_data, neg_data; @@ -173,7 +173,7 @@ void WBDetectorImpl::train( if (confidences.rows > 0) { Mat1i indices; sortIdx(confidences, indices, - CV_SORT_EVERY_COLUMN + CV_SORT_DESCENDING); + SORT_EVERY_COLUMN + SORT_DESCENDING); int win_count = min(max_per_image, confidences.rows); win_count = min(win_count, stage_neg - bootstrap_count); @@ -209,7 +209,7 @@ void WBDetectorImpl::detect( Ptr eval = CvFeatureEvaluator::create(); eval->init(params, 1, Size(24, 24)); boost_.detect(eval, img, scales, bboxes, confidences); - assert(confidences.size() == bboxes.size()); + CV_Assert(confidences.size() == bboxes.size()); } Ptr