diff --git a/modules/bioinspired/src/retina.cpp b/modules/bioinspired/src/retina.cpp index 460433107..d2193ea3e 100644 --- a/modules/bioinspired/src/retina.cpp +++ b/modules/bioinspired/src/retina.cpp @@ -599,7 +599,7 @@ void RetinaImpl::getParvoRAW(OutputArray parvoOutputBufferCopy){ // original API level data accessors : get buffers addresses... const Mat RetinaImpl::getMagnoRAW() const { // create a cv::Mat header for the valarray - return Mat(_retinaFilter->getMovingContours().size(),1, CV_32F, (void*)get_data(_retinaFilter->getMovingContours())); + return Mat((int)_retinaFilter->getMovingContours().size(),1, CV_32F, (void*)get_data(_retinaFilter->getMovingContours())); } @@ -607,11 +607,11 @@ const Mat RetinaImpl::getParvoRAW() const { if (_retinaFilter->getColorMode()) // check if color mode is enabled { // create a cv::Mat table (for RGB planes as a single vector) - return Mat(_retinaFilter->getColorOutput().size(), 1, CV_32F, (void*)get_data(_retinaFilter->getColorOutput())); + return Mat((int)_retinaFilter->getColorOutput().size(), 1, CV_32F, (void*)get_data(_retinaFilter->getColorOutput())); } // otherwise, output is gray level // create a cv::Mat header for the valarray - return Mat( _retinaFilter->getContours().size(), 1, CV_32F, (void*)get_data(_retinaFilter->getContours())); + return Mat((int)_retinaFilter->getContours().size(), 1, CV_32F, (void*)get_data(_retinaFilter->getContours())); } // private method called by constructirs diff --git a/modules/calib3d/test/test_chesscorners.cpp b/modules/calib3d/test/test_chesscorners.cpp index f9625d540..6769e47c6 100644 --- a/modules/calib3d/test/test_chesscorners.cpp +++ b/modules/calib3d/test/test_chesscorners.cpp @@ -208,7 +208,7 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename ) } int progress = 0; - int max_idx = board_list.size()/2; + int max_idx = (int)board_list.size()/2; double sum_error = 0.0; int count = 0; diff --git a/modules/features2d/test/test_descriptors_regression.cpp b/modules/features2d/test/test_descriptors_regression.cpp index 08eb59eae..7119d590e 100644 --- a/modules/features2d/test/test_descriptors_regression.cpp +++ b/modules/features2d/test/test_descriptors_regression.cpp @@ -80,10 +80,10 @@ static Mat readMatFromBin( const string& filename ) size_t elements_read4 = fread( (void*)&dataSize, sizeof(int), 1, f ); CV_Assert(elements_read1 == 1 && elements_read2 == 1 && elements_read3 == 1 && elements_read4 == 1); - size_t step = dataSize / rows / CV_ELEM_SIZE(type); - CV_Assert(step >= (size_t)cols); + int step = dataSize / rows / CV_ELEM_SIZE(type); + CV_Assert(step >= cols); - Mat m = Mat( rows, step, type).colRange(0, cols); + Mat m = Mat(rows, step, type).colRange(0, cols); size_t elements_read = fread( m.ptr(), 1, dataSize, f ); CV_Assert(elements_read == (size_t)(dataSize)); diff --git a/modules/highgui/src/grfmt_tiff.cpp b/modules/highgui/src/grfmt_tiff.cpp index 424ec217d..efabf76fd 100644 --- a/modules/highgui/src/grfmt_tiff.cpp +++ b/modules/highgui/src/grfmt_tiff.cpp @@ -406,9 +406,9 @@ bool TiffDecoder::readHdrData(Mat& img) TIFFGetField( tif, TIFFTAG_PHOTOMETRIC, &photometric ); TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); int size = 3 * m_width * m_height * sizeof (float); - int strip_size = 3 * m_width * rows_per_strip; + tstrip_t strip_size = 3 * m_width * rows_per_strip; float *ptr = img.ptr(); - for (size_t i = 0; i < TIFFNumberOfStrips(tif); i++, ptr += strip_size) + for (tstrip_t i = 0; i < TIFFNumberOfStrips(tif); i++, ptr += strip_size) { TIFFReadEncodedStrip(tif, i, ptr, size); size -= strip_size * sizeof(float); diff --git a/modules/highgui/src/grfmt_webp.cpp b/modules/highgui/src/grfmt_webp.cpp index 1c64adec6..6ef4202ff 100644 --- a/modules/highgui/src/grfmt_webp.cpp +++ b/modules/highgui/src/grfmt_webp.cpp @@ -174,12 +174,12 @@ bool WebPDecoder::readData(Mat &img) if (channels == 3) { res_ptr = WebPDecodeBGRInto(data.data, data.total(), out_data, - out_data_size, img.step); + (int)out_data_size, (int)img.step); } else if (channels == 4) { res_ptr = WebPDecodeBGRAInto(data.data, data.total(), out_data, - out_data_size, img.step); + (int)out_data_size, (int)img.step); } if(res_ptr == out_data) @@ -255,22 +255,22 @@ bool WebPEncoder::write(const Mat& img, const std::vector& params) { if(channels == 3) { - size = WebPEncodeLosslessBGR(image->data, width, height, image->step, &out); + size = WebPEncodeLosslessBGR(image->data, width, height, (int)image->step, &out); } else if(channels == 4) { - size = WebPEncodeLosslessBGRA(image->data, width, height, image->step, &out); + size = WebPEncodeLosslessBGRA(image->data, width, height, (int)image->step, &out); } } else { if(channels == 3) { - size = WebPEncodeBGR(image->data, width, height, image->step, quality, &out); + size = WebPEncodeBGR(image->data, width, height, (int)image->step, quality, &out); } else if(channels == 4) { - size = WebPEncodeBGRA(image->data, width, height, image->step, quality, &out); + size = WebPEncodeBGRA(image->data, width, height, (int)image->step, quality, &out); } } diff --git a/modules/imgproc/src/intersection.cpp b/modules/imgproc/src/intersection.cpp index 341041a83..cdee36663 100644 --- a/modules/imgproc/src/intersection.cpp +++ b/modules/imgproc/src/intersection.cpp @@ -49,7 +49,7 @@ namespace cv int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion ) { - const float samePointEps = 0.00001; // used to test if two points are the same + const float samePointEps = 0.00001f; // used to test if two points are the same Point2f vec1[4], vec2[4]; Point2f pts1[4], pts2[4]; diff --git a/modules/imgproc/src/lsd.cpp b/modules/imgproc/src/lsd.cpp index 69362e470..6138cfce7 100644 --- a/modules/imgproc/src/lsd.cpp +++ b/modules/imgproc/src/lsd.cpp @@ -473,8 +473,7 @@ void LineSegmentDetectorImpl::flsd(std::vector& lines, // Search for line segments unsigned int ls_count = 0; - unsigned int list_size = list.size(); - for(unsigned int i = 0; i < list_size; ++i) + for(size_t i = 0, list_size = list.size(); i < list_size; ++i) { unsigned int adx = list[i].p.x + list[i].p.y * img_width; if((used.data[adx] == NOTUSED) && (angles_data[adx] != NOTDEF)) diff --git a/modules/imgproc/test/test_intersection.cpp b/modules/imgproc/test/test_intersection.cpp index 95e4562eb..e0a7fa275 100644 --- a/modules/imgproc/test/test_intersection.cpp +++ b/modules/imgproc/test/test_intersection.cpp @@ -376,8 +376,8 @@ void CV_RotatedRectangleIntersectionTest::test7() rect1.center.x = 0; rect1.center.y = 0; - rect1.size.width = 12.34; - rect1.size.height = 56.78; + rect1.size.width = 12.34f; + rect1.size.height = 56.78f; rect1.angle = 0; rect2.center.x = 0; @@ -464,7 +464,7 @@ void CV_RotatedRectangleIntersectionTest::test9() rect2.center.x = 2; rect2.center.y = 0; rect2.size.width = 2; - rect2.size.height = 123.45; + rect2.size.height = 123.45f; rect2.angle = 0; vector vertices; diff --git a/modules/nonfree/test/test_features2d.cpp b/modules/nonfree/test/test_features2d.cpp index 7c888e261..03041b09b 100644 --- a/modules/nonfree/test/test_features2d.cpp +++ b/modules/nonfree/test/test_features2d.cpp @@ -275,8 +275,8 @@ static Mat readMatFromBin( const string& filename ) size_t elements_read4 = fread( (void*)&dataSize, sizeof(int), 1, f ); CV_Assert(elements_read1 == 1 && elements_read2 == 1 && elements_read3 == 1 && elements_read4 == 1); - size_t step = dataSize / rows / CV_ELEM_SIZE(type); - CV_Assert(step >= (size_t)cols); + int step = dataSize / rows / CV_ELEM_SIZE(type); + CV_Assert(step >= cols); Mat m = Mat( rows, step, type).colRange(0, cols); diff --git a/modules/objdetect/src/erfilter.cpp b/modules/objdetect/src/erfilter.cpp index 55bfe6f9f..1bd052c1a 100644 --- a/modules/objdetect/src/erfilter.cpp +++ b/modules/objdetect/src/erfilter.cpp @@ -795,7 +795,7 @@ ERStat* ERFilterNM::er_tree_filter ( InputArray image, ERStat * stat, ERStat *pa int p_prev = p-1; int p_next = p+1; if (p_prev == -1) - p_prev = contour_poly.size()-1; + p_prev = (int)contour_poly.size()-1; if (p_next == (int)contour_poly.size()) p_next = 0; @@ -2455,9 +2455,9 @@ void MaxMeaningfulClustering::build_merge_info(double *Z, int N, vector= 1) - cluster.dist = 0.999999; + cluster.dist = 0.999999f; if (cluster.dist == 0) - cluster.dist = 1.e-25; + cluster.dist = 1.e-25f; cluster.dist_ext = 1; @@ -2811,7 +2811,7 @@ void erGrouping(InputArrayOfArrays _src, vector > ®ions, const for (int f=0; f > ®ions, const } // Find the Max. Meaningful Clusters in the co-occurrence matrix - mm_clustering(D, regions.at(c).size(), METHOD_METR_AVERAGE, &meaningful_clusters); + mm_clustering(D, (unsigned int)regions.at(c).size(), METHOD_METR_AVERAGE, &meaningful_clusters); free(D); diff --git a/modules/optim/src/lpsolver.cpp b/modules/optim/src/lpsolver.cpp index a046ddae1..9ea647654 100644 --- a/modules/optim/src/lpsolver.cpp +++ b/modules/optim/src/lpsolver.cpp @@ -84,11 +84,12 @@ int solveLP(const Mat& Func, const Mat& Constr, Mat& z){ //return the optimal solution z.create(c.cols,1,CV_64FC1); MatIterator_ it=z.begin(); + unsigned int nsize = (unsigned int)N.size(); for(int i=1;i<=c.cols;i++,it++){ - if(indexToRow[i](indexToRow[i]-N.size(),b.cols-1); + *it=b.at(indexToRow[i]-nsize,b.cols-1); } } @@ -102,7 +103,7 @@ static int initialize_simplex(Mat_& c, Mat_& b,double& v,vector< *it=it[-1]+1; } B.resize(b.rows); - B[0]=N.size(); + B[0]=(int)N.size(); for (std::vector::iterator it = B.begin()+1 ; it != B.end(); ++it){ *it=it[-1]+1; } @@ -151,8 +152,9 @@ static int initialize_simplex(Mat_& c, Mat_& b,double& v,vector< dprintf(("\tAFTER INNER_SIMPLEX\n")); print_simplex_state(c,b,v,N,B); - if(indexToRow[0]>=N.size()){ - int iterator_offset=indexToRow[0]-N.size(); + unsigned int nsize = (unsigned int)N.size(); + if(indexToRow[0]>=nsize){ + int iterator_offset=indexToRow[0]-nsize; if(b(iterator_offset,b.cols-1)>0){ return SOLVELP_UNFEASIBLE; } @@ -176,14 +178,14 @@ static int initialize_simplex(Mat_& c, Mat_& b,double& v,vector< c=0; v=0; for(int I=1;I(); int median = 0, sum = 0; - int thresh = img.total() / 2; + int thresh = (int)img.total() / 2; while(sum < thresh && median < LDR_SIZE) { sum += static_cast(ptr[median]); median++; diff --git a/modules/photo/src/calibrate.cpp b/modules/photo/src/calibrate.cpp index 89ff6338b..23b612995 100644 --- a/modules/photo/src/calibrate.cpp +++ b/modules/photo/src/calibrate.cpp @@ -97,7 +97,7 @@ public: std::vector result_split(channels); for(int channel = 0; channel < channels; channel++) { - Mat A = Mat::zeros(sample_points.size() * images.size() + LDR_SIZE + 1, LDR_SIZE + sample_points.size(), CV_32F); + Mat A = Mat::zeros((int)sample_points.size() * (int)images.size() + LDR_SIZE + 1, LDR_SIZE + (int)sample_points.size(), CV_32F); Mat B = Mat::zeros(A.rows, 1, CV_32F); int eq = 0; @@ -106,8 +106,8 @@ public: int val = images[j].ptr()[3*(sample_points[i].y * images[j].cols + sample_points[j].x) + channel]; A.at(eq, val) = w.at(val); - A.at(eq, LDR_SIZE + i) = -w.at(val); - B.at(eq, 0) = w.at(val) * log(times.at(j)); + A.at(eq, LDR_SIZE + (int)i) = -w.at(val); + B.at(eq, 0) = w.at(val) * log(times.at((int)j)); eq++; } } @@ -219,7 +219,7 @@ public: float* rad_ptr = radiance.ptr(); for(size_t pos = 0; pos < images[i].total(); pos++) { for(int c = 0; c < channels; c++, ptr++, rad_ptr++) { - new_response.at(*ptr)[c] += times.at(i) * *rad_ptr; + new_response.at(*ptr)[c] += times.at((int)i) * *rad_ptr; } } } diff --git a/modules/photo/src/merge.cpp b/modules/photo/src/merge.cpp index 1552161c9..7adfb5ec6 100644 --- a/modules/photo/src/merge.cpp +++ b/modules/photo/src/merge.cpp @@ -106,7 +106,7 @@ public: LUT(images[i], response, response_img); split(response_img, splitted); for(int c = 0; c < channels; c++) { - result_split[c] += w.mul(splitted[c] - exp_values.at(i)); + result_split[c] += w.mul(splitted[c] - exp_values.at((int)i)); } weight_sum += w; } @@ -327,8 +327,8 @@ public: LUT(images[i], weight, w); LUT(images[i], response, im); - result += times.at(i) * w.mul(im); - wsum += times.at(i) * times.at(i) * w; + result += times.at((int)i) * w.mul(im); + wsum += times.at((int)i) * times.at((int)i) * w; } result = result.mul(1 / wsum); } diff --git a/modules/photo/src/tonemap.cpp b/modules/photo/src/tonemap.cpp index 2b56b35d6..af930abb3 100644 --- a/modules/photo/src/tonemap.cpp +++ b/modules/photo/src/tonemap.cpp @@ -505,7 +505,7 @@ protected: void calculateSum(std::vector& x_contrast, std::vector& y_contrast, Mat& sum) { sum = Mat::zeros(x_contrast[x_contrast.size() - 1].size(), CV_32F); - for(int i = x_contrast.size() - 1; i >= 0; i--) + for(int i = (int)x_contrast.size() - 1; i >= 0; i--) { Mat grad_x, grad_y; getGradient(x_contrast[i], grad_x, 1); diff --git a/modules/shape/src/aff_trans.cpp b/modules/shape/src/aff_trans.cpp index c290e3fa1..a309d85fc 100644 --- a/modules/shape/src/aff_trans.cpp +++ b/modules/shape/src/aff_trans.cpp @@ -112,7 +112,7 @@ static Mat _localAffineEstimate(const std::vector& shape1, const std::v bool fullAfine) { Mat out(2,3,CV_32F); - int siz=2*shape1.size(); + int siz=2*(int)shape1.size(); if (fullAfine) { diff --git a/modules/shape/src/sc_dis.cpp b/modules/shape/src/sc_dis.cpp index 24e86af49..094082eca 100644 --- a/modules/shape/src/sc_dis.cpp +++ b/modules/shape/src/sc_dis.cpp @@ -65,10 +65,10 @@ public: comparer=_comparer; iterations=_iterations; transformer=_transformer; - bendingEnergyWeight=0.3; - imageAppearanceWeight=0.0; - shapeContextWeight=1.0; - sigma=10; + bendingEnergyWeight=0.3f; + imageAppearanceWeight=0.0f; + shapeContextWeight=1.0f; + sigma=10.0f; name_ = "ShapeDistanceExtractor.SCD"; } @@ -503,7 +503,7 @@ void SCDMatcher::hungarian(cv::Mat &costMatrix, std::vector &outMatc std::vector matches(costMatrix.rows, 0), colsol(costMatrix.rows), rowsol(costMatrix.rows); std::vector d(costMatrix.rows), pred(costMatrix.rows), v(costMatrix.rows); - const float LOWV=1e-10; + const float LOWV = 1e-10f; bool unassignedfound; int i=0, imin=0, numfree=0, prvnumfree=0, f=0, i0=0, k=0, freerow=0; int j=0, j1=0, j2=0, endofpath=0, last=0, low=0, up=0; diff --git a/modules/shape/src/tps_trans.cpp b/modules/shape/src/tps_trans.cpp index cbf2d1b99..61758bd0b 100644 --- a/modules/shape/src/tps_trans.cpp +++ b/modules/shape/src/tps_trans.cpp @@ -212,9 +212,9 @@ void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts } // Organizing the correspondent points in matrix style // - Mat shape1(matches.size(),2,CV_32F); // transforming shape - Mat shape2(matches.size(),2,CV_32F); // target shape - for (size_t i=0; i(0,matches[i].queryIdx); shape1.at(i,0) = pt1.x; @@ -229,11 +229,11 @@ void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts // Building the matrices for solving the L*(w|a)=(v|0) problem with L={[K|P];[P'|0]} //Building K and P (Neede to buil L) - Mat matK(matches.size(),matches.size(),CV_32F); - Mat matP(matches.size(),3,CV_32F); - for (size_t i=0; i(i,0) = shape2.at(i,0); //x's matB.at(i,1) = shape2.at(i,1); //y's diff --git a/modules/shape/test/test_emdl1.cpp b/modules/shape/test/test_emdl1.cpp index 1f7aba545..fc677fc5b 100644 --- a/modules/shape/test/test_emdl1.cpp +++ b/modules/shape/test/test_emdl1.cpp @@ -46,11 +46,11 @@ using namespace std; const int angularBins=12; const int radialBins=4; -const float minRad=0.2; +const float minRad=0.2f; const float maxRad=2; const int NSN=5;//10;//20; //number of shapes per class const int NP=100; //number of points sympliying the contour -const float outlierWeight=0.1; +const float outlierWeight=0.1f; const int numOutliers=20; const float CURRENT_MAX_ACCUR=95; //98% and 99% reached in several tests, 95 is fixed as minimum boundary @@ -96,7 +96,7 @@ vector CV_ShapeEMDTest::convertContourType(const Mat& currentQuery, in // In case actual number of points is less than n int dum=0; - for (int add=contoursQuery.size()-1; add contoursQuery1, contoursQuery2, contoursQuery3, contoursTesting; // reading query and computing its properties // int counter=0; - const int loops=NSN*namesHeaders.size()*NSN*namesHeaders.size(); + const int loops=NSN*(int)namesHeaders.size()*NSN*(int)namesHeaders.size(); for (size_t n=0; n(NSN*n+i-1, - NSN*nt+it-1)=0; + distanceMat.at(NSN*(int)n+i-1, + NSN*(int)nt+it-1)=0; continue; } // read testing image // @@ -200,9 +199,9 @@ void CV_ShapeEMDTest::mpegTest() std::cout<(NSN*n+i-1, NSN*nt+it-1)= + distanceMat.at(NSN*(int)n+i-1, NSN*(int)nt+it-1)= computeShapeDistance(contoursQuery1, contoursQuery2, contoursQuery3, contoursTesting); - std::cout<(NSN*n+i-1, NSN*nt+it-1)<(NSN*(int)n+i-1, NSN*(int)nt+it-1)< CV_HaussTest::normalizeContour(const vector &contour) { vector output(contour.size()); - Mat disMat(contour.size(),contour.size(),CV_32F); + Mat disMat((int)contour.size(),(int)contour.size(),CV_32F); Point2f meanpt(0,0); float meanVal=1; - for (size_t ii=0; ii(ii,jj)=0; else @@ -128,7 +128,7 @@ vector CV_HaussTest::convertContourType(const Mat& currentQuery, int n) } // In case actual number of points is less than n - for (int add=contoursQuery.size()-1; add contoursQuery1, contoursQuery2, contoursQuery3, contoursTesting; // reading query and computing its properties // int counter=0; - const int loops=NSN*namesHeaders.size()*NSN*namesHeaders.size(); + const int loops=NSN*(int)namesHeaders.size()*NSN*(int)namesHeaders.size(); for (size_t n=0; n(NSN*n+i-1, - NSN*nt+it-1)=0; + distanceMat.at(NSN*(int)n+i-1, + NSN*(int)nt+it-1)=0; continue; } // read testing image // @@ -212,9 +212,9 @@ void CV_HaussTest::mpegTest() std::cout<(NSN*n+i-1, NSN*nt+it-1)= + distanceMat.at(NSN*(int)n+i-1, NSN*(int)nt+it-1)= computeShapeDistance(contoursQuery1, contoursQuery2, contoursQuery3, contoursTesting); - std::cout<(NSN*n+i-1, NSN*nt+it-1)<(NSN*(int)n+i-1, NSN*(int)nt+it-1)< CV_ShapeTest::convertContourType(const Mat& currentQuery, int n } // In case actual number of points is less than n - for (int add=contoursQuery.size()-1; add& query1, vector mysc = createShapeContextDistanceExtractor(angularBins, radialBins, minRad, maxRad); //Ptr cost = createNormHistogramCostExtractor(cv::DIST_L1); - Ptr cost = createChiHistogramCostExtractor(30,0.15); + Ptr cost = createChiHistogramCostExtractor(30,0.15f); //Ptr cost = createEMDHistogramCostExtractor(); //Ptr cost = createEMDL1HistogramCostExtractor(); mysc->setIterations(1); @@ -148,14 +148,14 @@ void CV_ShapeTest::mpegTest() listShapeNames(namesHeaders); // distance matrix // - Mat distanceMat=Mat::zeros(NSN*namesHeaders.size(), NSN*namesHeaders.size(), CV_32F); + Mat distanceMat=Mat::zeros(NSN*(int)namesHeaders.size(), NSN*(int)namesHeaders.size(), CV_32F); // query contours (normal v flipped, h flipped) and testing contour // vector contoursQuery1, contoursQuery2, contoursQuery3, contoursTesting; // reading query and computing its properties // int counter=0; - const int loops=NSN*namesHeaders.size()*NSN*namesHeaders.size(); + const int loops=NSN*(int)namesHeaders.size()*NSN*(int)namesHeaders.size(); for (size_t n=0; n(NSN*n+i-1, - NSN*nt+it-1)=0; + distanceMat.at(NSN*(int)n+i-1, + NSN*(int)nt+it-1)=0; continue; } // read testing image // @@ -200,9 +200,9 @@ void CV_ShapeTest::mpegTest() std::cout<(NSN*n+i-1, NSN*nt+it-1)= + distanceMat.at(NSN*(int)n+i-1, NSN*(int)nt+it-1)= computeShapeDistance(contoursQuery1, contoursQuery2, contoursQuery3, contoursTesting); - std::cout<(NSN*n+i-1, NSN*nt+it-1)<(NSN*(int)n+i-1, NSN*(int)nt+it-1)< simpleContour( const Mat& currentQuery, int n=300 ) // In case actual number of points is less than n int dummy=0; - for (int add=contoursQuery.size()-1; add er_filter1 = createERFilterNM1(loadClassifierNM1("trained_classifierNM1.xml"),16,0.00015,0.13,0.2,true,0.1); + Ptr er_filter1 = createERFilterNM1(loadClassifierNM1("trained_classifierNM1.xml"),16,0.00015f,0.13f,0.2f,true,0.1f); Ptr er_filter2 = createERFilterNM2(loadClassifierNM2("trained_classifierNM2.xml"),0.5); vector > regions(channels.size()); @@ -94,7 +94,7 @@ void show_help_and_exit(const char *cmd) void groups_draw(Mat &src, vector &groups) { - for (int i=groups.size()-1; i>=0; i--) + for (int i=(int)groups.size()-1; i>=0; i--) { if (src.type() == CV_8UC3) rectangle(src,groups.at(i).tl(),groups.at(i).br(),Scalar( 0, 255, 255 ), 3, 8 );