Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -1342,7 +1342,7 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std::
|
||||
|
||||
size_t i, nscales = scales.size();
|
||||
cv::AutoBuffer<int> stripeSizeBuf(nscales);
|
||||
int* stripeSizes = stripeSizeBuf;
|
||||
int* stripeSizes = stripeSizeBuf.data();
|
||||
const FeatureEvaluator::ScaleData* s = &featureEvaluator->getScaleData(0);
|
||||
Size szw = s->getWorkingSize(data.origWinSize);
|
||||
int nstripes = cvCeil(szw.width/32.);
|
||||
|
||||
@@ -297,7 +297,7 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
|
||||
#endif
|
||||
|
||||
AutoBuffer<int> mapbuf(gradsize.width + gradsize.height + 4);
|
||||
int* xmap = (int*)mapbuf + 1;
|
||||
int* xmap = mapbuf.data() + 1;
|
||||
int* ymap = xmap + gradsize.width + 2;
|
||||
|
||||
const int borderType = (int)BORDER_REFLECT_101;
|
||||
@@ -312,7 +312,7 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
|
||||
// x- & y- derivatives for the whole row
|
||||
int width = gradsize.width;
|
||||
AutoBuffer<float> _dbuf(width*4);
|
||||
float* const dbuf = _dbuf;
|
||||
float* const dbuf = _dbuf.data();
|
||||
Mat Dx(1, width, CV_32F, dbuf);
|
||||
Mat Dy(1, width, CV_32F, dbuf + width);
|
||||
Mat Mag(1, width, CV_32F, dbuf + width*2);
|
||||
@@ -656,7 +656,7 @@ void HOGCache::init(const HOGDescriptor* _descriptor,
|
||||
|
||||
{
|
||||
AutoBuffer<float> di(blockSize.height), dj(blockSize.width);
|
||||
float* _di = (float*)di, *_dj = (float*)dj;
|
||||
float* _di = di.data(), *_dj = dj.data();
|
||||
float bh = blockSize.height * 0.5f, bw = blockSize.width * 0.5f;
|
||||
|
||||
i = 0;
|
||||
|
||||
@@ -71,8 +71,11 @@ bool QRDecode::localization()
|
||||
Point begin, end;
|
||||
|
||||
std::vector<Vec3d> list_lines_x = searchVerticalLines();
|
||||
if (list_lines_x.empty()) return false;
|
||||
std::vector<Vec3d> list_lines_y = separateHorizontalLines(list_lines_x);
|
||||
if (list_lines_y.empty()) return false;
|
||||
std::vector<Vec3d> result_point = pointClustering(list_lines_y);
|
||||
if (result_point.empty()) return false;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
localization_points.push_back(
|
||||
|
||||
@@ -1193,7 +1193,7 @@ void HOGDescriptorTester::computeGradient(const Mat& img, Mat& grad, Mat& qangle
|
||||
_lut(0,i) = (float)i;
|
||||
|
||||
AutoBuffer<int> mapbuf(gradsize.width + gradsize.height + 4);
|
||||
int* xmap = (int*)mapbuf + 1;
|
||||
int* xmap = mapbuf.data() + 1;
|
||||
int* ymap = xmap + gradsize.width + 2;
|
||||
|
||||
const int borderType = (int)BORDER_REFLECT_101;
|
||||
@@ -1208,7 +1208,7 @@ void HOGDescriptorTester::computeGradient(const Mat& img, Mat& grad, Mat& qangle
|
||||
// x- & y- derivatives for the whole row
|
||||
int width = gradsize.width;
|
||||
AutoBuffer<float> _dbuf(width*4);
|
||||
float* dbuf = _dbuf;
|
||||
float* dbuf = _dbuf.data();
|
||||
Mat Dx(1, width, CV_32F, dbuf);
|
||||
Mat Dy(1, width, CV_32F, dbuf + width);
|
||||
Mat Mag(1, width, CV_32F, dbuf + width*2);
|
||||
|
||||
Reference in New Issue
Block a user