1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-17 15:26:00 +08:00

Merge pull request #2987 from vrabaud:3.4

This commit is contained in:
Alexander Alekhin
2021-06-29 20:56:04 +00:00
5 changed files with 9 additions and 9 deletions

View File

@@ -206,7 +206,7 @@ void SyntheticSequenceGenerator::getNextFrame(OutputArray _frame, OutputArray _g
_gtMask.create(sz, CV_8U);
Mat gtMask = _gtMask.getMat();
gtMask = 0;
gtMask.setTo(cv::Scalar::all(0));
gtMask(Rect(Point2i(pos), objSz)) = 255;
pos += dir * objspeed;

View File

@@ -276,9 +276,9 @@ public:
//Different with PHash, this part reverse the row size and col size,
//because cv::Mat is row major but not column major
projections_.create(numOfAngelLine_, D, CV_8U);
projections_ = 0;
projections_.setTo(cv::Scalar::all(0));
pixPerLine_.create(1, numOfAngelLine_, CV_32S);
pixPerLine_ = 0;
pixPerLine_.setTo(cv::Scalar::all(0));
int const xOff = createOffSet(input.cols);
int const yOff = createOffSet(input.rows);

View File

@@ -4030,8 +4030,8 @@ void MSERsToERStats(InputArray image, vector<vector<Point> > &contours, vector<v
mser_regions[1].push_back(cser);
}
mask(cser.rect) = 0;
mtmp(cser.rect) = 0;
mask(cser.rect).setTo(cv::Scalar::all(0));
mtmp(cser.rect).setTo(cv::Scalar::all(0));
}
}

View File

@@ -146,10 +146,10 @@ namespace cv
{
// Prepare space for new centroid values.
Mat tmpCentroids(clusters.size(), clusters.type());
tmpCentroids = 0;
tmpCentroids.setTo(cv::Scalar::all(0));
// Clear weights for new iteration.
clusters(Rect(WEIGHT_IDX, 0, 1, clusters.rows)) = 0;
clusters(Rect(WEIGHT_IDX, 0, 1, clusters.rows)).setTo(cv::Scalar::all(0));
// Compute affiliation of points and sum new coordinates for centroids.
for (int iSample = 0; iSample < samples.rows; iSample++)

View File

@@ -513,8 +513,8 @@ void FastLineDetectorImpl::lineDetection(const Mat& src, std::vector<SEGMENT>& s
{
Canny(src, canny, canny_th1, canny_th2, canny_aperture_size);
}
canny.colRange(0,6).rowRange(0,6) = 0;
canny.colRange(src.cols-5,src.cols).rowRange(src.rows-5,src.rows) = 0;
canny.colRange(0,6).rowRange(0,6).setTo(cv::Scalar::all(0));
canny.colRange(src.cols-5,src.cols).rowRange(src.rows-5,src.rows).setTo(cv::Scalar::all(0));
SEGMENT seg, seg1, seg2;