-Wunused-but-set-variable warnings fix after XCode update with clang 13.1.

pull/3434/head
Alexander Smorkalov 2 years ago
parent 403504609f
commit f149f26ca0
  1. 2
      modules/barcode/src/decoder/ean8_decoder.cpp
  2. 9
      modules/ccalib/src/ccalib.cpp
  3. 2
      modules/intensity_transform/src/bimef.cpp
  4. 8
      modules/line_descriptor/src/binary_descriptor_matcher.cpp
  5. 2
      modules/rgbd/src/nonrigid_icp.cpp
  6. 9
      modules/stereo/src/stereo_binary_bm.cpp
  7. 5
      modules/structured_light/src/graycodepattern.cpp
  8. 2
      modules/tracking/src/multiTracker.cpp
  9. 2
      modules/tracking/src/tldDetector.cpp
  10. 3
      modules/wechat_qrcode/src/zxing/qrcode/detector/detector.cpp
  11. 2
      modules/ximgproc/src/sparse_match_interpolators.cpp

@ -27,7 +27,6 @@ Result Ean8Decoder::decode(const vector<uchar> &data) const
uint start = pattern.second;
Counter counter(vector<int>{0, 0, 0, 0});
size_t end = data.size();
int first_char_bit = 0;
for (int i = 0; i < 4 && start < end; ++i)
{
int bestMatch = decodeDigit(data, counter, start, get_A_or_C_Patterns());
@ -37,7 +36,6 @@ Result Ean8Decoder::decode(const vector<uchar> &data) const
}
decode_result[i] = static_cast<char>('0' + bestMatch % 10);
start = counter.sum + start;
first_char_bit += (bestMatch >= 10) << i;
}
Counter middle_counter(vector<int>(MIDDLE_PATTERN().size()));

@ -246,23 +246,14 @@ void CustomPattern::check_matches(vector<Point2f>& matched, const vector<Point2f
vector<Point2f> proj;
perspectiveTransform(pattern, proj, H);
int deleted = 0;
double error_sum = 0;
double error_sum_filtered = 0;
for (uint i = 0; i < proj.size(); ++i)
{
double error = norm(matched[i] - proj[i]);
error_sum += error;
if (error >= MAX_PROJ_ERROR_PX)
{
deleteStdVecElem(good, i);
deleteStdVecElem(matched, i);
deleteStdVecElem(pattern_3d, i);
++deleted;
}
else
{
error_sum_filtered += error;
}
}
}

@ -345,7 +345,6 @@ static double minimize_scalar_bounded(const Mat_<float>& I, double begin, double
double rat = 0.0, e = 0.0;
double x = xf;
double fx = -entropy(applyK(I, static_cast<float>(x)));
int num = 1;
double fu = std::numeric_limits<double>::infinity();
double ffulc = fx, fnfc = fx;
@ -398,7 +397,6 @@ static double minimize_scalar_bounded(const Mat_<float>& I, double begin, double
double si = sgn(rat) + (rat == 0);
x = xf + si * std::max(std::abs(rat), tol1);
fu = -entropy(applyK(I, static_cast<float>(x)));
num += 1;
if (fu <= fx) {
if (x >= xf) {

@ -642,11 +642,6 @@ void BinaryDescriptorMatcher::Mihasher::query( UINT32* results, UINT32* numres,
/* number of candidates tested with full codes (not counting duplicates) */
UINT32 nc = 0;
/* counting everything retrieved (duplicates are counted multiple times)
number of lookups (and xors) */
UINT32 nl = 0;
UINT32 nd = 0;
UINT32 *arr;
int size = 0;
UINT32 index;
@ -672,8 +667,6 @@ void BinaryDescriptorMatcher::Mihasher::query( UINT32* results, UINT32* numres,
else
curb = b - 1;
UINT64 chunksk = chunks[k];
/* number of bit-strings with s number of 1s */
nl += xornum[s + 1] - xornum[s];
/* the bit-string with s number of 1s */
UINT64 bitstr = 0;
@ -706,7 +699,6 @@ void BinaryDescriptorMatcher::Mihasher::query( UINT32* results, UINT32* numres,
arr = H[k].query( chunksk ^ bitstr, &size ); // lookup
if( size )
{ /* the corresponding bucket is not empty */
nd += size;
for ( int c = 0; c < size; c++ )
{
index = arr[c];

@ -365,7 +365,6 @@ bool ICPImpl::estimateWarpNodes(WarpField& currentWarp, const Affine3f &pose,
std::cout << "median: " << med << " from " << residuals.size() << " residuals " << std::endl;
float sigma = MAD_SCALE * median(residuals);
float total_error = 0;
int pix_count = 0;
for(int y = 0; y < oldPoints.size().height; y++)
@ -395,7 +394,6 @@ bool ICPImpl::estimateWarpNodes(WarpField& currentWarp, const Affine3f &pose,
float rd = Nc.at<Vec3f>(y, x).dot(diff);
total_error += tukeyWeight(rd, sigma) * rd * rd;
pix_count++;
int n;

@ -341,15 +341,6 @@ namespace cv
}
Mat left = preFilteredImg0, right = preFilteredImg1;
int ndisp = params.numDisparities;
int wsz = params.kernelSize;
int bufSize0 = (int)((ndisp + 2)*sizeof(int));
bufSize0 += (int)((height + wsz + 2)*ndisp*sizeof(int));
bufSize0 += (int)((height + wsz + 2)*sizeof(int));
bufSize0 += (int)((height + wsz + 2)*ndisp*(wsz + 2)*sizeof(uchar) + 256);
int bufSize1 = (int)((width + params.preFilterSize + 2) * sizeof(int) + 256);
if(params.usePrefilter == true)
{

@ -259,9 +259,6 @@ bool GrayCodePattern_Impl::decode( const std::vector< std::vector<Mat> >& patter
Mat& disparityMap_ = *( Mat* ) disparityMap.getObj();
disparityMap_ = Mat( cam_height, cam_width, CV_64F, double( 0 ) );
double number_of_pixels_cam1 = 0;
double number_of_pixels_cam2 = 0;
for( int i = 0; i < params.width; i++ )
{
for( int j = 0; j < params.height; j++ )
@ -278,8 +275,6 @@ bool GrayCodePattern_Impl::decode( const std::vector< std::vector<Mat> >& patter
double sump1x = 0;
double sump2x = 0;
number_of_pixels_cam1 += cam1Pixs.size();
number_of_pixels_cam2 += cam2Pixs.size();
for( int c1 = 0; c1 < (int) cam1Pixs.size(); c1++ )
{
p1 = cam1Pixs[c1];

@ -279,7 +279,6 @@ namespace impl {
Mat tmp;
int dx = initSize.width / 10, dy = initSize.height / 10;
Size2d size = img.size();
double scale = 1.0;
int npos = 0, nneg = 0;
double maxSc = -5.0;
Rect2d maxScRect;
@ -348,7 +347,6 @@ namespace impl {
scaleID++;
size.width /= tld::SCALE_STEP;
size.height /= tld::SCALE_STEP;
scale *= tld::SCALE_STEP;
resize(img, tmp, size, 0, 0, tld::DOWNSCALE_MODE);
resized_imgs.push_back(tmp);
GaussianBlur(resized_imgs[scaleID], tmp, tld::GaussBlurKernelSize, 0.0f);

@ -363,7 +363,6 @@ namespace tld {
Mat tmp;
int dx = initSize.width / 10, dy = initSize.height / 10;
Size2d size = img.size();
double scale = 1.0;
int npos = 0, nneg = 0;
double maxSc = -5.0;
Rect2d maxScRect;
@ -398,7 +397,6 @@ namespace tld {
scaleID++;
size.width /= SCALE_STEP;
size.height /= SCALE_STEP;
scale *= SCALE_STEP;
resize(img, tmp, size, 0, 0, DOWNSCALE_MODE);
resized_imgs.push_back(tmp);
GaussianBlur(resized_imgs[scaleID], tmp, GaussBlurKernelSize, 0.0f);

@ -684,7 +684,7 @@ int Detector::fitLine(vector<Ref<ResultPoint> > &oldPoints, float &k, float &b,
int num = fitPoints.size();
if (num < 2) return -1;
double x = 0, y = 0, xx = 0, xy = 0, yy = 0, tem = 0;
double x = 0, y = 0, xx = 0, xy = 0, tem = 0;
for (int i = 0; i < num; i++) {
int point_x = fitPoints[i]->getX();
int point_y = fitPoints[i]->getY();
@ -692,7 +692,6 @@ int Detector::fitLine(vector<Ref<ResultPoint> > &oldPoints, float &k, float &b,
y += point_y;
xx += point_x * point_x;
xy += point_x * point_y;
yy += point_y * point_y;
}
tem = xx * num - x * x;

@ -1765,7 +1765,6 @@ int RICInterpolatorImpl::PropagateModels(int spCnt, Mat & spNN, vector<int> & su
{
parallel_for_(Range(0, spCnt), [&](const Range& range)
{
int averInlier = 0;
int minPtCnt = 30;
for (int i = range.start; i < range.end; i++)
{
@ -1795,7 +1794,6 @@ int RICInterpolatorImpl::PropagateModels(int spCnt, Mat & spNN, vector<int> & su
fitModel.reshape(1, 1).copyTo(outModels.row(i));
}
averInlier += inlierCnt;
}
}
);

Loading…
Cancel
Save