Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -177,6 +177,7 @@ void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, OutputA
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_Assert( !vocabulary.empty() );
|
||||
CV_Assert(!keypointDescriptors.empty());
|
||||
|
||||
int clusterCount = descriptorSize(); // = vocabulary.rows
|
||||
|
||||
|
||||
@@ -264,6 +264,8 @@ void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImag
|
||||
convexHull(Mat(contours[contourIdx]), hull);
|
||||
double area = contourArea(Mat(contours[contourIdx]));
|
||||
double hullArea = contourArea(Mat(hull));
|
||||
if (fabs(hullArea) < DBL_EPSILON)
|
||||
continue;
|
||||
double ratio = area / hullArea;
|
||||
if (ratio < params.minConvexity || ratio >= params.maxConvexity)
|
||||
continue;
|
||||
@@ -309,6 +311,7 @@ void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>&
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
keypoints.clear();
|
||||
CV_Assert(params.minRepeatability != 0);
|
||||
Mat grayscaleImage;
|
||||
if (image.channels() == 3 || image.channels() == 4)
|
||||
cvtColor(image, grayscaleImage, COLOR_BGR2GRAY);
|
||||
|
||||
@@ -506,6 +506,7 @@ BRISK_Impl::smoothedIntensity(const cv::Mat& image, const cv::Mat& integral, con
|
||||
// scaling:
|
||||
const int scaling = (int)(4194304.0 / area);
|
||||
const int scaling2 = int(float(scaling) * area / 1024.0);
|
||||
CV_Assert(scaling2 != 0);
|
||||
|
||||
// the integral image is larger:
|
||||
const int integralcols = imagecols + 1;
|
||||
@@ -2238,6 +2239,7 @@ BriskLayer::value(const cv::Mat& mat, float xf, float yf, float scale_in) const
|
||||
// scaling:
|
||||
const int scaling = (int)(4194304.0f / area);
|
||||
const int scaling2 = (int)(float(scaling) * area / 1024.0f);
|
||||
CV_Assert(scaling2 != 0);
|
||||
|
||||
// calculate borders
|
||||
const float x_1 = xf - sigma_half;
|
||||
|
||||
Reference in New Issue
Block a user