Skip to content

Commit ca6f422

Browse files
committed
Merge pull request #3123 from sturkmen72:legacy_constants
2 parents a5cc475 + 180775f commit ca6f422

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

modules/cudaarithm/include/opencv2/cudaarithm.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -662,11 +662,11 @@ CV_EXPORTS_W void countNonZero(InputArray src, OutputArray dst, Stream& stream =
662662
@param dim Dimension index along which the matrix is reduced. 0 means that the matrix is reduced
663663
to a single row. 1 means that the matrix is reduced to a single column.
664664
@param reduceOp Reduction operation that could be one of the following:
665-
- **CV_REDUCE_SUM** The output is the sum of all rows/columns of the matrix.
666-
- **CV_REDUCE_AVG** The output is the mean vector of all rows/columns of the matrix.
667-
- **CV_REDUCE_MAX** The output is the maximum (column/row-wise) of all rows/columns of the
665+
- **REDUCE_SUM** The output is the sum of all rows/columns of the matrix.
666+
- **REDUCE_AVG** The output is the mean vector of all rows/columns of the matrix.
667+
- **REDUCE_MAX** The output is the maximum (column/row-wise) of all rows/columns of the
668668
matrix.
669-
- **CV_REDUCE_MIN** The output is the minimum (column/row-wise) of all rows/columns of the
669+
- **REDUCE_MIN** The output is the minimum (column/row-wise) of all rows/columns of the
670670
matrix.
671671
@param dtype When it is negative, the destination vector will have the same type as the source
672672
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
675675
The function reduce reduces the matrix to a vector by treating the matrix rows/columns as a set of
676676
1D vectors and performing the specified operation on the vectors until a single row/column is
677677
obtained. For example, the function can be used to compute horizontal and vertical projections of a
678-
raster image. In case of CV_REDUCE_SUM and CV_REDUCE_AVG , the output may have a larger element
678+
raster image. In case of REDUCE_SUM and REDUCE_AVG , the output may have a larger element
679679
bit-depth to preserve accuracy. And multi-channel arrays are also supported in these two reduction
680680
modes.
681681

modules/xobjdetect/src/lbpfeatures.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void CvLBPEvaluator::generateFeatures()
9393

9494
CvLBPEvaluator::Feature::Feature()
9595
{
96-
rect = cvRect(0, 0, 0, 0);
96+
rect = Rect(0, 0, 0, 0);
9797
}
9898

9999
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
108108

109109
void CvLBPEvaluator::Feature::calcPoints(int offset)
110110
{
111-
Rect tr = rect = cvRect(x_, y_, block_w_, block_h_);
111+
Rect tr = rect = Rect(x_, y_, block_w_, block_h_);
112112
CV_SUM_OFFSETS( p[0], p[1], p[4], p[5], tr, offset )
113113
tr.x += 2*rect.width;
114114
CV_SUM_OFFSETS( p[2], p[3], p[6], p[7], tr, offset )

modules/xobjdetect/src/precomp.hpp

-5
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,9 @@ the use of this software, even if advised of the possibility of such damage.
4646
#define __OPENCV_XOBJDETECT_PRECOMP_HPP__
4747

4848
#include <opencv2/xobjdetect.hpp>
49-
5049
#include <opencv2/core/utility.hpp>
51-
5250
#include <opencv2/imgproc.hpp>
53-
#include <opencv2/imgproc/types_c.h>
54-
5551
#include <opencv2/core.hpp>
56-
5752
#include <opencv2/imgcodecs.hpp>
5853
#include <opencv2/objdetect.hpp>
5954

modules/xobjdetect/src/waldboost.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ static void compute_min_step(const Mat &data_pos, const Mat &data_neg, size_t n_
7373

7474
Mat reduced_pos, reduced_neg;
7575

76-
reduce(data_pos, reduced_pos, 1, CV_REDUCE_MIN);
77-
reduce(data_neg, reduced_neg, 1, CV_REDUCE_MIN);
76+
reduce(data_pos, reduced_pos, 1, REDUCE_MIN);
77+
reduce(data_neg, reduced_neg, 1, REDUCE_MIN);
7878
min(reduced_pos, reduced_neg, data_min);
7979
data_min -= 0.01;
8080

8181
Mat data_max;
82-
reduce(data_pos, reduced_pos, 1, CV_REDUCE_MAX);
83-
reduce(data_neg, reduced_neg, 1, CV_REDUCE_MAX);
82+
reduce(data_pos, reduced_pos, 1, REDUCE_MAX);
83+
reduce(data_neg, reduced_neg, 1, REDUCE_MAX);
8484
max(reduced_pos, reduced_neg, data_max);
8585
data_max += 0.01;
8686

modules/xobjdetect/src/wbdetector.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ void WBDetectorImpl::train(
108108
vector<Mat> pos_imgs = read_imgs(pos_samples_path);
109109
vector<Mat> neg_imgs = sample_patches(neg_imgs_path, 24, 24, pos_imgs.size() * 10);
110110

111-
assert(pos_imgs.size());
112-
assert(neg_imgs.size());
111+
CV_Assert(pos_imgs.size());
112+
CV_Assert(neg_imgs.size());
113113

114114
int n_features;
115115
Mat pos_data, neg_data;
@@ -173,7 +173,7 @@ void WBDetectorImpl::train(
173173
if (confidences.rows > 0) {
174174
Mat1i indices;
175175
sortIdx(confidences, indices,
176-
CV_SORT_EVERY_COLUMN + CV_SORT_DESCENDING);
176+
SORT_EVERY_COLUMN + SORT_DESCENDING);
177177

178178
int win_count = min(max_per_image, confidences.rows);
179179
win_count = min(win_count, stage_neg - bootstrap_count);
@@ -209,7 +209,7 @@ void WBDetectorImpl::detect(
209209
Ptr<CvFeatureEvaluator> eval = CvFeatureEvaluator::create();
210210
eval->init(params, 1, Size(24, 24));
211211
boost_.detect(eval, img, scales, bboxes, confidences);
212-
assert(confidences.size() == bboxes.size());
212+
CV_Assert(confidences.size() == bboxes.size());
213213
}
214214

215215
Ptr<WBDetector>

0 commit comments

Comments
 (0)