diff --git a/modules/datasets/src/fr_adience.cpp b/modules/datasets/src/fr_adience.cpp index 7517aa4a99a..49fa242f9db 100644 --- a/modules/datasets/src/fr_adience.cpp +++ b/modules/datasets/src/fr_adience.cpp @@ -172,7 +172,6 @@ void FR_adienceImp::cv5ToSplits(vector< Ptr > fileList[5]) void FR_adienceImp::loadDataset(const string &path) { // collect real image names - unsigned int num = 0; vector userNames; getDirList(path+"faces/", userNames); for (vector::iterator itU=userNames.begin(); itU!=userNames.end(); ++itU) @@ -185,11 +184,9 @@ void FR_adienceImp::loadDataset(const string &path) if (name.length()>3 && name.substr(name.length()-4) == ".jpg") { realNames[*itU].push_back(name); - num++; } } } - //printf("total images number: %u\n", num); vector< Ptr > fileList[5]; for (unsigned int i=0; i<5; ++i) diff --git a/modules/datasets/src/track_alov.cpp b/modules/datasets/src/track_alov.cpp index 2213c0f68a4..0862ba0f84a 100644 --- a/modules/datasets/src/track_alov.cpp +++ b/modules/datasets/src/track_alov.cpp @@ -247,7 +247,6 @@ void TRACK_alovImpl::loadDataset(const string &rootPath) void TRACK_alovImpl::loadDatasetAnnotatedOnly(const string &rootPath) { vector datasetsLengths; - int currDatasetID = 0; printf("ALOV300++ Annotated Dataset Initialization...\n"); @@ -258,7 +257,6 @@ void TRACK_alovImpl::loadDatasetAnnotatedOnly(const string &rootPath) for (int k = 0; k < sectionSizes[i]; k++) { vector > objects; - currDatasetID++; //Open dataset's ground truth (annotation) file string annoPath = fullAnnoPath(rootPath, i, k); diff --git a/modules/line_descriptor/src/binary_descriptor_matcher.cpp b/modules/line_descriptor/src/binary_descriptor_matcher.cpp index d4211d76dd8..93e0b550764 100644 --- a/modules/line_descriptor/src/binary_descriptor_matcher.cpp +++ b/modules/line_descriptor/src/binary_descriptor_matcher.cpp @@ -639,9 +639,6 @@ void BinaryDescriptorMatcher::Mihasher::query( UINT32* results, UINT32* numres, /* number of results so far obtained (up to a distance of s per chunk) */ UINT32 n = 0; - /* number of candidates tested with full codes (not counting duplicates) */ - UINT32 nc = 0; - UINT32 *arr; int size = 0; UINT32 index; @@ -707,7 +704,6 @@ void BinaryDescriptorMatcher::Mihasher::query( UINT32* results, UINT32* numres, counter->set( index ); hammd = cv::line_descriptor::match( codes.ptr() + (UINT64) index * ( B_over_8 ), Query, B_over_8 ); - nc++; if( hammd <= D && numres[hammd] < maxres ) res[hammd * K + numres[hammd]] = index + 1; diff --git a/modules/optflow/src/motempl.cpp b/modules/optflow/src/motempl.cpp index 83ff0173905..5f74c7a46cc 100644 --- a/modules/optflow/src/motempl.cpp +++ b/modules/optflow/src/motempl.cpp @@ -157,8 +157,6 @@ void calcMotionGradient( InputArray _mhi, OutputArray _mask, double delta1, double delta2, int aperture_size ) { - static int runcase = 0; runcase++; - Mat mhi = _mhi.getMat(); Size size = mhi.size(); diff --git a/modules/optflow/src/rlof/berlof_invoker.hpp b/modules/optflow/src/rlof/berlof_invoker.hpp index ac866fe5344..8fde6e457c1 100644 --- a/modules/optflow/src/rlof/berlof_invoker.hpp +++ b/modules/optflow/src/rlof/berlof_invoker.hpp @@ -189,9 +189,6 @@ class TrackerInvoker : public cv::ParallelLoopBody int buffIdx = 0; cv::Mat GMc0, GMc1, GMc2, GMc3; cv::Vec2f Mc0, Mc1, Mc2, Mc3; - int noIteration = 0; - int noReusedIteration = 0; - int noSolvedIteration = 0; for( j = 0; j < criteria.maxCount; j++ ) { cv::Point2f delta(0,0); @@ -536,7 +533,6 @@ class TrackerInvoker : public cv::ParallelLoopBody { nextPts[ptidx] = backUpNextPt; } - noIteration++; break; } @@ -612,13 +608,10 @@ class TrackerInvoker : public cv::ParallelLoopBody delta.y = inextPt.y + b - nextPt.y; } // isIn1 != isIn2 } - if( hasSolved == false) - noIteration++; } else { hasSolved = false; - noReusedIteration++; } if( hasSolved == false ) { @@ -635,7 +628,6 @@ class TrackerInvoker : public cv::ParallelLoopBody { nextPt += delta; nextPts[ptidx] = nextPt - halfWin; - noSolvedIteration++; break; } @@ -832,9 +824,6 @@ class TrackerInvoker : public cv::ParallelLoopBody int buffIdx = 0; cv::Mat GMc0, GMc1, GMc2, GMc3; cv::Vec4f Mc0, Mc1, Mc2, Mc3; - int noIteration = 0; - int noReusedIteration = 0; - int noSolvedIteration = 0; for( j = 0; j < criteria.maxCount; j++ ) { cv::Point2f delta(0,0); @@ -859,7 +848,6 @@ class TrackerInvoker : public cv::ParallelLoopBody nextPts[ptidx] = backUpNextPt; gainVecs[ptidx] = backUpGain; } - noIteration++; break; } @@ -1287,7 +1275,6 @@ class TrackerInvoker : public cv::ParallelLoopBody nextPts[ptidx] = backUpNextPt; gainVecs[ptidx] = backUpGain; } - noIteration++; break; } @@ -1399,13 +1386,10 @@ class TrackerInvoker : public cv::ParallelLoopBody } // isIn1 != isIn2 } - if( hasSolved == false) - noIteration++; } else { hasSolved = false; - noReusedIteration++; } if( hasSolved == false ) { @@ -1430,7 +1414,6 @@ class TrackerInvoker : public cv::ParallelLoopBody nextPt += delta; nextPts[ptidx] = nextPt - halfWin; gainVecs[ptidx]= gainVec + deltaGain; - noSolvedIteration++; break; } @@ -1998,9 +1981,6 @@ namespace radial { int j; cv::Mat GMc0, GMc1, GMc2, GMc3; cv::Vec4f Mc0, Mc1, Mc2, Mc3; - int noIteration = 0; - int noReusedIteration = 0; - int noSolvedIteration = 0; for (j = 0; j < criteria.maxCount; j++) { cv::Point2f delta(0, 0); @@ -2025,7 +2005,6 @@ namespace radial { nextPts[ptidx] = backUpNextPt; gainVecs[ptidx] = backUpGain; } - noIteration++; break; } @@ -2291,7 +2270,6 @@ namespace radial { nextPts[ptidx] = backUpNextPt; gainVecs[ptidx] = backUpGain; } - noIteration++; break; } @@ -2403,13 +2381,10 @@ namespace radial { } // isIn1 != isIn2 } - if (hasSolved == false) - noIteration++; } else { hasSolved = false; - noReusedIteration++; } if (hasSolved == false) { @@ -2434,7 +2409,6 @@ namespace radial { nextPt += delta; nextPts[ptidx] = nextPt - halfWin; gainVecs[ptidx] = gainVec + deltaGain; - noSolvedIteration++; break; } diff --git a/modules/optflow/src/rlof/geo_interpolation.cpp b/modules/optflow/src/rlof/geo_interpolation.cpp index 0ac2e1715da..4e625a1a951 100644 --- a/modules/optflow/src/rlof/geo_interpolation.cpp +++ b/modules/optflow/src/rlof/geo_interpolation.cpp @@ -297,15 +297,12 @@ Mat interpolate_irregular_knn( } } - int global_time = 0; - bool done = false; while (!done) { if (my_agents.size() == 0) { done = true; break; } - global_time++; std::multimap::iterator current_it = my_agents.begin(); std::pair current_p = *current_it; diff --git a/modules/rgbd/src/nonrigid_icp.cpp b/modules/rgbd/src/nonrigid_icp.cpp index 31fda306f68..8bcf081873a 100644 --- a/modules/rgbd/src/nonrigid_icp.cpp +++ b/modules/rgbd/src/nonrigid_icp.cpp @@ -365,8 +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); - int pix_count = 0; - for(int y = 0; y < oldPoints.size().height; y++) { for(int x = 0; x < oldPoints.size().width; x++) @@ -394,8 +392,6 @@ bool ICPImpl::estimateWarpNodes(WarpField& currentWarp, const Affine3f &pose, float rd = Nc.at(y, x).dot(diff); - pix_count++; - int n; nodeNeighboursType neighbours = volume->getVoxelNeighbours(p, n); float totalNeighbourWeight = 0.f; diff --git a/modules/stereo/test/test_qds_matching.cpp b/modules/stereo/test/test_qds_matching.cpp index 9b550a80da2..b9449300440 100644 --- a/modules/stereo/test/test_qds_matching.cpp +++ b/modules/stereo/test/test_qds_matching.cpp @@ -12,14 +12,10 @@ static float disparity_MAE(const Mat &reference, const Mat &estimation) { int elems=0; float error=0; - float ref_invalid=0; for (int row=0; row< reference.rows; row++){ for (int col=0; col(row, col); float estimated_val = estimation.at(row, col); - if (ref_val == 0){ - ref_invalid++; - } // filter out pixels with unknown reference value and pixels whose disparity did not get estimated. if (estimated_val == 0 || ref_val == 0 || std::isnan(estimated_val)){ continue; diff --git a/modules/surface_matching/src/icp.cpp b/modules/surface_matching/src/icp.cpp index 684ebd56609..b3c07ecc4c3 100644 --- a/modules/surface_matching/src/icp.cpp +++ b/modules/surface_matching/src/icp.cpp @@ -367,7 +367,7 @@ int ICP::registerModelToScene(const Mat& srcPC, const Mat& dstPC, double& residu if (node) { // select the first node - size_t idx = reinterpret_cast(node->data)-1, dn=0; + size_t idx = reinterpret_cast(node->data)-1; int dup = (int)node->key-1; size_t minIdxD = idx; float minDist = distances[idx]; @@ -383,7 +383,6 @@ int ICP::registerModelToScene(const Mat& srcPC, const Mat& dstPC, double& residu } node = node->next; - dn++; } indicesModel[ selInd ] = newI[ minIdxD ]; diff --git a/modules/text/src/ocr_beamsearch_decoder.cpp b/modules/text/src/ocr_beamsearch_decoder.cpp index 6f34056ed90..2bf630da71e 100644 --- a/modules/text/src/ocr_beamsearch_decoder.cpp +++ b/modules/text/src/ocr_beamsearch_decoder.cpp @@ -611,7 +611,6 @@ void OCRBeamSearchClassifierCNN::eval( InputArray _src, vector< vector > img = src(Rect(Point(x_c,0),Size(window_size,window_size))); - int patch_count = 0; vector< vector > data_pool(9); @@ -652,7 +651,6 @@ void OCRBeamSearchClassifierCNN::eval( InputArray _src, vector< vector > data_pool[7].insert(data_pool[7].end(),patch.begin(),patch.end()); if ((quad_id == 19)||(quad_id == 24)||(quad_id == 20)||(quad_id == 25)) data_pool[8].insert(data_pool[8].end(),patch.begin(),patch.end()); - patch_count++; } } diff --git a/modules/text/src/ocr_hmm_decoder.cpp b/modules/text/src/ocr_hmm_decoder.cpp index 6d61578bdac..688b529ea3a 100644 --- a/modules/text/src/ocr_hmm_decoder.cpp +++ b/modules/text/src/ocr_hmm_decoder.cpp @@ -1028,7 +1028,6 @@ void OCRHMMClassifierCNN::eval( InputArray _src, vector& out_class, vector< Mat quad; Mat tmp; - int patch_count = 0; vector< vector > data_pool(9); @@ -1071,7 +1070,6 @@ void OCRHMMClassifierCNN::eval( InputArray _src, vector& out_class, vector< data_pool[7].insert(data_pool[7].end(),patch.begin(),patch.end()); if ((quad_id == 19)||(quad_id == 24)||(quad_id == 20)||(quad_id == 25)) data_pool[8].insert(data_pool[8].end(),patch.begin(),patch.end()); - patch_count++; } } diff --git a/modules/text/src/text_detector_swt.cpp b/modules/text/src/text_detector_swt.cpp index 75178a5df5a..ba2d2dd0e2b 100644 --- a/modules/text/src/text_detector_swt.cpp +++ b/modules/text/src/text_detector_swt.cpp @@ -597,7 +597,6 @@ vector findValidChains(const Mat& input_image, const Mat& SWTImage, co avgCompi.Blue /= compi.points.size(); colorAverages.push_back(avgCompi); } - int count = 0; std::vector chains; for (size_t i = 0; i < components.size(); i++) { const Component& compi = components[i]; @@ -632,7 +631,6 @@ vector findValidChains(const Mat& input_image, const Mat& SWTImage, co dir.y = dy; chain.dir = dir; chains.push_back(chain); - count++; } } diff --git a/modules/tracking/src/multiTracker.cpp b/modules/tracking/src/multiTracker.cpp index bcc936dddd5..a1451857b92 100644 --- a/modules/tracking/src/multiTracker.cpp +++ b/modules/tracking/src/multiTracker.cpp @@ -207,15 +207,12 @@ using namespace impl; tld::TrackerTLDImpl::Nexpert nExpert(imageForDetector, boundingBoxes[k], tldModel->detector, tracker->params); std::vector > examplesForModel, examplesForEnsemble; examplesForModel.reserve(100); examplesForEnsemble.reserve(100); - int negRelabeled = 0; for (int i = 0; i < (int)detectorResults[k].size(); i++) { bool expertResult; if (detectorResults[k][i].isObject) { expertResult = nExpert(detectorResults[k][i].rect); - if (expertResult != detectorResults[k][i].isObject) - negRelabeled++; } else { @@ -279,7 +276,6 @@ namespace impl { Mat tmp; int dx = initSize.width / 10, dy = initSize.height / 10; Size2d size = img.size(); - int npos = 0, nneg = 0; double maxSc = -5.0; Rect2d maxScRect; int scaleID; @@ -404,8 +400,6 @@ namespace impl { //TLD Model Extraction tldModel = ((tld::TrackerTLDModel*)static_cast(tracker->getModel())); - npos = 0; - nneg = 0; maxSc = -5.0; for (int i = 0; i < (int)ensBuffer[k].size(); i++) @@ -427,13 +421,8 @@ namespace impl { if (!labPatch.isObject) { - nneg++; continue; } - else - { - npos++; - } scValue = tldModel->detector->Sc(standardPatch); if (scValue > maxSc) { @@ -472,8 +461,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; int scaleID; @@ -541,7 +528,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); @@ -598,8 +584,6 @@ namespace impl { tracker = static_cast(trackerPtr); //TLD Model Extraction tldModel = ((tld::TrackerTLDModel*)static_cast(tracker->getModel())); - npos = 0; - nneg = 0; maxSc = -5.0; //Prepare batch of patches @@ -639,13 +623,8 @@ namespace impl { if (!labPatch.isObject) { - nneg++; continue; } - else - { - npos++; - } scValue = resultSc[i]; if (scValue > maxSc) { diff --git a/modules/tracking/src/tldDetector.cpp b/modules/tracking/src/tldDetector.cpp index 283960814cc..b3612a1a96a 100644 --- a/modules/tracking/src/tldDetector.cpp +++ b/modules/tracking/src/tldDetector.cpp @@ -363,7 +363,6 @@ namespace tld { Mat tmp; int dx = initSize.width / 10, dy = initSize.height / 10; Size2d size = img.size(); - int npos = 0, nneg = 0; double maxSc = -5.0; Rect2d maxScRect; int scaleID; @@ -451,13 +450,8 @@ namespace tld { if (!labPatch.isObject) { - nneg++; continue; } - else - { - npos++; - } if (scValue > maxSc) { @@ -483,8 +477,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; int scaleID; @@ -514,7 +506,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); @@ -570,13 +561,8 @@ namespace tld { if (!labPatch.isObject) { - nneg++; continue; } - else - { - npos++; - } scValue = resultSc[i]; if (scValue > maxSc) { diff --git a/modules/tracking/src/tldModel.cpp b/modules/tracking/src/tldModel.cpp index ad787ab8e01..8f9a8f43c88 100644 --- a/modules/tracking/src/tldModel.cpp +++ b/modules/tracking/src/tldModel.cpp @@ -150,7 +150,6 @@ namespace tld { void TrackerTLDModel::integrateRelabeled(Mat& img, Mat& imgBlurred, const std::vector& patches) { Mat_ standardPatch(STANDARD_PATCH_SIZE, STANDARD_PATCH_SIZE), blurredPatch(minSize_); - int positiveIntoModel = 0, negativeIntoModel = 0, positiveIntoEnsemble = 0, negativeIntoEnsemble = 0; for (int k = 0; k < (int)patches.size(); k++) { if (patches[k].shouldBeIntegrated) @@ -158,12 +157,10 @@ namespace tld { resample(img, patches[k].rect, standardPatch); if (patches[k].isObject) { - positiveIntoModel++; pushIntoModel(standardPatch, true); } else { - negativeIntoModel++; pushIntoModel(standardPatch, false); } } @@ -175,10 +172,6 @@ namespace tld { #endif { resample(imgBlurred, patches[k].rect, blurredPatch); - if (patches[k].isObject) - positiveIntoEnsemble++; - else - negativeIntoEnsemble++; for (int i = 0; i < (int)detector->classifiers.size(); i++) detector->classifiers[i].integrate(blurredPatch, patches[k].isObject); } @@ -212,7 +205,6 @@ namespace tld { void TrackerTLDModel::integrateAdditional(const std::vector >& eForModel, const std::vector >& eForEnsemble, bool isPositive) { - int positiveIntoModel = 0, negativeIntoModel = 0, positiveIntoEnsemble = 0, negativeIntoEnsemble = 0; if ((int)eForModel.size() == 0) return; srValues.resize (eForModel.size ()); @@ -225,12 +217,10 @@ namespace tld { { if (isPositive) { - positiveIntoModel++; pushIntoModel(eForModel[k], true); } else { - negativeIntoModel++; pushIntoModel(eForModel[k], false); } } @@ -240,10 +230,6 @@ namespace tld { p /= detector->classifiers.size(); if ((p > ENSEMBLE_THRESHOLD) != isPositive) { - if (isPositive) - positiveIntoEnsemble++; - else - negativeIntoEnsemble++; for (int i = 0; i < (int)detector->classifiers.size(); i++) detector->classifiers[i].integrate(eForEnsemble[k], isPositive); } @@ -253,7 +239,6 @@ namespace tld { #ifdef HAVE_OPENCL void TrackerTLDModel::ocl_integrateAdditional(const std::vector >& eForModel, const std::vector >& eForEnsemble, bool isPositive) { - int positiveIntoModel = 0, negativeIntoModel = 0, positiveIntoEnsemble = 0, negativeIntoEnsemble = 0; if ((int)eForModel.size() == 0) return; //Prepare batch of patches @@ -279,12 +264,10 @@ namespace tld { { if (isPositive) { - positiveIntoModel++; pushIntoModel(eForModel[k], true); } else { - negativeIntoModel++; pushIntoModel(eForModel[k], false); } } @@ -294,10 +277,6 @@ namespace tld { p /= detector->classifiers.size(); if ((p > ENSEMBLE_THRESHOLD) != isPositive) { - if (isPositive) - positiveIntoEnsemble++; - else - negativeIntoEnsemble++; for (int i = 0; i < (int)detector->classifiers.size(); i++) detector->classifiers[i].integrate(eForEnsemble[k], isPositive); } diff --git a/modules/tracking/src/tldTracker.cpp b/modules/tracking/src/tldTracker.cpp index 92038ef2d5e..d4219fbdee4 100644 --- a/modules/tracking/src/tldTracker.cpp +++ b/modules/tracking/src/tldTracker.cpp @@ -207,15 +207,12 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox) Nexpert nExpert(imageForDetector, boundingBox, tldModel->detector, params); std::vector > examplesForModel, examplesForEnsemble; examplesForModel.reserve(100); examplesForEnsemble.reserve(100); - int negRelabeled = 0; for( int i = 0; i < (int)detectorResults.size(); i++ ) { bool expertResult; if( detectorResults[i].isObject ) { expertResult = nExpert(detectorResults[i].rect); - if( expertResult != detectorResults[i].isObject ) - negRelabeled++; } else { diff --git a/modules/tracking/src/trackerSamplerAlgorithm.cpp b/modules/tracking/src/trackerSamplerAlgorithm.cpp index 75dd9a296a2..f75c371d12c 100644 --- a/modules/tracking/src/trackerSamplerAlgorithm.cpp +++ b/modules/tracking/src/trackerSamplerAlgorithm.cpp @@ -349,20 +349,10 @@ std::vector TrackerSamplerCS::patchesRegularScan( const Mat& image, Rect tr return sample; } - int numPatchesX; - int numPatchesY; - - numPatchesX = 0; - numPatchesY = 0; for ( int curRow = 0; curRow < ROI.height - patchSize.height + 1; curRow += stepRow ) { - numPatchesY++; - for ( int curCol = 0; curCol < ROI.width - patchSize.width + 1; curCol += stepCol ) { - if( curRow == 0 ) - numPatchesX++; - Mat singleSample = image( Rect( curCol + ROI.x, curRow + ROI.y, patchSize.width, patchSize.height ) ); sample[curPatch] = singleSample; curPatch++; diff --git a/modules/ximgproc/src/edge_drawing.cpp b/modules/ximgproc/src/edge_drawing.cpp index 96f77357ecb..4ff15324b70 100644 --- a/modules/ximgproc/src/edge_drawing.cpp +++ b/modules/ximgproc/src/edge_drawing.cpp @@ -3163,10 +3163,8 @@ void EdgeDrawingImpl::ValidateCircles(bool validate) int tr = -100; int tc = -100; - int tcount = 0; int noPeripheryPixels = 0; - int noEdgePixels = 0; int aligned = 0; for (int j = 0; j < noPoints; j++) { @@ -3191,7 +3189,6 @@ void EdgeDrawingImpl::ValidateCircles(bool validate) { tr = r; tc = c; - tcount++; } // @@ -3300,9 +3297,6 @@ void EdgeDrawingImpl::ValidateCircles(bool validate) // This produces less false positives, but occationally misses on some valid circles } out: - if (edgeImg[r * width + c] == 255) - noEdgePixels++; - // compute gx & gy int com1 = smoothImg[(r + 1) * width + c + 1] - smoothImg[(r - 1) * width + c - 1]; int com2 = smoothImg[(r - 1) * width + c + 1] - smoothImg[(r + 1) * width + c - 1]; diff --git a/modules/ximgproc/src/fast_hough_transform.cpp b/modules/ximgproc/src/fast_hough_transform.cpp index 391d3fa490d..a16945c4ce4 100644 --- a/modules/ximgproc/src/fast_hough_transform.cpp +++ b/modules/ximgproc/src/fast_hough_transform.cpp @@ -293,10 +293,6 @@ static void FHT(Mat &dst, else CV_Assert(src.cols == dst.rows && src.rows == dst.cols); - int level = 0; - for (int thres = 1; dst.rows > thres; thres <<= 1) - level++; - Mat tmp; src.convertTo(tmp, dst.type()); if (!isVertical) diff --git a/modules/ximgproc/src/find_ellipses.cpp b/modules/ximgproc/src/find_ellipses.cpp index 63727871485..6b52be0eb32 100644 --- a/modules/ximgproc/src/find_ellipses.cpp +++ b/modules/ximgproc/src/find_ellipses.cpp @@ -723,7 +723,6 @@ void EllipseDetectorImpl::labeling(Mat1b &image, VVP &segments, int minLength) { void EllipseDetectorImpl::detectEdges13(Mat1b &DP, VVP &points_1, VVP &points_3) { // vector of connected edge points VVP contours; - int countEdges = 0; // labeling 8-connected edge points, discarding edge too small labeling(DP, contours, _minEdgeLength); // label point on the same arc int contourSize = int(contours.size()); @@ -737,7 +736,6 @@ void EllipseDetectorImpl::detectEdges13(Mat1b &DP, VVP &points_1, VVP &points_3) float orMin = min(oriented.size.width, oriented.size.height); if (orMin < _minOrientedRectSide) { - countEdges++; continue; } @@ -773,7 +771,6 @@ void EllipseDetectorImpl::detectEdges13(Mat1b &DP, VVP &points_1, VVP &points_3) void EllipseDetectorImpl::detectEdges24(Mat1b &DN, VVP &points_2, VVP &points_4) { // vector of connected edge points VVP contours; - int countEdges = 0; // labeling 8-connected edge points, discarding edge too small labeling(DN, contours, _minEdgeLength); // label point on the same arc int contourSize = int(contours.size()); @@ -787,7 +784,6 @@ void EllipseDetectorImpl::detectEdges24(Mat1b &DN, VVP &points_2, VVP &points_4) float orMin = min(oriented.size.width, oriented.size.height); if (orMin < _minOrientedRectSide) { - countEdges++; continue; } diff --git a/modules/ximgproc/src/slic.cpp b/modules/ximgproc/src/slic.cpp index 7528f0ff21e..7f666d7ba36 100644 --- a/modules/ximgproc/src/slic.cpp +++ b/modules/ximgproc/src/slic.cpp @@ -772,7 +772,7 @@ inline void SuperpixelSLICImpl::GetChSeedsK() { int xoff = m_region_size / 2; int yoff = m_region_size / 2; - int n = 0; int r = 0; + int r = 0; for( int y = 0; y < m_height; y++ ) { int Y = y*m_region_size + yoff; @@ -827,8 +827,6 @@ inline void SuperpixelSLICImpl::GetChSeedsK() m_kseedsx.push_back((float)X); m_kseedsy.push_back((float)Y); - - n++; } r++; } diff --git a/modules/ximgproc/src/sparse_match_interpolators.cpp b/modules/ximgproc/src/sparse_match_interpolators.cpp index 6f14baad045..517573946af 100644 --- a/modules/ximgproc/src/sparse_match_interpolators.cpp +++ b/modules/ximgproc/src/sparse_match_interpolators.cpp @@ -1812,7 +1812,6 @@ float RICInterpolatorImpl::HypothesisEvaluation(const Mat & inModel, const int * float errTh = 5.; // find inliers - int inLierCnt = 0; float cost = 0; for (int k = 0; k < matCnt; k++) { int matId = matNodes[k]; @@ -1836,7 +1835,6 @@ float RICInterpolatorImpl::HypothesisEvaluation(const Mat & inModel, const int * float dis = sqrt((tu - pu)*(tu - pu) + (tv - pv)*(tv - pv)); if (dis < errTh) { outInLier.at(k) = 1; - inLierCnt++; cost += wt * dis; } else { diff --git a/modules/ximgproc/test/test_adaptive_manifold_ref_impl.cpp b/modules/ximgproc/test/test_adaptive_manifold_ref_impl.cpp index f1e9d1bebfe..dfcbd4438fc 100644 --- a/modules/ximgproc/test/test_adaptive_manifold_ref_impl.cpp +++ b/modules/ximgproc/test/test_adaptive_manifold_ref_impl.cpp @@ -145,9 +145,9 @@ using namespace cv::ximgproc; public: AdaptiveManifoldFilterRefImpl(); - void filter(InputArray src, OutputArray dst, InputArray joint); + void filter(InputArray src, OutputArray dst, InputArray joint) CV_OVERRIDE; - void collectGarbage(); + void collectGarbage() CV_OVERRIDE; inline double getSigmaS() const CV_OVERRIDE { return sigma_s_; } inline void setSigmaS(double val) CV_OVERRIDE { sigma_s_ = val; }