Skip to content

Commit 457740f

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents 4024870 + e9e5070 commit 457740f

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

modules/bgsegm/src/synthetic_seq.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void SyntheticSequenceGenerator::getNextFrame(OutputArray _frame, OutputArray _g
206206

207207
_gtMask.create(sz, CV_8U);
208208
Mat gtMask = _gtMask.getMat();
209-
gtMask = 0;
209+
gtMask.setTo(cv::Scalar::all(0));
210210
gtMask(Rect(Point2i(pos), objSz)) = 255;
211211

212212
pos += dir * objspeed;

modules/img_hash/src/radial_variance_hash.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ class RadialVarianceHashImpl CV_FINAL : public ImgHashBase::ImgHashImpl
276276
//Different with PHash, this part reverse the row size and col size,
277277
//because cv::Mat is row major but not column major
278278
projections_.create(numOfAngelLine_, D, CV_8U);
279-
projections_ = 0;
279+
projections_.setTo(cv::Scalar::all(0));
280280
pixPerLine_.create(1, numOfAngelLine_, CV_32S);
281-
pixPerLine_ = 0;
281+
pixPerLine_.setTo(cv::Scalar::all(0));
282282
int const xOff = createOffSet(input.cols);
283283
int const yOff = createOffSet(input.rows);
284284

modules/text/src/erfilter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4030,8 +4030,8 @@ void MSERsToERStats(InputArray image, vector<vector<Point> > &contours, vector<v
40304030
mser_regions[1].push_back(cser);
40314031
}
40324032

4033-
mask(cser.rect) = 0;
4034-
mtmp(cser.rect) = 0;
4033+
mask(cser.rect).setTo(cv::Scalar::all(0));
4034+
mtmp(cser.rect).setTo(cv::Scalar::all(0));
40354035
}
40364036
}
40374037

modules/xfeatures2d/src/pct_signatures/pct_clusterizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ namespace cv
146146
{
147147
// Prepare space for new centroid values.
148148
Mat tmpCentroids(clusters.size(), clusters.type());
149-
tmpCentroids = 0;
149+
tmpCentroids.setTo(cv::Scalar::all(0));
150150

151151
// Clear weights for new iteration.
152-
clusters(Rect(WEIGHT_IDX, 0, 1, clusters.rows)) = 0;
152+
clusters(Rect(WEIGHT_IDX, 0, 1, clusters.rows)).setTo(cv::Scalar::all(0));
153153

154154
// Compute affiliation of points and sum new coordinates for centroids.
155155
for (int iSample = 0; iSample < samples.rows; iSample++)

modules/ximgproc/src/fast_line_detector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ void FastLineDetectorImpl::lineDetection(const Mat& src, std::vector<SEGMENT>& s
513513
{
514514
Canny(src, canny, canny_th1, canny_th2, canny_aperture_size);
515515
}
516-
canny.colRange(0,6).rowRange(0,6) = 0;
517-
canny.colRange(src.cols-5,src.cols).rowRange(src.rows-5,src.rows) = 0;
516+
canny.colRange(0,6).rowRange(0,6).setTo(cv::Scalar::all(0));
517+
canny.colRange(src.cols-5,src.cols).rowRange(src.rows-5,src.rows).setTo(cv::Scalar::all(0));
518518

519519
SEGMENT seg, seg1, seg2;
520520

modules/ximgproc/src/seeds.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ class SuperpixelSEEDSImpl : public SuperpixelSEEDS
136136
//compute initial label for sublevels: level <= seeds_top_level
137137
//this is an equally sized grid with size nr_h[level]*nr_w[level]
138138
int computeLabel(int level, int x, int y) {
139-
return std::min(y / (height / nr_wh[2 * level + 1]), nr_wh[2 * level + 1] - 1) * nr_wh[2 * level]
140-
+ std::min((x / (width / nr_wh[2 * level])), nr_wh[2 * level] - 1);
139+
return std::min(y * nr_wh[2 * level + 1] / height, nr_wh[2 * level + 1] - 1) * nr_wh[2 * level]
140+
+ std::min(x * nr_wh[2 * level] / width, nr_wh[2 * level] - 1);
141141
}
142142
inline int nrLabels(int level) const {
143143
return nr_wh[2 * level + 1] * nr_wh[2 * level];

0 commit comments

Comments
 (0)