diff --git a/.gitignore b/.gitignore index 4b098b6bd..741704db8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.autosave *.pyc *.user +*~ .*.swp .DS_Store .sw[a-z] diff --git a/apps/haartraining/cvclassifier.h b/apps/haartraining/cvclassifier.h index 9a4344118..c1ae7f5ae 100644 --- a/apps/haartraining/cvclassifier.h +++ b/apps/haartraining/cvclassifier.h @@ -340,7 +340,7 @@ typedef enum CvBoostType CV_LKCLASS = 5, /* classification (K class problem) */ CV_LSREG = 6, /* least squares regression */ CV_LADREG = 7, /* least absolute deviation regression */ - CV_MREG = 8, /* M-regression (Huber loss) */ + CV_MREG = 8 /* M-regression (Huber loss) */ } CvBoostType; /****************************************************************************************\ diff --git a/doc/tutorials/introduction/linux_install/linux_install.rst b/doc/tutorials/introduction/linux_install/linux_install.rst index 1e02b64c9..8e1409650 100644 --- a/doc/tutorials/introduction/linux_install/linux_install.rst +++ b/doc/tutorials/introduction/linux_install/linux_install.rst @@ -16,7 +16,7 @@ Required Packages * CMake 2.6 or higher; * Git; * GTK+2.x or higher, including headers (libgtk2.0-dev); - * pkgconfig; + * pkg-config; * Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy); * ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev; * [optional] libdc1394 2.x; diff --git a/modules/bioinspired/src/retina.cpp b/modules/bioinspired/src/retina.cpp index d2193ea3e..303a7f32b 100644 --- a/modules/bioinspired/src/retina.cpp +++ b/modules/bioinspired/src/retina.cpp @@ -312,7 +312,7 @@ RetinaImpl::RetinaImpl(const cv::Size inputSz, const bool colorMode, int colorSa { _retinaFilter = 0; _init(inputSz, colorMode, colorSamplingMethod, useRetinaLogSampling, reductionFactor, samplingStrenght); -}; +} RetinaImpl::~RetinaImpl() { diff --git a/modules/calib3d/test/test_chessboardgenerator.hpp b/modules/calib3d/test/test_chessboardgenerator.hpp index 97d0fedf5..9898b0735 100644 --- a/modules/calib3d/test/test_chessboardgenerator.hpp +++ b/modules/calib3d/test/test_chessboardgenerator.hpp @@ -34,7 +34,7 @@ private: Mat rvec, tvec; }; -}; +} #endif diff --git a/modules/contrib/src/adaptiveskindetector.cpp b/modules/contrib/src/adaptiveskindetector.cpp index 092e48cb4..c4fbbe000 100644 --- a/modules/contrib/src/adaptiveskindetector.cpp +++ b/modules/contrib/src/adaptiveskindetector.cpp @@ -55,7 +55,7 @@ void CvAdaptiveSkinDetector::initData(IplImage *src, int widthDivider, int heigh imgGrayFrame = cvCreateImage(imageSize, IPL_DEPTH_8U, 1); imgLastGrayFrame = cvCreateImage(imageSize, IPL_DEPTH_8U, 1); imgHSVFrame = cvCreateImage(imageSize, IPL_DEPTH_8U, 3); -}; +} CvAdaptiveSkinDetector::CvAdaptiveSkinDetector(int samplingDivider, int morphingMethod) { @@ -80,7 +80,7 @@ CvAdaptiveSkinDetector::CvAdaptiveSkinDetector(int samplingDivider, int morphing imgLastGrayFrame = NULL; imgSaturationFrame = NULL; imgHSVFrame = NULL; -}; +} CvAdaptiveSkinDetector::~CvAdaptiveSkinDetector() { @@ -93,7 +93,7 @@ CvAdaptiveSkinDetector::~CvAdaptiveSkinDetector() cvReleaseImage(&imgGrayFrame); cvReleaseImage(&imgLastGrayFrame); cvReleaseImage(&imgHSVFrame); -}; +} void CvAdaptiveSkinDetector::process(IplImage *inputBGRImage, IplImage *outputHueMask) { @@ -190,7 +190,7 @@ void CvAdaptiveSkinDetector::process(IplImage *inputBGRImage, IplImage *outputHu if (outputHueMask != NULL) cvCopy(imgFilteredFrame, outputHueMask); -}; +} //------------------------- Histogram for Adaptive Skin Detector -------------------------// @@ -202,12 +202,12 @@ CvAdaptiveSkinDetector::Histogram::Histogram() float *ranges[] = { range }; fHistogram = cvCreateHist(1, histogramSize, CV_HIST_ARRAY, ranges, 1); cvClearHist(fHistogram); -}; +} CvAdaptiveSkinDetector::Histogram::~Histogram() { cvReleaseHist(&fHistogram); -}; +} int CvAdaptiveSkinDetector::Histogram::findCoverageIndex(double surfaceToCover, int defaultValue) { @@ -221,7 +221,7 @@ int CvAdaptiveSkinDetector::Histogram::findCoverageIndex(double surfaceToCover, } } return defaultValue; -}; +} void CvAdaptiveSkinDetector::Histogram::findCurveThresholds(int &x1, int &x2, double percent) { @@ -244,7 +244,7 @@ void CvAdaptiveSkinDetector::Histogram::findCurveThresholds(int &x1, int &x2, do x2 = GSD_HUE_UT; else x2 += GSD_HUE_LT; -}; +} void CvAdaptiveSkinDetector::Histogram::mergeWith(CvAdaptiveSkinDetector::Histogram *source, double weight) { @@ -285,4 +285,4 @@ void CvAdaptiveSkinDetector::Histogram::mergeWith(CvAdaptiveSkinDetector::Histog } } } -}; +} diff --git a/modules/contrib/src/ba.cpp b/modules/contrib/src/ba.cpp index 9a8002e96..d8ed2f944 100644 --- a/modules/contrib/src/ba.cpp +++ b/modules/contrib/src/ba.cpp @@ -940,7 +940,7 @@ static void fjac(int /*i*/, int /*j*/, CvMat *point_params, CvMat* cam_params, C #endif -}; +} static void func(int /*i*/, int /*j*/, CvMat *point_params, CvMat* cam_params, CvMat* estim, void* /*data*/) { //just do projections CvMat _Mi; @@ -979,17 +979,17 @@ static void func(int /*i*/, int /*j*/, CvMat *point_params, CvMat* cam_params, C cvTranspose( _mp2, estim ); cvReleaseMat( &_mp ); cvReleaseMat( &_mp2 ); -}; +} static void fjac_new(int i, int j, Mat& point_params, Mat& cam_params, Mat& A, Mat& B, void* data) { CvMat _point_params = point_params, _cam_params = cam_params, _Al = A, _Bl = B; fjac(i,j, &_point_params, &_cam_params, &_Al, &_Bl, data); -}; +} static void func_new(int i, int j, Mat& point_params, Mat& cam_params, Mat& estim, void* data) { CvMat _point_params = point_params, _cam_params = cam_params, _estim = estim; func(i,j,&_point_params,&_cam_params,&_estim,data); -}; +} void LevMarqSparse::bundleAdjust( std::vector& points, //positions of points in global coordinate system (input and output) const std::vector >& imagePoints, //projections of 3d points for every camera diff --git a/modules/contrib/src/facerec.cpp b/modules/contrib/src/facerec.cpp index c9fd97608..669fd735a 100644 --- a/modules/contrib/src/facerec.cpp +++ b/modules/contrib/src/facerec.cpp @@ -872,7 +872,7 @@ CV_INIT_ALGORITHM(Eigenfaces, "FaceRecognizer.Eigenfaces", obj.info()->addParam(obj, "labels", obj._labels, true); obj.info()->addParam(obj, "eigenvectors", obj._eigenvectors, true); obj.info()->addParam(obj, "eigenvalues", obj._eigenvalues, true); - obj.info()->addParam(obj, "mean", obj._mean, true)); + obj.info()->addParam(obj, "mean", obj._mean, true)) CV_INIT_ALGORITHM(Fisherfaces, "FaceRecognizer.Fisherfaces", obj.info()->addParam(obj, "ncomponents", obj._num_components); @@ -881,7 +881,7 @@ CV_INIT_ALGORITHM(Fisherfaces, "FaceRecognizer.Fisherfaces", obj.info()->addParam(obj, "labels", obj._labels, true); obj.info()->addParam(obj, "eigenvectors", obj._eigenvectors, true); obj.info()->addParam(obj, "eigenvalues", obj._eigenvalues, true); - obj.info()->addParam(obj, "mean", obj._mean, true)); + obj.info()->addParam(obj, "mean", obj._mean, true)) CV_INIT_ALGORITHM(LBPH, "FaceRecognizer.LBPH", obj.info()->addParam(obj, "radius", obj._radius); @@ -890,7 +890,7 @@ CV_INIT_ALGORITHM(LBPH, "FaceRecognizer.LBPH", obj.info()->addParam(obj, "grid_y", obj._grid_y); obj.info()->addParam(obj, "threshold", obj._threshold); obj.info()->addParam(obj, "histograms", obj._histograms, true); - obj.info()->addParam(obj, "labels", obj._labels, true)); + obj.info()->addParam(obj, "labels", obj._labels, true)) bool initModule_contrib() { diff --git a/modules/contrib/src/fuzzymeanshifttracker.cpp b/modules/contrib/src/fuzzymeanshifttracker.cpp index 2ae6b7195..ce247d96a 100644 --- a/modules/contrib/src/fuzzymeanshifttracker.cpp +++ b/modules/contrib/src/fuzzymeanshifttracker.cpp @@ -41,7 +41,7 @@ CvFuzzyPoint::CvFuzzyPoint(double _x, double _y) { x = _x; y = _y; -}; +} bool CvFuzzyCurve::between(double x, double x1, double x2) { @@ -51,37 +51,37 @@ bool CvFuzzyCurve::between(double x, double x1, double x2) return true; return false; -}; +} CvFuzzyCurve::CvFuzzyCurve() { value = 0; -}; +} CvFuzzyCurve::~CvFuzzyCurve() { // nothing to do -}; +} void CvFuzzyCurve::setCentre(double _centre) { centre = _centre; -}; +} double CvFuzzyCurve::getCentre() { return centre; -}; +} void CvFuzzyCurve::clear() { points.clear(); -}; +} void CvFuzzyCurve::addPoint(double x, double y) { points.push_back(CvFuzzyPoint(x, y)); -}; +} double CvFuzzyCurve::calcValue(double param) { @@ -102,41 +102,41 @@ double CvFuzzyCurve::calcValue(double param) } } return 0; -}; +} double CvFuzzyCurve::getValue() { return value; -}; +} void CvFuzzyCurve::setValue(double _value) { value = _value; -}; +} CvFuzzyFunction::CvFuzzyFunction() { // nothing to do -}; +} CvFuzzyFunction::~CvFuzzyFunction() { curves.clear(); -}; +} void CvFuzzyFunction::addCurve(CvFuzzyCurve *curve, double value) { curves.push_back(*curve); curve->setValue(value); -}; +} void CvFuzzyFunction::resetValues() { int numCurves = (int)curves.size(); for (int i = 0; i < numCurves; i++) curves[i].setValue(0); -}; +} double CvFuzzyFunction::calcValue() { @@ -153,7 +153,7 @@ double CvFuzzyFunction::calcValue() return s1/s2; else return 0; -}; +} CvFuzzyCurve *CvFuzzyFunction::newCurve() { @@ -161,14 +161,14 @@ CvFuzzyCurve *CvFuzzyFunction::newCurve() c = new CvFuzzyCurve(); addCurve(c); return c; -}; +} CvFuzzyRule::CvFuzzyRule() { fuzzyInput1 = NULL; fuzzyInput2 = NULL; fuzzyOutput = NULL; -}; +} CvFuzzyRule::~CvFuzzyRule() { @@ -180,14 +180,14 @@ CvFuzzyRule::~CvFuzzyRule() if (fuzzyOutput != NULL) delete fuzzyOutput; -}; +} void CvFuzzyRule::setRule(CvFuzzyCurve *c1, CvFuzzyCurve *c2, CvFuzzyCurve *o1) { fuzzyInput1 = c1; fuzzyInput2 = c2; fuzzyOutput = o1; -}; +} double CvFuzzyRule::calcValue(double param1, double param2) { @@ -203,31 +203,31 @@ double CvFuzzyRule::calcValue(double param1, double param2) } else return v1; -}; +} CvFuzzyCurve *CvFuzzyRule::getOutputCurve() { return fuzzyOutput; -}; +} CvFuzzyController::CvFuzzyController() { // nothing to do -}; +} CvFuzzyController::~CvFuzzyController() { int size = (int)rules.size(); for(int i = 0; i < size; i++) delete rules[i]; -}; +} void CvFuzzyController::addRule(CvFuzzyCurve *c1, CvFuzzyCurve *c2, CvFuzzyCurve *o1) { CvFuzzyRule *f = new CvFuzzyRule(); rules.push_back(f); f->setRule(c1, c2, o1); -}; +} double CvFuzzyController::calcOutput(double param1, double param2) { @@ -243,7 +243,7 @@ double CvFuzzyController::calcOutput(double param1, double param2) } v = list.calcValue(); return v; -}; +} CvFuzzyMeanShiftTracker::FuzzyResizer::FuzzyResizer() { @@ -299,12 +299,12 @@ CvFuzzyMeanShiftTracker::FuzzyResizer::FuzzyResizer() fuzzyController.addRule(i1L, NULL, oS); fuzzyController.addRule(i1M, NULL, oZE); fuzzyController.addRule(i1H, NULL, oE); -}; +} int CvFuzzyMeanShiftTracker::FuzzyResizer::calcOutput(double edgeDensity, double density) { return (int)fuzzyController.calcOutput(edgeDensity, density); -}; +} CvFuzzyMeanShiftTracker::SearchWindow::SearchWindow() { @@ -329,7 +329,7 @@ CvFuzzyMeanShiftTracker::SearchWindow::SearchWindow() depthLow = 0; depthHigh = 0; fuzzyResizer = NULL; -}; +} CvFuzzyMeanShiftTracker::SearchWindow::~SearchWindow() { @@ -355,7 +355,7 @@ void CvFuzzyMeanShiftTracker::SearchWindow::setSize(int _x, int _y, int _width, if (y + height > maxHeight) height = maxHeight - y; -}; +} void CvFuzzyMeanShiftTracker::SearchWindow::initDepthValues(IplImage *maskImage, IplImage *depthMap) { @@ -409,7 +409,7 @@ void CvFuzzyMeanShiftTracker::SearchWindow::initDepthValues(IplImage *maskImage, depthHigh = 32000; depthLow = 0; } -}; +} bool CvFuzzyMeanShiftTracker::SearchWindow::shift() { @@ -422,7 +422,7 @@ bool CvFuzzyMeanShiftTracker::SearchWindow::shift() { return false; } -}; +} void CvFuzzyMeanShiftTracker::SearchWindow::extractInfo(IplImage *maskImage, IplImage *depthMap, bool initDepth) { @@ -528,7 +528,7 @@ void CvFuzzyMeanShiftTracker::SearchWindow::extractInfo(IplImage *maskImage, Ipl ellipseAngle = 0; density = 0; } -}; +} void CvFuzzyMeanShiftTracker::SearchWindow::getResizeAttribsEdgeDensityLinear(int &resizeDx, int &resizeDy, int &resizeDw, int &resizeDh) { int x1 = horizontalEdgeTop; @@ -572,7 +572,7 @@ void CvFuzzyMeanShiftTracker::SearchWindow::getResizeAttribsEdgeDensityLinear(in } else { resizeDw = - resizeDx; } -}; +} void CvFuzzyMeanShiftTracker::SearchWindow::getResizeAttribsInnerDensity(int &resizeDx, int &resizeDy, int &resizeDw, int &resizeDh) { @@ -588,7 +588,7 @@ void CvFuzzyMeanShiftTracker::SearchWindow::getResizeAttribsInnerDensity(int &re resizeDy = (int)(py*dy); resizeDw = (int)((1-px)*dx); resizeDh = (int)((1-py)*dy); -}; +} void CvFuzzyMeanShiftTracker::SearchWindow::getResizeAttribsEdgeDensityFuzzy(int &resizeDx, int &resizeDy, int &resizeDw, int &resizeDh) { @@ -627,7 +627,7 @@ void CvFuzzyMeanShiftTracker::SearchWindow::getResizeAttribsEdgeDensityFuzzy(int resizeDy = int(-dy1); resizeDh = int(dy1+dy2); } -}; +} bool CvFuzzyMeanShiftTracker::SearchWindow::meanShift(IplImage *maskImage, IplImage *depthMap, int maxIteration, bool initDepth) { @@ -640,7 +640,7 @@ bool CvFuzzyMeanShiftTracker::SearchWindow::meanShift(IplImage *maskImage, IplIm } while (++numShifts < maxIteration); return false; -}; +} void CvFuzzyMeanShiftTracker::findOptimumSearchWindow(SearchWindow &searchWindow, IplImage *maskImage, IplImage *depthMap, int maxIteration, int resizeMethod, bool initDepth) { @@ -680,17 +680,17 @@ void CvFuzzyMeanShiftTracker::findOptimumSearchWindow(SearchWindow &searchWindow searchWindow.setSize(searchWindow.x + resizeDx, searchWindow.y + resizeDy, searchWindow.width + resizeDw, searchWindow.height + resizeDh); } -}; +} CvFuzzyMeanShiftTracker::CvFuzzyMeanShiftTracker() { searchMode = tsSetWindow; -}; +} CvFuzzyMeanShiftTracker::~CvFuzzyMeanShiftTracker() { // nothing to do -}; +} void CvFuzzyMeanShiftTracker::track(IplImage *maskImage, IplImage *depthMap, int resizeMethod, bool resetSearch, int minKernelMass) { @@ -718,4 +718,4 @@ void CvFuzzyMeanShiftTracker::track(IplImage *maskImage, IplImage *depthMap, int else searchMode = tsTracking; } -}; +} diff --git a/modules/contrib/src/spinimages.cpp b/modules/contrib/src/spinimages.cpp index 4e58472bf..63cfcb5ab 100644 --- a/modules/contrib/src/spinimages.cpp +++ b/modules/contrib/src/spinimages.cpp @@ -709,7 +709,7 @@ void cv::SpinImageModel::defaultParams() T_GeometriccConsistency = 0.25f; T_GroupingCorespondances = 0.25f; -}; +} Mat cv::SpinImageModel::packRandomScaledSpins(bool separateScale, size_t xCount, size_t yCount) const { diff --git a/modules/core/include/opencv2/core/mat.inl.hpp b/modules/core/include/opencv2/core/mat.inl.hpp index 307954896..0cefa1590 100644 --- a/modules/core/include/opencv2/core/mat.inl.hpp +++ b/modules/core/include/opencv2/core/mat.inl.hpp @@ -1912,7 +1912,7 @@ SparseMat_<_Tp>::SparseMat_(const SparseMat& m) if( m.type() == DataType<_Tp>::type ) *this = (const SparseMat_<_Tp>&)m; else - m.convertTo(this, DataType<_Tp>::type); + m.convertTo(*this, DataType<_Tp>::type); } template inline diff --git a/modules/core/src/algorithm.cpp b/modules/core/src/algorithm.cpp index ff67a5df1..9f9493e8a 100644 --- a/modules/core/src/algorithm.cpp +++ b/modules/core/src/algorithm.cpp @@ -628,7 +628,7 @@ void AlgorithmInfo::set(Algorithm* algo, const char* parameter, int argType, con || argType == Param::FLOAT || argType == Param::UNSIGNED_INT || argType == Param::UINT64 || argType == Param::UCHAR) { if ( !( p->type == Param::INT || p->type == Param::REAL || p->type == Param::BOOLEAN - || p->type == Param::UNSIGNED_INT || p->type == Param::UINT64 || p->type == Param::FLOAT || argType == Param::UCHAR) ) + || p->type == Param::UNSIGNED_INT || p->type == Param::UINT64 || p->type == Param::FLOAT || p->type == Param::UCHAR) ) { String message = getErrorMessageForWrongArgumentInSetter(algo->name(), parameter, p->type, argType); CV_Error(CV_StsBadArg, message); diff --git a/modules/core/src/arithm.cpp b/modules/core/src/arithm.cpp index c4db92b6d..f93d56fde 100644 --- a/modules/core/src/arithm.cpp +++ b/modules/core/src/arithm.cpp @@ -1434,8 +1434,8 @@ static void arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst, bool haveScalar = false, swapped12 = false; if( dims1 != dims2 || sz1 != sz2 || cn != cn2 || - ((kind1 == _InputArray::MATX || kind2 == _InputArray::MATX) && - (sz1 == Size(1,4) || sz2 == Size(1,4))) ) + (kind1 == _InputArray::MATX && (sz1 == Size(1,4) || sz1 == Size(1,1))) || + (kind2 == _InputArray::MATX && (sz2 == Size(1,4) || sz2 == Size(1,1))) ) { if( checkScalar(*psrc1, type2, kind1, kind2) ) { diff --git a/modules/core/src/convert.cpp b/modules/core/src/convert.cpp index 47dc278ef..9778da18e 100644 --- a/modules/core/src/convert.cpp +++ b/modules/core/src/convert.cpp @@ -1040,122 +1040,122 @@ stype* dst, size_t dstep, Size size, double*) \ } -DEF_CVT_SCALE_ABS_FUNC(8u, cvtScaleAbs_, uchar, uchar, float); -DEF_CVT_SCALE_ABS_FUNC(8s8u, cvtScaleAbs_, schar, uchar, float); -DEF_CVT_SCALE_ABS_FUNC(16u8u, cvtScaleAbs_, ushort, uchar, float); -DEF_CVT_SCALE_ABS_FUNC(16s8u, cvtScaleAbs_, short, uchar, float); -DEF_CVT_SCALE_ABS_FUNC(32s8u, cvtScaleAbs_, int, uchar, float); -DEF_CVT_SCALE_ABS_FUNC(32f8u, cvtScaleAbs_, float, uchar, float); -DEF_CVT_SCALE_ABS_FUNC(64f8u, cvtScaleAbs_, double, uchar, float); +DEF_CVT_SCALE_ABS_FUNC(8u, cvtScaleAbs_, uchar, uchar, float) +DEF_CVT_SCALE_ABS_FUNC(8s8u, cvtScaleAbs_, schar, uchar, float) +DEF_CVT_SCALE_ABS_FUNC(16u8u, cvtScaleAbs_, ushort, uchar, float) +DEF_CVT_SCALE_ABS_FUNC(16s8u, cvtScaleAbs_, short, uchar, float) +DEF_CVT_SCALE_ABS_FUNC(32s8u, cvtScaleAbs_, int, uchar, float) +DEF_CVT_SCALE_ABS_FUNC(32f8u, cvtScaleAbs_, float, uchar, float) +DEF_CVT_SCALE_ABS_FUNC(64f8u, cvtScaleAbs_, double, uchar, float) -DEF_CVT_SCALE_FUNC(8u, uchar, uchar, float); -DEF_CVT_SCALE_FUNC(8s8u, schar, uchar, float); -DEF_CVT_SCALE_FUNC(16u8u, ushort, uchar, float); -DEF_CVT_SCALE_FUNC(16s8u, short, uchar, float); -DEF_CVT_SCALE_FUNC(32s8u, int, uchar, float); -DEF_CVT_SCALE_FUNC(32f8u, float, uchar, float); -DEF_CVT_SCALE_FUNC(64f8u, double, uchar, float); +DEF_CVT_SCALE_FUNC(8u, uchar, uchar, float) +DEF_CVT_SCALE_FUNC(8s8u, schar, uchar, float) +DEF_CVT_SCALE_FUNC(16u8u, ushort, uchar, float) +DEF_CVT_SCALE_FUNC(16s8u, short, uchar, float) +DEF_CVT_SCALE_FUNC(32s8u, int, uchar, float) +DEF_CVT_SCALE_FUNC(32f8u, float, uchar, float) +DEF_CVT_SCALE_FUNC(64f8u, double, uchar, float) -DEF_CVT_SCALE_FUNC(8u8s, uchar, schar, float); -DEF_CVT_SCALE_FUNC(8s, schar, schar, float); -DEF_CVT_SCALE_FUNC(16u8s, ushort, schar, float); -DEF_CVT_SCALE_FUNC(16s8s, short, schar, float); -DEF_CVT_SCALE_FUNC(32s8s, int, schar, float); -DEF_CVT_SCALE_FUNC(32f8s, float, schar, float); -DEF_CVT_SCALE_FUNC(64f8s, double, schar, float); +DEF_CVT_SCALE_FUNC(8u8s, uchar, schar, float) +DEF_CVT_SCALE_FUNC(8s, schar, schar, float) +DEF_CVT_SCALE_FUNC(16u8s, ushort, schar, float) +DEF_CVT_SCALE_FUNC(16s8s, short, schar, float) +DEF_CVT_SCALE_FUNC(32s8s, int, schar, float) +DEF_CVT_SCALE_FUNC(32f8s, float, schar, float) +DEF_CVT_SCALE_FUNC(64f8s, double, schar, float) -DEF_CVT_SCALE_FUNC(8u16u, uchar, ushort, float); -DEF_CVT_SCALE_FUNC(8s16u, schar, ushort, float); -DEF_CVT_SCALE_FUNC(16u, ushort, ushort, float); -DEF_CVT_SCALE_FUNC(16s16u, short, ushort, float); -DEF_CVT_SCALE_FUNC(32s16u, int, ushort, float); -DEF_CVT_SCALE_FUNC(32f16u, float, ushort, float); -DEF_CVT_SCALE_FUNC(64f16u, double, ushort, float); +DEF_CVT_SCALE_FUNC(8u16u, uchar, ushort, float) +DEF_CVT_SCALE_FUNC(8s16u, schar, ushort, float) +DEF_CVT_SCALE_FUNC(16u, ushort, ushort, float) +DEF_CVT_SCALE_FUNC(16s16u, short, ushort, float) +DEF_CVT_SCALE_FUNC(32s16u, int, ushort, float) +DEF_CVT_SCALE_FUNC(32f16u, float, ushort, float) +DEF_CVT_SCALE_FUNC(64f16u, double, ushort, float) -DEF_CVT_SCALE_FUNC(8u16s, uchar, short, float); -DEF_CVT_SCALE_FUNC(8s16s, schar, short, float); -DEF_CVT_SCALE_FUNC(16u16s, ushort, short, float); -DEF_CVT_SCALE_FUNC(16s, short, short, float); -DEF_CVT_SCALE_FUNC(32s16s, int, short, float); -DEF_CVT_SCALE_FUNC(32f16s, float, short, float); -DEF_CVT_SCALE_FUNC(64f16s, double, short, float); +DEF_CVT_SCALE_FUNC(8u16s, uchar, short, float) +DEF_CVT_SCALE_FUNC(8s16s, schar, short, float) +DEF_CVT_SCALE_FUNC(16u16s, ushort, short, float) +DEF_CVT_SCALE_FUNC(16s, short, short, float) +DEF_CVT_SCALE_FUNC(32s16s, int, short, float) +DEF_CVT_SCALE_FUNC(32f16s, float, short, float) +DEF_CVT_SCALE_FUNC(64f16s, double, short, float) -DEF_CVT_SCALE_FUNC(8u32s, uchar, int, float); -DEF_CVT_SCALE_FUNC(8s32s, schar, int, float); -DEF_CVT_SCALE_FUNC(16u32s, ushort, int, float); -DEF_CVT_SCALE_FUNC(16s32s, short, int, float); -DEF_CVT_SCALE_FUNC(32s, int, int, double); -DEF_CVT_SCALE_FUNC(32f32s, float, int, float); -DEF_CVT_SCALE_FUNC(64f32s, double, int, double); +DEF_CVT_SCALE_FUNC(8u32s, uchar, int, float) +DEF_CVT_SCALE_FUNC(8s32s, schar, int, float) +DEF_CVT_SCALE_FUNC(16u32s, ushort, int, float) +DEF_CVT_SCALE_FUNC(16s32s, short, int, float) +DEF_CVT_SCALE_FUNC(32s, int, int, double) +DEF_CVT_SCALE_FUNC(32f32s, float, int, float) +DEF_CVT_SCALE_FUNC(64f32s, double, int, double) -DEF_CVT_SCALE_FUNC(8u32f, uchar, float, float); -DEF_CVT_SCALE_FUNC(8s32f, schar, float, float); -DEF_CVT_SCALE_FUNC(16u32f, ushort, float, float); -DEF_CVT_SCALE_FUNC(16s32f, short, float, float); -DEF_CVT_SCALE_FUNC(32s32f, int, float, double); -DEF_CVT_SCALE_FUNC(32f, float, float, float); -DEF_CVT_SCALE_FUNC(64f32f, double, float, double); +DEF_CVT_SCALE_FUNC(8u32f, uchar, float, float) +DEF_CVT_SCALE_FUNC(8s32f, schar, float, float) +DEF_CVT_SCALE_FUNC(16u32f, ushort, float, float) +DEF_CVT_SCALE_FUNC(16s32f, short, float, float) +DEF_CVT_SCALE_FUNC(32s32f, int, float, double) +DEF_CVT_SCALE_FUNC(32f, float, float, float) +DEF_CVT_SCALE_FUNC(64f32f, double, float, double) -DEF_CVT_SCALE_FUNC(8u64f, uchar, double, double); -DEF_CVT_SCALE_FUNC(8s64f, schar, double, double); -DEF_CVT_SCALE_FUNC(16u64f, ushort, double, double); -DEF_CVT_SCALE_FUNC(16s64f, short, double, double); -DEF_CVT_SCALE_FUNC(32s64f, int, double, double); -DEF_CVT_SCALE_FUNC(32f64f, float, double, double); -DEF_CVT_SCALE_FUNC(64f, double, double, double); +DEF_CVT_SCALE_FUNC(8u64f, uchar, double, double) +DEF_CVT_SCALE_FUNC(8s64f, schar, double, double) +DEF_CVT_SCALE_FUNC(16u64f, ushort, double, double) +DEF_CVT_SCALE_FUNC(16s64f, short, double, double) +DEF_CVT_SCALE_FUNC(32s64f, int, double, double) +DEF_CVT_SCALE_FUNC(32f64f, float, double, double) +DEF_CVT_SCALE_FUNC(64f, double, double, double) -DEF_CPY_FUNC(8u, uchar); -DEF_CVT_FUNC(8s8u, schar, uchar); -DEF_CVT_FUNC(16u8u, ushort, uchar); -DEF_CVT_FUNC(16s8u, short, uchar); -DEF_CVT_FUNC(32s8u, int, uchar); -DEF_CVT_FUNC(32f8u, float, uchar); -DEF_CVT_FUNC(64f8u, double, uchar); +DEF_CPY_FUNC(8u, uchar) +DEF_CVT_FUNC(8s8u, schar, uchar) +DEF_CVT_FUNC(16u8u, ushort, uchar) +DEF_CVT_FUNC(16s8u, short, uchar) +DEF_CVT_FUNC(32s8u, int, uchar) +DEF_CVT_FUNC(32f8u, float, uchar) +DEF_CVT_FUNC(64f8u, double, uchar) -DEF_CVT_FUNC(8u8s, uchar, schar); -DEF_CVT_FUNC(16u8s, ushort, schar); -DEF_CVT_FUNC(16s8s, short, schar); -DEF_CVT_FUNC(32s8s, int, schar); -DEF_CVT_FUNC(32f8s, float, schar); -DEF_CVT_FUNC(64f8s, double, schar); +DEF_CVT_FUNC(8u8s, uchar, schar) +DEF_CVT_FUNC(16u8s, ushort, schar) +DEF_CVT_FUNC(16s8s, short, schar) +DEF_CVT_FUNC(32s8s, int, schar) +DEF_CVT_FUNC(32f8s, float, schar) +DEF_CVT_FUNC(64f8s, double, schar) -DEF_CVT_FUNC(8u16u, uchar, ushort); -DEF_CVT_FUNC(8s16u, schar, ushort); -DEF_CPY_FUNC(16u, ushort); -DEF_CVT_FUNC(16s16u, short, ushort); -DEF_CVT_FUNC(32s16u, int, ushort); -DEF_CVT_FUNC(32f16u, float, ushort); -DEF_CVT_FUNC(64f16u, double, ushort); +DEF_CVT_FUNC(8u16u, uchar, ushort) +DEF_CVT_FUNC(8s16u, schar, ushort) +DEF_CPY_FUNC(16u, ushort) +DEF_CVT_FUNC(16s16u, short, ushort) +DEF_CVT_FUNC(32s16u, int, ushort) +DEF_CVT_FUNC(32f16u, float, ushort) +DEF_CVT_FUNC(64f16u, double, ushort) -DEF_CVT_FUNC(8u16s, uchar, short); -DEF_CVT_FUNC(8s16s, schar, short); -DEF_CVT_FUNC(16u16s, ushort, short); -DEF_CVT_FUNC(32s16s, int, short); -DEF_CVT_FUNC(32f16s, float, short); -DEF_CVT_FUNC(64f16s, double, short); +DEF_CVT_FUNC(8u16s, uchar, short) +DEF_CVT_FUNC(8s16s, schar, short) +DEF_CVT_FUNC(16u16s, ushort, short) +DEF_CVT_FUNC(32s16s, int, short) +DEF_CVT_FUNC(32f16s, float, short) +DEF_CVT_FUNC(64f16s, double, short) -DEF_CVT_FUNC(8u32s, uchar, int); -DEF_CVT_FUNC(8s32s, schar, int); -DEF_CVT_FUNC(16u32s, ushort, int); -DEF_CVT_FUNC(16s32s, short, int); -DEF_CPY_FUNC(32s, int); -DEF_CVT_FUNC(32f32s, float, int); -DEF_CVT_FUNC(64f32s, double, int); +DEF_CVT_FUNC(8u32s, uchar, int) +DEF_CVT_FUNC(8s32s, schar, int) +DEF_CVT_FUNC(16u32s, ushort, int) +DEF_CVT_FUNC(16s32s, short, int) +DEF_CPY_FUNC(32s, int) +DEF_CVT_FUNC(32f32s, float, int) +DEF_CVT_FUNC(64f32s, double, int) -DEF_CVT_FUNC(8u32f, uchar, float); -DEF_CVT_FUNC(8s32f, schar, float); -DEF_CVT_FUNC(16u32f, ushort, float); -DEF_CVT_FUNC(16s32f, short, float); -DEF_CVT_FUNC(32s32f, int, float); -DEF_CVT_FUNC(64f32f, double, float); +DEF_CVT_FUNC(8u32f, uchar, float) +DEF_CVT_FUNC(8s32f, schar, float) +DEF_CVT_FUNC(16u32f, ushort, float) +DEF_CVT_FUNC(16s32f, short, float) +DEF_CVT_FUNC(32s32f, int, float) +DEF_CVT_FUNC(64f32f, double, float) -DEF_CVT_FUNC(8u64f, uchar, double); -DEF_CVT_FUNC(8s64f, schar, double); -DEF_CVT_FUNC(16u64f, ushort, double); -DEF_CVT_FUNC(16s64f, short, double); -DEF_CVT_FUNC(32s64f, int, double); -DEF_CVT_FUNC(32f64f, float, double); -DEF_CPY_FUNC(64s, int64); +DEF_CVT_FUNC(8u64f, uchar, double) +DEF_CVT_FUNC(8s64f, schar, double) +DEF_CVT_FUNC(16u64f, ushort, double) +DEF_CVT_FUNC(16s64f, short, double) +DEF_CVT_FUNC(32s64f, int, double) +DEF_CVT_FUNC(32f64f, float, double) +DEF_CPY_FUNC(64s, int64) static BinaryFunc getCvtScaleAbsFunc(int depth) { diff --git a/modules/core/src/copy.cpp b/modules/core/src/copy.cpp index 7d54ebc0b..472de6e1e 100644 --- a/modules/core/src/copy.cpp +++ b/modules/core/src/copy.cpp @@ -166,16 +166,16 @@ static void copyMask##suffix(const uchar* src, size_t sstep, const uchar* mask, } -DEF_COPY_MASK(8u, uchar); -DEF_COPY_MASK(16u, ushort); -DEF_COPY_MASK(8uC3, Vec3b); -DEF_COPY_MASK(32s, int); -DEF_COPY_MASK(16uC3, Vec3s); -DEF_COPY_MASK(32sC2, Vec2i); -DEF_COPY_MASK(32sC3, Vec3i); -DEF_COPY_MASK(32sC4, Vec4i); -DEF_COPY_MASK(32sC6, Vec6i); -DEF_COPY_MASK(32sC8, Vec8i); +DEF_COPY_MASK(8u, uchar) +DEF_COPY_MASK(16u, ushort) +DEF_COPY_MASK(8uC3, Vec3b) +DEF_COPY_MASK(32s, int) +DEF_COPY_MASK(16uC3, Vec3s) +DEF_COPY_MASK(32sC2, Vec2i) +DEF_COPY_MASK(32sC3, Vec3i) +DEF_COPY_MASK(32sC4, Vec4i) +DEF_COPY_MASK(32sC6, Vec6i) +DEF_COPY_MASK(32sC8, Vec8i) BinaryFunc copyMaskTab[] = { diff --git a/modules/core/src/precomp.hpp b/modules/core/src/precomp.hpp index 3727b2f15..ad4fd592e 100644 --- a/modules/core/src/precomp.hpp +++ b/modules/core/src/precomp.hpp @@ -153,12 +153,14 @@ template struct OpMax inline Size getContinuousSize( const Mat& m1, int widthScale=1 ) { + CV_Assert(m1.dims <= 2); return m1.isContinuous() ? Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); } inline Size getContinuousSize( const Mat& m1, const Mat& m2, int widthScale=1 ) { + CV_Assert(m1.dims <= 2 && m1.size() == m2.size()); return (m1.flags & m2.flags & Mat::CONTINUOUS_FLAG) != 0 ? Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); } @@ -166,6 +168,7 @@ inline Size getContinuousSize( const Mat& m1, const Mat& m2, int widthScale=1 ) inline Size getContinuousSize( const Mat& m1, const Mat& m2, const Mat& m3, int widthScale=1 ) { + CV_Assert(m1.dims <= 2 && m1.size() == m2.size() && m1.size() == m3.size()); return (m1.flags & m2.flags & m3.flags & Mat::CONTINUOUS_FLAG) != 0 ? Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); } @@ -174,6 +177,7 @@ inline Size getContinuousSize( const Mat& m1, const Mat& m2, const Mat& m3, const Mat& m4, int widthScale=1 ) { + CV_Assert(m1.dims <= 2 && m1.size() == m2.size() && m1.size() == m3.size() && m1.size() == m4.size()); return (m1.flags & m2.flags & m3.flags & m4.flags & Mat::CONTINUOUS_FLAG) != 0 ? Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); } @@ -182,6 +186,7 @@ inline Size getContinuousSize( const Mat& m1, const Mat& m2, const Mat& m3, const Mat& m4, const Mat& m5, int widthScale=1 ) { + CV_Assert(m1.dims <= 2 && m1.size() == m2.size() && m1.size() == m3.size() && m1.size() == m4.size() && m1.size() == m5.size()); return (m1.flags & m2.flags & m3.flags & m4.flags & m5.flags & Mat::CONTINUOUS_FLAG) != 0 ? Size(m1.cols*m1.rows*widthScale, 1) : Size(m1.cols*widthScale, m1.rows); } diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 1b251066f..b3abbdc5c 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -849,7 +849,9 @@ public: }; #ifdef WIN32 +#ifdef _MSC_VER #pragma warning(disable:4505) // unreferenced local function has been removed +#endif #ifdef HAVE_WINRT // using C++11 thread attribute for local thread data diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index 7486e134a..b432042f9 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -115,7 +115,7 @@ struct BaseAddOp : public BaseElemWiseOp struct AddOp : public BaseAddOp { - AddOp() : BaseAddOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {}; + AddOp() : BaseAddOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat& mask) { if( mask.empty() ) @@ -128,7 +128,7 @@ struct AddOp : public BaseAddOp struct SubOp : public BaseAddOp { - SubOp() : BaseAddOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, -1, Scalar::all(0)) {}; + SubOp() : BaseAddOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, -1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat& mask) { if( mask.empty() ) @@ -141,7 +141,7 @@ struct SubOp : public BaseAddOp struct AddSOp : public BaseAddOp { - AddSOp() : BaseAddOp(1, FIX_ALPHA+FIX_BETA+SUPPORT_MASK, 1, 0, Scalar::all(0)) {}; + AddSOp() : BaseAddOp(1, FIX_ALPHA+FIX_BETA+SUPPORT_MASK, 1, 0, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat& mask) { if( mask.empty() ) @@ -154,7 +154,7 @@ struct AddSOp : public BaseAddOp struct SubRSOp : public BaseAddOp { - SubRSOp() : BaseAddOp(1, FIX_ALPHA+FIX_BETA+SUPPORT_MASK, -1, 0, Scalar::all(0)) {}; + SubRSOp() : BaseAddOp(1, FIX_ALPHA+FIX_BETA+SUPPORT_MASK, -1, 0, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat& mask) { if( mask.empty() ) @@ -167,7 +167,7 @@ struct SubRSOp : public BaseAddOp struct ScaleAddOp : public BaseAddOp { - ScaleAddOp() : BaseAddOp(2, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + ScaleAddOp() : BaseAddOp(2, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { scaleAdd(src[0], alpha, src[1], dst); @@ -181,7 +181,7 @@ struct ScaleAddOp : public BaseAddOp struct AddWeightedOp : public BaseAddOp { - AddWeightedOp() : BaseAddOp(2, REAL_GAMMA, 1, 1, Scalar::all(0)) {}; + AddWeightedOp() : BaseAddOp(2, REAL_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { addWeighted(src[0], alpha, src[1], beta, gamma[0], dst); @@ -194,7 +194,7 @@ struct AddWeightedOp : public BaseAddOp struct MulOp : public BaseElemWiseOp { - MulOp() : BaseElemWiseOp(2, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + MulOp() : BaseElemWiseOp(2, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void getValueRange(int depth, double& minval, double& maxval) { minval = depth < CV_32S ? cvtest::getMinVal(depth) : depth == CV_32S ? -1000000 : -1000.; @@ -218,7 +218,7 @@ struct MulOp : public BaseElemWiseOp struct DivOp : public BaseElemWiseOp { - DivOp() : BaseElemWiseOp(2, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + DivOp() : BaseElemWiseOp(2, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::divide(src[0], src[1], dst, alpha); @@ -235,7 +235,7 @@ struct DivOp : public BaseElemWiseOp struct RecipOp : public BaseElemWiseOp { - RecipOp() : BaseElemWiseOp(1, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + RecipOp() : BaseElemWiseOp(1, FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::divide(alpha, src[0], dst); @@ -252,7 +252,7 @@ struct RecipOp : public BaseElemWiseOp struct AbsDiffOp : public BaseAddOp { - AbsDiffOp() : BaseAddOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, -1, Scalar::all(0)) {}; + AbsDiffOp() : BaseAddOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, -1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { absdiff(src[0], src[1], dst); @@ -265,7 +265,7 @@ struct AbsDiffOp : public BaseAddOp struct AbsDiffSOp : public BaseAddOp { - AbsDiffSOp() : BaseAddOp(1, FIX_ALPHA+FIX_BETA, 1, 0, Scalar::all(0)) {}; + AbsDiffSOp() : BaseAddOp(1, FIX_ALPHA+FIX_BETA, 1, 0, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { absdiff(src[0], gamma, dst); @@ -278,7 +278,7 @@ struct AbsDiffSOp : public BaseAddOp struct LogicOp : public BaseElemWiseOp { - LogicOp(char _opcode) : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)), opcode(_opcode) {}; + LogicOp(char _opcode) : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)), opcode(_opcode) {} void op(const vector& src, Mat& dst, const Mat& mask) { if( opcode == '&' ) @@ -309,7 +309,7 @@ struct LogicOp : public BaseElemWiseOp struct LogicSOp : public BaseElemWiseOp { LogicSOp(char _opcode) - : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+(_opcode != '~' ? SUPPORT_MASK : 0), 1, 1, Scalar::all(0)), opcode(_opcode) {}; + : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+(_opcode != '~' ? SUPPORT_MASK : 0), 1, 1, Scalar::all(0)), opcode(_opcode) {} void op(const vector& src, Mat& dst, const Mat& mask) { if( opcode == '&' ) @@ -341,7 +341,7 @@ struct LogicSOp : public BaseElemWiseOp struct MinOp : public BaseElemWiseOp { - MinOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + MinOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::min(src[0], src[1], dst); @@ -358,7 +358,7 @@ struct MinOp : public BaseElemWiseOp struct MaxOp : public BaseElemWiseOp { - MaxOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + MaxOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::max(src[0], src[1], dst); @@ -375,7 +375,7 @@ struct MaxOp : public BaseElemWiseOp struct MinSOp : public BaseElemWiseOp { - MinSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {}; + MinSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::min(src[0], gamma[0], dst); @@ -392,7 +392,7 @@ struct MinSOp : public BaseElemWiseOp struct MaxSOp : public BaseElemWiseOp { - MaxSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {}; + MaxSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::max(src[0], gamma[0], dst); @@ -409,7 +409,7 @@ struct MaxSOp : public BaseElemWiseOp struct CmpOp : public BaseElemWiseOp { - CmpOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + CmpOp() : BaseElemWiseOp(2, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void generateScalars(int depth, RNG& rng) { BaseElemWiseOp::generateScalars(depth, rng); @@ -437,7 +437,7 @@ struct CmpOp : public BaseElemWiseOp struct CmpSOp : public BaseElemWiseOp { - CmpSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {}; + CmpSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {} void generateScalars(int depth, RNG& rng) { BaseElemWiseOp::generateScalars(depth, rng); @@ -467,7 +467,7 @@ struct CmpSOp : public BaseElemWiseOp struct CopyOp : public BaseElemWiseOp { - CopyOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {}; + CopyOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat& mask) { src[0].copyTo(dst, mask); @@ -490,7 +490,7 @@ struct CopyOp : public BaseElemWiseOp struct SetOp : public BaseElemWiseOp { - SetOp() : BaseElemWiseOp(0, FIX_ALPHA+FIX_BETA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {}; + SetOp() : BaseElemWiseOp(0, FIX_ALPHA+FIX_BETA+SUPPORT_MASK, 1, 1, Scalar::all(0)) {} void op(const vector&, Mat& dst, const Mat& mask) { dst.setTo(gamma, mask); @@ -651,7 +651,7 @@ static void inRangeS(const Mat& src, const Scalar& lb, const Scalar& rb, Mat& ds struct InRangeSOp : public BaseElemWiseOp { - InRangeSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA, 1, 1, Scalar::all(0)) {}; + InRangeSOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::inRange(src[0], gamma, gamma1, dst); @@ -681,7 +681,7 @@ struct InRangeSOp : public BaseElemWiseOp struct InRangeOp : public BaseElemWiseOp { - InRangeOp() : BaseElemWiseOp(3, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + InRangeOp() : BaseElemWiseOp(3, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { Mat lb, rb; @@ -707,7 +707,7 @@ struct InRangeOp : public BaseElemWiseOp struct ConvertScaleOp : public BaseElemWiseOp { - ConvertScaleOp() : BaseElemWiseOp(1, FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)), ddepth(0) { }; + ConvertScaleOp() : BaseElemWiseOp(1, FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)), ddepth(0) { } void op(const vector& src, Mat& dst, const Mat&) { src[0].convertTo(dst, ddepth, alpha, gamma[0]); @@ -742,7 +742,7 @@ struct ConvertScaleOp : public BaseElemWiseOp struct ConvertScaleAbsOp : public BaseElemWiseOp { - ConvertScaleAbsOp() : BaseElemWiseOp(1, FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {}; + ConvertScaleAbsOp() : BaseElemWiseOp(1, FIX_BETA+REAL_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector& src, Mat& dst, const Mat&) { cv::convertScaleAbs(src[0], dst, alpha, gamma[0]); @@ -810,7 +810,7 @@ static void setIdentity(Mat& dst, const Scalar& s) struct FlipOp : public BaseElemWiseOp { - FlipOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + FlipOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void getRandomSize(RNG& rng, vector& size) { cvtest::randomSize(rng, 2, 2, cvtest::ARITHM_MAX_SIZE_LOG, size); @@ -836,7 +836,7 @@ struct FlipOp : public BaseElemWiseOp struct TransposeOp : public BaseElemWiseOp { - TransposeOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + TransposeOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void getRandomSize(RNG& rng, vector& size) { cvtest::randomSize(rng, 2, 2, cvtest::ARITHM_MAX_SIZE_LOG, size); @@ -857,7 +857,7 @@ struct TransposeOp : public BaseElemWiseOp struct SetIdentityOp : public BaseElemWiseOp { - SetIdentityOp() : BaseElemWiseOp(0, FIX_ALPHA+FIX_BETA, 1, 1, Scalar::all(0)) {}; + SetIdentityOp() : BaseElemWiseOp(0, FIX_ALPHA+FIX_BETA, 1, 1, Scalar::all(0)) {} void getRandomSize(RNG& rng, vector& size) { cvtest::randomSize(rng, 2, 2, cvtest::ARITHM_MAX_SIZE_LOG, size); @@ -878,7 +878,7 @@ struct SetIdentityOp : public BaseElemWiseOp struct SetZeroOp : public BaseElemWiseOp { - SetZeroOp() : BaseElemWiseOp(0, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + SetZeroOp() : BaseElemWiseOp(0, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} void op(const vector&, Mat& dst, const Mat&) { dst = Scalar::all(0); @@ -954,7 +954,7 @@ static void log(const Mat& src, Mat& dst) struct ExpOp : public BaseElemWiseOp { - ExpOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + ExpOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} int getRandomType(RNG& rng) { return cvtest::randomType(rng, _OutputArray::DEPTH_MASK_FLT, 1, ARITHM_MAX_CHANNELS); @@ -981,7 +981,7 @@ struct ExpOp : public BaseElemWiseOp struct LogOp : public BaseElemWiseOp { - LogOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {}; + LogOp() : BaseElemWiseOp(1, FIX_ALPHA+FIX_BETA+FIX_GAMMA, 1, 1, Scalar::all(0)) {} int getRandomType(RNG& rng) { return cvtest::randomType(rng, _OutputArray::DEPTH_MASK_FLT, 1, ARITHM_MAX_CHANNELS); @@ -1564,3 +1564,19 @@ TEST(Core_round, CvRound) ASSERT_EQ(-2, cvRound(-2.5)); ASSERT_EQ(-4, cvRound(-3.5)); } + + +typedef testing::TestWithParam Mul1; + +TEST_P(Mul1, One) +{ + Size size = GetParam(); + cv::Mat src(size, CV_32FC1, cv::Scalar::all(2)), dst, + ref_dst(size, CV_32FC1, cv::Scalar::all(6)); + + cv::multiply(3, src, dst); + + ASSERT_EQ(0, cv::norm(dst, ref_dst, cv::NORM_INF)); +} + +INSTANTIATE_TEST_CASE_P(Arithm, Mul1, testing::Values(Size(2, 2), Size(1, 1))); diff --git a/modules/cudaimgproc/perf/perf_match_template.cpp b/modules/cudaimgproc/perf/perf_match_template.cpp index c026ec27b..321250c38 100644 --- a/modules/cudaimgproc/perf/perf_match_template.cpp +++ b/modules/cudaimgproc/perf/perf_match_template.cpp @@ -90,7 +90,7 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, MatchTemplate8U, CPU_SANITY_CHECK(dst); } -}; +} //////////////////////////////////////////////////////////////////////////////// // MatchTemplate32F diff --git a/modules/features2d/src/features2d_init.cpp b/modules/features2d/src/features2d_init.cpp index 959c1ac9d..889c5b64c 100644 --- a/modules/features2d/src/features2d_init.cpp +++ b/modules/features2d/src/features2d_init.cpp @@ -58,19 +58,19 @@ Ptr Feature2D::create( const String& feature2DType ) CV_INIT_ALGORITHM(BRISK, "Feature2D.BRISK", obj.info()->addParam(obj, "thres", obj.threshold); - obj.info()->addParam(obj, "octaves", obj.octaves)); + obj.info()->addParam(obj, "octaves", obj.octaves)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// CV_INIT_ALGORITHM(BriefDescriptorExtractor, "Feature2D.BRIEF", - obj.info()->addParam(obj, "bytes", obj.bytes_)); + obj.info()->addParam(obj, "bytes", obj.bytes_)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// CV_INIT_ALGORITHM(FastFeatureDetector, "Feature2D.FAST", obj.info()->addParam(obj, "threshold", obj.threshold); obj.info()->addParam(obj, "nonmaxSuppression", obj.nonmaxSuppression); - obj.info()->addParam(obj, "type", obj.type)); + obj.info()->addParam(obj, "type", obj.type)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -79,7 +79,7 @@ CV_INIT_ALGORITHM(StarDetector, "Feature2D.STAR", obj.info()->addParam(obj, "responseThreshold", obj.responseThreshold); obj.info()->addParam(obj, "lineThresholdProjected", obj.lineThresholdProjected); obj.info()->addParam(obj, "lineThresholdBinarized", obj.lineThresholdBinarized); - obj.info()->addParam(obj, "suppressNonmaxSize", obj.suppressNonmaxSize)); + obj.info()->addParam(obj, "suppressNonmaxSize", obj.suppressNonmaxSize)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -92,7 +92,7 @@ CV_INIT_ALGORITHM(MSER, "Feature2D.MSER", obj.info()->addParam(obj, "maxEvolution", obj.maxEvolution); obj.info()->addParam(obj, "areaThreshold", obj.areaThreshold); obj.info()->addParam(obj, "minMargin", obj.minMargin); - obj.info()->addParam(obj, "edgeBlurSize", obj.edgeBlurSize)); + obj.info()->addParam(obj, "edgeBlurSize", obj.edgeBlurSize)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -104,7 +104,7 @@ CV_INIT_ALGORITHM(ORB, "Feature2D.ORB", obj.info()->addParam(obj, "edgeThreshold", obj.edgeThreshold); obj.info()->addParam(obj, "patchSize", obj.patchSize); obj.info()->addParam(obj, "WTA_K", obj.WTA_K); - obj.info()->addParam(obj, "scoreType", obj.scoreType)); + obj.info()->addParam(obj, "scoreType", obj.scoreType)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -112,7 +112,7 @@ CV_INIT_ALGORITHM(FREAK, "Feature2D.FREAK", obj.info()->addParam(obj, "orientationNormalized", obj.orientationNormalized); obj.info()->addParam(obj, "scaleNormalized", obj.scaleNormalized); obj.info()->addParam(obj, "patternScale", obj.patternScale); - obj.info()->addParam(obj, "nbOctave", obj.nOctaves)); + obj.info()->addParam(obj, "nbOctave", obj.nOctaves)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -121,7 +121,7 @@ CV_INIT_ALGORITHM(GFTTDetector, "Feature2D.GFTT", obj.info()->addParam(obj, "qualityLevel", obj.qualityLevel); obj.info()->addParam(obj, "minDistance", obj.minDistance); obj.info()->addParam(obj, "useHarrisDetector", obj.useHarrisDetector); - obj.info()->addParam(obj, "k", obj.k)); + obj.info()->addParam(obj, "k", obj.k)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -141,7 +141,7 @@ CV_INIT_ALGORITHM(SimpleBlobDetector, "Feature2D.SimpleBlob", obj.info()->addParam(obj, "maxInertiaRatio", obj.params.maxInertiaRatio); obj.info()->addParam(obj, "filterByConvexity", obj.params.filterByConvexity); obj.info()->addParam(obj, "maxConvexity", obj.params.maxConvexity); - ); + ) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -162,7 +162,7 @@ CV_INIT_ALGORITHM(HarrisDetector, "Feature2D.HARRIS", obj.info()->addParam(obj, "qualityLevel", obj.qualityLevel); obj.info()->addParam(obj, "minDistance", obj.minDistance); obj.info()->addParam(obj, "useHarrisDetector", obj.useHarrisDetector); - obj.info()->addParam(obj, "k", obj.k)); + obj.info()->addParam(obj, "k", obj.k)) //////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -173,21 +173,21 @@ CV_INIT_ALGORITHM(DenseFeatureDetector, "Feature2D.Dense", obj.info()->addParam(obj, "initXyStep", obj.initXyStep); obj.info()->addParam(obj, "initImgBound", obj.initImgBound); obj.info()->addParam(obj, "varyXyStepWithScale", obj.varyXyStepWithScale); - obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale)); + obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale)) CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid", obj.info()->addParam(obj, "detector", obj.detector, false, 0, 0); // Extra params added to avoid VS2013 fatal error in opencv2/core.hpp (decl. of addParam) obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints); obj.info()->addParam(obj, "gridRows", obj.gridRows); - obj.info()->addParam(obj, "gridCols", obj.gridCols)); + obj.info()->addParam(obj, "gridCols", obj.gridCols)) //////////////////////////////////////////////////////////////////////////////////////////////////////////// CV_INIT_ALGORITHM(BFMatcher, "DescriptorMatcher.BFMatcher", obj.info()->addParam(obj, "normType", obj.normType); - obj.info()->addParam(obj, "crossCheck", obj.crossCheck)); + obj.info()->addParam(obj, "crossCheck", obj.crossCheck)) -CV_INIT_ALGORITHM(FlannBasedMatcher, "DescriptorMatcher.FlannBasedMatcher",); +CV_INIT_ALGORITHM(FlannBasedMatcher, "DescriptorMatcher.FlannBasedMatcher",) /////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h index 2456c77a2..710382053 100644 --- a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h +++ b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h @@ -413,12 +413,6 @@ public: void loadIndex(FILE* stream) { - load_value(stream, branching_); - load_value(stream, trees_); - load_value(stream, centers_init_); - load_value(stream, leaf_size_); - load_value(stream, memoryCounter); - free_elements(); if (root!=NULL) { @@ -429,6 +423,12 @@ public: delete[] indices; } + load_value(stream, branching_); + load_value(stream, trees_); + load_value(stream, centers_init_); + load_value(stream, leaf_size_); + load_value(stream, memoryCounter); + indices = new int*[trees_]; root = new NodePtr[trees_]; for (int i=0; i exception code RBS_THROW_FORB=-124, // exception code RBS_HUFF_FORB=2047, // forrbidden huffman code "value" - RBS_BAD_HEADER=-125, // invalid header + RBS_BAD_HEADER=-125 // invalid header }; typedef unsigned long ulong; diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp index d0eabb155..4a3b029b8 100644 --- a/modules/highgui/src/cap_ffmpeg_impl.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp @@ -2096,7 +2096,7 @@ enum VideoCodec_YV12 = (('Y'<<24)|('V'<<16)|('1'<<8)|('2')), // Y,V,U (4:2:0) VideoCodec_NV12 = (('N'<<24)|('V'<<16)|('1'<<8)|('2')), // Y,UV (4:2:0) VideoCodec_YUYV = (('Y'<<24)|('U'<<16)|('Y'<<8)|('V')), // YUYV/YUY2 (4:2:2) - VideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y')), // UYVY (4:2:2) + VideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y')) // UYVY (4:2:2) }; enum @@ -2104,7 +2104,7 @@ enum VideoChromaFormat_Monochrome = 0, VideoChromaFormat_YUV420, VideoChromaFormat_YUV422, - VideoChromaFormat_YUV444, + VideoChromaFormat_YUV444 }; struct InputMediaStream_FFMPEG diff --git a/modules/highgui/src/precomp.hpp b/modules/highgui/src/precomp.hpp index 925cfdf40..fbd064060 100644 --- a/modules/highgui/src/precomp.hpp +++ b/modules/highgui/src/precomp.hpp @@ -58,6 +58,14 @@ #include #if defined WIN32 || defined WINCE + #if !defined _WIN32_WINNT + #ifdef HAVE_MSMF + #define _WIN32_WINNT 0x0600 // Windows Vista + #else + #define _WIN32_WINNT 0x0500 // Windows 2000 + #endif + #endif + #include #undef small #undef min diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 6a5355c53..270ecc78e 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -43,27 +43,11 @@ #if defined WIN32 || defined _WIN32 -#define COMPILE_MULTIMON_STUBS // Required for multi-monitor support -#ifndef _MULTIMON_USE_SECURE_CRT -# define _MULTIMON_USE_SECURE_CRT 0 // some MinGW platforms have no strncpy_s -#endif - -#if defined SM_CMONITORS && !defined MONITOR_DEFAULTTONEAREST -# define MONITOR_DEFAULTTONULL 0x00000000 -# define MONITOR_DEFAULTTOPRIMARY 0x00000001 -# define MONITOR_DEFAULTTONEAREST 0x00000002 -# define MONITORINFOF_PRIMARY 0x00000001 -#endif -#ifndef __inout -# define __inout -#endif - #ifdef __GNUC__ # pragma GCC diagnostic ignored "-Wmissing-declarations" #endif #include -#include #include #include #include diff --git a/modules/imgproc/perf/perf_filter2d.cpp b/modules/imgproc/perf/perf_filter2d.cpp index cfce852b7..3b70d3a00 100644 --- a/modules/imgproc/perf/perf_filter2d.cpp +++ b/modules/imgproc/perf/perf_filter2d.cpp @@ -8,7 +8,7 @@ using std::tr1::make_tuple; using std::tr1::get; -CV_ENUM(BorderMode, BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT_101); +CV_ENUM(BorderMode, BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT_101) typedef TestBaseWithParam< tr1::tuple > TestFilter2d; typedef TestBaseWithParam< tr1::tuple > Image_KernelSize; diff --git a/modules/imgproc/src/gcgraph.hpp b/modules/imgproc/src/gcgraph.hpp index f93bd19a2..16c25dea3 100644 --- a/modules/imgproc/src/gcgraph.hpp +++ b/modules/imgproc/src/gcgraph.hpp @@ -380,6 +380,6 @@ bool GCGraph::inSourceSegment( int i ) { CV_Assert( i>=0 && i<(int)vtcs.size() ); return vtcs[i].t == 0; -}; +} #endif diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index 8cbc090df..a69ba8a2a 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -2565,15 +2565,15 @@ struct RemapVec_8u int operator()( const Mat& _src, void* _dst, const short* XY, const ushort* FXY, const void* _wtab, int width ) const { - int cn = _src.channels(); + int cn = _src.channels(), x = 0, sstep = (int)_src.step; - if( (cn != 1 && cn != 3 && cn != 4) || !checkHardwareSupport(CV_CPU_SSE2) ) + if( (cn != 1 && cn != 3 && cn != 4) || !checkHardwareSupport(CV_CPU_SSE2) || + sstep > 0x8000 ) return 0; const uchar *S0 = _src.data, *S1 = _src.data + _src.step; const short* wtab = cn == 1 ? (const short*)_wtab : &BilinearTab_iC4[0][0][0]; uchar* D = (uchar*)_dst; - int x = 0, sstep = (int)_src.step; __m128i delta = _mm_set1_epi32(INTER_REMAP_COEF_SCALE/2); __m128i xy2ofs = _mm_set1_epi32(cn + (sstep << 16)); __m128i z = _mm_setzero_si128(); diff --git a/modules/imgproc/test/test_cvtyuv.cpp b/modules/imgproc/test/test_cvtyuv.cpp index bd8d95dc7..0cce64cdb 100644 --- a/modules/imgproc/test/test_cvtyuv.cpp +++ b/modules/imgproc/test/test_cvtyuv.cpp @@ -603,7 +603,7 @@ CV_ENUM(YUVCVTS, CV_YUV2RGB_NV12, CV_YUV2BGR_NV12, CV_YUV2RGB_NV21, CV_YUV2BGR_N CV_YUV2RGBA_YUY2, CV_YUV2BGRA_YUY2, CV_YUV2RGBA_YVYU, CV_YUV2BGRA_YVYU, CV_YUV2GRAY_420, CV_YUV2GRAY_UYVY, CV_YUV2GRAY_YUY2, CV_YUV2BGR, CV_YUV2RGB, CV_RGB2YUV_YV12, CV_BGR2YUV_YV12, CV_RGBA2YUV_YV12, - CV_BGRA2YUV_YV12, CV_RGB2YUV_I420, CV_BGR2YUV_I420, CV_RGBA2YUV_I420, CV_BGRA2YUV_I420); + CV_BGRA2YUV_YV12, CV_RGB2YUV_I420, CV_BGR2YUV_I420, CV_RGBA2YUV_I420, CV_BGRA2YUV_I420) typedef ::testing::TestWithParam Imgproc_ColorYUV; diff --git a/modules/legacy/src/blobtrack.cpp b/modules/legacy/src/blobtrack.cpp index 48b83ef91..00e4905cc 100644 --- a/modules/legacy/src/blobtrack.cpp +++ b/modules/legacy/src/blobtrack.cpp @@ -205,7 +205,7 @@ double CvVSModule::GetParam(const char* name) if(p->pInt) return p->pInt[0]; } return 0; -}; +} const char* CvVSModule::GetParamStr(const char* name) { diff --git a/modules/legacy/src/enteringblobdetection.cpp b/modules/legacy/src/enteringblobdetection.cpp index d66a997a7..a383bcf67 100644 --- a/modules/legacy/src/enteringblobdetection.cpp +++ b/modules/legacy/src/enteringblobdetection.cpp @@ -209,7 +209,7 @@ public: CvBlobDetectorSimple(); ~CvBlobDetectorSimple(); int DetectNewBlob(IplImage* pImg, IplImage* pFGMask, CvBlobSeq* pNewBlobList, CvBlobSeq* pOldBlobList); - void Release(){delete this;}; + void Release(){delete this;} protected: IplImage* m_pMaskBlobNew; @@ -219,7 +219,7 @@ protected: }; /* Blob detector creator (sole interface function for this file) */ -CvBlobDetector* cvCreateBlobDetectorSimple(){return new CvBlobDetectorSimple;}; +CvBlobDetector* cvCreateBlobDetectorSimple(){return new CvBlobDetectorSimple;} /* Constructor of BlobDetector: */ CvBlobDetectorSimple::CvBlobDetectorSimple() diff --git a/modules/legacy/src/vecfacetracking.cpp b/modules/legacy/src/vecfacetracking.cpp index 81d1a04cb..b2a03b47f 100644 --- a/modules/legacy/src/vecfacetracking.cpp +++ b/modules/legacy/src/vecfacetracking.cpp @@ -52,7 +52,7 @@ enum { MOUTH = 0, LEYE = 1, - REYE = 2, + REYE = 2 }; #define MAX_LAYERS 64 diff --git a/modules/ml/src/ml_init.cpp b/modules/ml/src/ml_init.cpp index 3ff7d9bae..fcf9e1c89 100644 --- a/modules/ml/src/ml_init.cpp +++ b/modules/ml/src/ml_init.cpp @@ -52,7 +52,7 @@ CV_INIT_ALGORITHM(EM, "StatModel.EM", obj.info()->addParam(obj, "epsilon", obj.epsilon); obj.info()->addParam(obj, "weights", obj.weights, true); obj.info()->addParam(obj, "means", obj.means, true); - obj.info()->addParam(obj, "covs", obj.covs, true)); + obj.info()->addParam(obj, "covs", obj.covs, true)) bool initModule_ml(void) { diff --git a/modules/nonfree/src/nonfree_init.cpp b/modules/nonfree/src/nonfree_init.cpp index ac804dd9a..c59e73548 100644 --- a/modules/nonfree/src/nonfree_init.cpp +++ b/modules/nonfree/src/nonfree_init.cpp @@ -52,7 +52,7 @@ CV_INIT_ALGORITHM(SURF, "Feature2D.SURF", obj.info()->addParam(obj, "nOctaves", obj.nOctaves); obj.info()->addParam(obj, "nOctaveLayers", obj.nOctaveLayers); obj.info()->addParam(obj, "extended", obj.extended); - obj.info()->addParam(obj, "upright", obj.upright)); + obj.info()->addParam(obj, "upright", obj.upright)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -61,7 +61,7 @@ CV_INIT_ALGORITHM(SIFT, "Feature2D.SIFT", obj.info()->addParam(obj, "nOctaveLayers", obj.nOctaveLayers); obj.info()->addParam(obj, "contrastThreshold", obj.contrastThreshold); obj.info()->addParam(obj, "edgeThreshold", obj.edgeThreshold); - obj.info()->addParam(obj, "sigma", obj.sigma)); + obj.info()->addParam(obj, "sigma", obj.sigma)) /////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/modules/ocl/include/opencv2/ocl.hpp b/modules/ocl/include/opencv2/ocl.hpp index faf0e96bf..d305c33da 100644 --- a/modules/ocl/include/opencv2/ocl.hpp +++ b/modules/ocl/include/opencv2/ocl.hpp @@ -167,7 +167,7 @@ namespace cv CACHE_NONE = 0, // do not cache OpenCL binary CACHE_DEBUG = 0x1 << 0, // cache OpenCL binary when built in debug mode CACHE_RELEASE = 0x1 << 1, // default behavior, only cache when built in release mode - CACHE_ALL = CACHE_DEBUG | CACHE_RELEASE, // cache opencl binary + CACHE_ALL = CACHE_DEBUG | CACHE_RELEASE // cache opencl binary }; //! Enable or disable OpenCL program binary caching onto local disk // After a program (*.cl files in opencl/ folder) is built at runtime, we allow the diff --git a/modules/ocl/include/opencv2/ocl/private/opencl_utils.hpp b/modules/ocl/include/opencv2/ocl/private/opencl_utils.hpp index dfc658372..6d74eb1f8 100644 --- a/modules/ocl/include/opencv2/ocl/private/opencl_utils.hpp +++ b/modules/ocl/include/opencv2/ocl/private/opencl_utils.hpp @@ -108,7 +108,7 @@ inline cl_int getStringInfo(Functor f, ObjectType obj, cl_uint name, std::string } return CL_SUCCESS; -}; +} } // namespace cl_utils diff --git a/modules/ocl/test/test_canny.cpp b/modules/ocl/test/test_canny.cpp index 82286031f..6bd7f26ad 100644 --- a/modules/ocl/test/test_canny.cpp +++ b/modules/ocl/test/test_canny.cpp @@ -48,8 +48,8 @@ //////////////////////////////////////////////////////// // Canny -IMPLEMENT_PARAM_CLASS(AppertureSize, int); -IMPLEMENT_PARAM_CLASS(L2gradient, bool); +IMPLEMENT_PARAM_CLASS(AppertureSize, int) +IMPLEMENT_PARAM_CLASS(L2gradient, bool) PARAM_TEST_CASE(Canny, AppertureSize, L2gradient) { diff --git a/modules/ocl/test/test_match_template.cpp b/modules/ocl/test/test_match_template.cpp index edbc36a3f..aa63f3d9e 100644 --- a/modules/ocl/test/test_match_template.cpp +++ b/modules/ocl/test/test_match_template.cpp @@ -50,7 +50,7 @@ // MatchTemplate #define ALL_TEMPLATE_METHODS testing::Values(TemplateMethod(cv::TM_SQDIFF), TemplateMethod(cv::TM_CCORR), TemplateMethod(cv::TM_CCOEFF), TemplateMethod(cv::TM_SQDIFF_NORMED), TemplateMethod(cv::TM_CCORR_NORMED), TemplateMethod(cv::TM_CCOEFF_NORMED)) -IMPLEMENT_PARAM_CLASS(TemplateSize, cv::Size); +IMPLEMENT_PARAM_CLASS(TemplateSize, cv::Size) #define MTEMP_SIZES testing::Values(cv::Size(128, 256), cv::Size(1024, 768)) diff --git a/modules/ocl/test/test_objdetect.cpp b/modules/ocl/test/test_objdetect.cpp index 119caa9ab..f179e9e91 100644 --- a/modules/ocl/test/test_objdetect.cpp +++ b/modules/ocl/test/test_objdetect.cpp @@ -180,7 +180,7 @@ INSTANTIATE_TEST_CASE_P(OCL_ObjDetect, HOG, testing::Combine( ///////////////////////////// Haar ////////////////////////////// -IMPLEMENT_PARAM_CLASS(CascadeName, std::string); +IMPLEMENT_PARAM_CLASS(CascadeName, std::string) CascadeName cascade_frontalface_alt(std::string("haarcascade_frontalface_alt.xml")); CascadeName cascade_frontalface_alt2(std::string("haarcascade_frontalface_alt2.xml")); diff --git a/modules/ocl/test/utility.hpp b/modules/ocl/test/utility.hpp index 2659a5363..4ecc9f0ac 100644 --- a/modules/ocl/test/utility.hpp +++ b/modules/ocl/test/utility.hpp @@ -273,7 +273,7 @@ CV_ENUM(Interpolation, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA) CV_ENUM(Border, BORDER_REFLECT101, BORDER_REPLICATE, BORDER_CONSTANT, BORDER_REFLECT, BORDER_WRAP) CV_ENUM(TemplateMethod, TM_SQDIFF, TM_SQDIFF_NORMED, TM_CCORR, TM_CCORR_NORMED, TM_CCOEFF, TM_CCOEFF_NORMED) -CV_FLAGS(GemmFlags, GEMM_1_T, GEMM_2_T, GEMM_3_T); +CV_FLAGS(GemmFlags, GEMM_1_T, GEMM_2_T, GEMM_3_T) CV_FLAGS(WarpFlags, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, WARP_INVERSE_MAP) CV_FLAGS(DftFlags, DFT_INVERSE, DFT_SCALE, DFT_ROWS, DFT_COMPLEX_OUTPUT, DFT_REAL_OUTPUT) diff --git a/modules/superres/src/btv_l1.cpp b/modules/superres/src/btv_l1.cpp index e0ee7db63..bafce9135 100644 --- a/modules/superres/src/btv_l1.cpp +++ b/modules/superres/src/btv_l1.cpp @@ -487,7 +487,7 @@ namespace obj.info()->addParam(obj, "blurKernelSize", obj.blurKernelSize_, false, 0, 0, "Gaussian blur kernel size."); obj.info()->addParam(obj, "blurSigma", obj.blurSigma_, false, 0, 0, "Gaussian blur sigma."); obj.info()->addParam(obj, "temporalAreaRadius", obj.temporalAreaRadius_, false, 0, 0, "Radius of the temporal search area."); - obj.info()->addParam(obj, "opticalFlow", obj.opticalFlow_, false, 0, 0, "Dense optical flow algorithm.")); + obj.info()->addParam(obj, "opticalFlow", obj.opticalFlow_, false, 0, 0, "Dense optical flow algorithm.")) BTVL1::BTVL1() { diff --git a/modules/superres/src/btv_l1_ocl.cpp b/modules/superres/src/btv_l1_ocl.cpp index 7fd6741e8..cfaf5831d 100644 --- a/modules/superres/src/btv_l1_ocl.cpp +++ b/modules/superres/src/btv_l1_ocl.cpp @@ -582,7 +582,7 @@ namespace obj.info()->addParam(obj, "blurKernelSize", obj.blurKernelSize_, false, 0, 0, "Gaussian blur kernel size."); obj.info()->addParam(obj, "blurSigma", obj.blurSigma_, false, 0, 0, "Gaussian blur sigma."); obj.info()->addParam(obj, "temporalAreaRadius", obj.temporalAreaRadius_, false, 0, 0, "Radius of the temporal search area."); - obj.info()->addParam(obj, "opticalFlow", obj.opticalFlow_, false, 0, 0, "Dense optical flow algorithm.")); + obj.info()->addParam(obj, "opticalFlow", obj.opticalFlow_, false, 0, 0, "Dense optical flow algorithm.")) BTVL1_OCL::BTVL1_OCL() { diff --git a/modules/superres/src/optical_flow.cpp b/modules/superres/src/optical_flow.cpp index 0389a78fd..30c27c228 100644 --- a/modules/superres/src/optical_flow.cpp +++ b/modules/superres/src/optical_flow.cpp @@ -148,7 +148,7 @@ namespace obj.info()->addParam(obj, "numIters", obj.numIters_); obj.info()->addParam(obj, "polyN", obj.polyN_); obj.info()->addParam(obj, "polySigma", obj.polySigma_); - obj.info()->addParam(obj, "flags", obj.flags_)); + obj.info()->addParam(obj, "flags", obj.flags_)) Farneback::Farneback() : CpuOpticalFlow(CV_8UC1) { @@ -218,7 +218,7 @@ namespace obj.info()->addParam(obj, "upscaleAveragingRadius", obj.upscaleAveragingRadius_); obj.info()->addParam(obj, "upscaleSigmaDist", obj.upscaleSigmaDist_); obj.info()->addParam(obj, "upscaleSigmaColor", obj.upscaleSigmaColor_); - obj.info()->addParam(obj, "speedUpThr", obj.speedUpThr_)); + obj.info()->addParam(obj, "speedUpThr", obj.speedUpThr_)) Simple::Simple() : CpuOpticalFlow(CV_8UC3) { @@ -301,7 +301,7 @@ namespace obj.info()->addParam(obj, "warps", obj.warps_); obj.info()->addParam(obj, "epsilon", obj.epsilon_); obj.info()->addParam(obj, "iterations", obj.iterations_); - obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow_)); + obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow_)) DualTVL1::DualTVL1() : CpuOpticalFlow(CV_8UC1) { @@ -472,7 +472,7 @@ namespace obj.info()->addParam(obj, "scaleFactor", obj.scaleFactor_, false, 0, 0, "Pyramid scale factor"); obj.info()->addParam(obj, "innerIterations", obj.innerIterations_, false, 0, 0, "Number of lagged non-linearity iterations (inner loop)"); obj.info()->addParam(obj, "outerIterations", obj.outerIterations_, false, 0, 0, "Number of warping iterations (number of pyramid levels)"); - obj.info()->addParam(obj, "solverIterations", obj.solverIterations_, false, 0, 0, "Number of linear system solver iterations")); + obj.info()->addParam(obj, "solverIterations", obj.solverIterations_, false, 0, 0, "Number of linear system solver iterations")) Brox_CUDA::Brox_CUDA() : GpuOpticalFlow(CV_32FC1), alg_(0.197f, 50.0f, 0.8f, 10, 77, 10) { @@ -536,7 +536,7 @@ namespace CV_INIT_ALGORITHM(PyrLK_CUDA, "DenseOpticalFlowExt.PyrLK_CUDA", obj.info()->addParam(obj, "winSize", obj.winSize_); obj.info()->addParam(obj, "maxLevel", obj.maxLevel_); - obj.info()->addParam(obj, "iterations", obj.iterations_)); + obj.info()->addParam(obj, "iterations", obj.iterations_)) PyrLK_CUDA::PyrLK_CUDA() : GpuOpticalFlow(CV_8UC1) { @@ -603,7 +603,7 @@ namespace obj.info()->addParam(obj, "numIters", obj.numIters_); obj.info()->addParam(obj, "polyN", obj.polyN_); obj.info()->addParam(obj, "polySigma", obj.polySigma_); - obj.info()->addParam(obj, "flags", obj.flags_)); + obj.info()->addParam(obj, "flags", obj.flags_)) Farneback_CUDA::Farneback_CUDA() : GpuOpticalFlow(CV_8UC1) { @@ -679,7 +679,7 @@ namespace obj.info()->addParam(obj, "warps", obj.warps_); obj.info()->addParam(obj, "epsilon", obj.epsilon_); obj.info()->addParam(obj, "iterations", obj.iterations_); - obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow_)); + obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow_)) DualTVL1_CUDA::DualTVL1_CUDA() : GpuOpticalFlow(CV_8UC1) { @@ -801,7 +801,7 @@ namespace CV_INIT_ALGORITHM(PyrLK_OCL, "DenseOpticalFlowExt.PyrLK_OCL", obj.info()->addParam(obj, "winSize", obj.winSize_); obj.info()->addParam(obj, "maxLevel", obj.maxLevel_); - obj.info()->addParam(obj, "iterations", obj.iterations_)); + obj.info()->addParam(obj, "iterations", obj.iterations_)) PyrLK_OCL::PyrLK_OCL() : oclOpticalFlow(CV_8UC1) { @@ -870,7 +870,7 @@ namespace obj.info()->addParam(obj, "warps", obj.warps_); obj.info()->addParam(obj, "epsilon", obj.epsilon_); obj.info()->addParam(obj, "iterations", obj.iterations_); - obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow_)); + obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow_)) DualTVL1_OCL::DualTVL1_OCL() : oclOpticalFlow(CV_8UC1) { @@ -947,7 +947,7 @@ namespace obj.info()->addParam(obj, "numIters", obj.numIters_); obj.info()->addParam(obj, "polyN", obj.polyN_); obj.info()->addParam(obj, "polySigma", obj.polySigma_); - obj.info()->addParam(obj, "flags", obj.flags_)); + obj.info()->addParam(obj, "flags", obj.flags_)) FarneBack_OCL::FarneBack_OCL() : oclOpticalFlow(CV_8UC1) { diff --git a/modules/ts/include/opencv2/ts/ts_perf.hpp b/modules/ts/include/opencv2/ts/ts_perf.hpp index 499b53cad..8023c0f1f 100644 --- a/modules/ts/include/opencv2/ts/ts_perf.hpp +++ b/modules/ts/include/opencv2/ts/ts_perf.hpp @@ -253,7 +253,7 @@ enum PERF_STRATEGY { PERF_STRATEGY_DEFAULT = -1, PERF_STRATEGY_BASE = 0, - PERF_STRATEGY_SIMPLE = 1, + PERF_STRATEGY_SIMPLE = 1 }; diff --git a/modules/video/perf/perf_optflowpyrlk.cpp b/modules/video/perf/perf_optflowpyrlk.cpp index 339cbd035..08ffd04d4 100644 --- a/modules/video/perf/perf_optflowpyrlk.cpp +++ b/modules/video/perf/perf_optflowpyrlk.cpp @@ -178,7 +178,7 @@ PERF_TEST_P(Path_Idx_Cn_NPoints_WSize_Deriv, OpticalFlowPyrLK_self, testing::Com SANITY_CHECK(err, 2); } -CV_ENUM(PyrBorderMode, BORDER_DEFAULT, BORDER_TRANSPARENT); +CV_ENUM(PyrBorderMode, BORDER_DEFAULT, BORDER_TRANSPARENT) typedef tr1::tuple Path_Win_Deriv_Border_Reuse_t; typedef TestBaseWithParam Path_Win_Deriv_Border_Reuse; diff --git a/modules/video/src/kalman.cpp b/modules/video/src/kalman.cpp index 03d88f50d..2c7b9e788 100644 --- a/modules/video/src/kalman.cpp +++ b/modules/video/src/kalman.cpp @@ -127,4 +127,4 @@ const Mat& KalmanFilter::correct(const Mat& measurement) return statePost; } -}; +} diff --git a/modules/video/src/tvl1flow.cpp b/modules/video/src/tvl1flow.cpp index 8d5993275..ddcc32b40 100644 --- a/modules/video/src/tvl1flow.cpp +++ b/modules/video/src/tvl1flow.cpp @@ -947,7 +947,7 @@ CV_INIT_ALGORITHM(OpticalFlowDual_TVL1, "DenseOpticalFlow.DualTVL1", "inner iterations (between outlier filtering) used in the numerical scheme"); obj.info()->addParam(obj, "outerIterations", obj.outerIterations, false, 0, 0, "outer iterations (number of inner loops) used in the numerical scheme"); - obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow)); + obj.info()->addParam(obj, "useInitialFlow", obj.useInitialFlow)) } // namespace diff --git a/samples/c/adaptiveskindetector.cpp b/samples/c/adaptiveskindetector.cpp index 21c9ffe9b..ac9057df2 100644 --- a/samples/c/adaptiveskindetector.cpp +++ b/samples/c/adaptiveskindetector.cpp @@ -126,12 +126,12 @@ ASDFrameHolder::ASDFrameHolder( ) { image = NULL; timeStamp = 0; -}; +} ASDFrameHolder::~ASDFrameHolder( ) { cvReleaseImage(&image); -}; +} void ASDFrameHolder::assignFrame(IplImage *sourceImage, double frameTime) { @@ -143,22 +143,22 @@ void ASDFrameHolder::assignFrame(IplImage *sourceImage, double frameTime) image = cvCloneImage(sourceImage); timeStamp = frameTime; -}; +} IplImage *ASDFrameHolder::getImage() { return image; -}; +} double ASDFrameHolder::getTimeStamp() { return timeStamp; -}; +} void ASDFrameHolder::setImage(IplImage *sourceImage) { image = sourceImage; -}; +} //-------------------- ASDFrameSequencer -----------------------// @@ -166,26 +166,26 @@ void ASDFrameHolder::setImage(IplImage *sourceImage) ASDFrameSequencer::~ASDFrameSequencer() { close(); -}; +} IplImage *ASDFrameSequencer::getNextImage() { return NULL; -}; +} void ASDFrameSequencer::close() { -}; +} bool ASDFrameSequencer::isOpen() { return false; -}; +} void ASDFrameSequencer::getFrameCaption(char* /*caption*/) { return; -}; +} IplImage* ASDCVFrameSequencer::getNextImage() { @@ -201,7 +201,7 @@ IplImage* ASDCVFrameSequencer::getNextImage() { return NULL; } -}; +} void ASDCVFrameSequencer::close() { @@ -209,12 +209,12 @@ void ASDCVFrameSequencer::close() { cvReleaseCapture(&capture); } -}; +} bool ASDCVFrameSequencer::isOpen() { return (capture != NULL); -}; +} //-------------------- ASDFrameSequencerWebCam -----------------------// @@ -233,7 +233,7 @@ bool ASDFrameSequencerWebCam::open(int cameraIndex) { return true; } -}; +} //-------------------- ASDFrameSequencerVideoFile -----------------------// @@ -251,7 +251,7 @@ bool ASDFrameSequencerVideoFile::open(const char *fileName) { return true; } -}; +} //-------------------- ASDFrameSequencerImageFile -----------------------// @@ -263,11 +263,11 @@ void ASDFrameSequencerImageFile::open(const char *fileNameMask, int startIndex, nEndIndex = endIndex; std::sprintf(sFileNameMask, "%s", fileNameMask); -}; +} void ASDFrameSequencerImageFile::getFrameCaption(char *caption) { std::sprintf(caption, sFileNameMask, nCurrentIndex); -}; +} IplImage* ASDFrameSequencerImageFile::getNextImage() { @@ -283,23 +283,23 @@ IplImage* ASDFrameSequencerImageFile::getNextImage() IplImage* img = cvLoadImage(fileName); return img; -}; +} void ASDFrameSequencerImageFile::close() { nCurrentIndex = nEndIndex+1; -}; +} bool ASDFrameSequencerImageFile::isOpen() { return (nCurrentIndex <= nEndIndex); -}; +} static void putTextWithShadow(IplImage *img, const char *str, CvPoint point, CvFont *font, CvScalar color = CV_RGB(255, 255, 128)) { cvPutText(img, str, cvPoint(point.x-1,point.y-1), font, CV_RGB(0, 0, 0)); cvPutText(img, str, point, font, color); -}; +} #define ASD_RGB_SET_PIXEL(pointer, r, g, b) { (*pointer) = (unsigned char)b; (*(pointer+1)) = (unsigned char)g; (*(pointer+2)) = (unsigned char)r; } @@ -336,7 +336,7 @@ static void displayBuffer(IplImage *rgbDestImage, IplImage *buffer, int rValue, destY = 0; destX += dx; } -}; +} int main(int argc, char** argv ) { diff --git a/samples/cpp/calibration_artificial.cpp b/samples/cpp/calibration_artificial.cpp index 3023127b7..478cd05c4 100644 --- a/samples/cpp/calibration_artificial.cpp +++ b/samples/cpp/calibration_artificial.cpp @@ -46,7 +46,7 @@ private: Point3f generateChessBoardCenter(const Mat& camMat, const Size& imgSize) const; Mat rvec, tvec; }; -}; +} diff --git a/samples/cpp/kmeans.cpp b/samples/cpp/kmeans.cpp index 0cc313f75..5a5140280 100644 --- a/samples/cpp/kmeans.cpp +++ b/samples/cpp/kmeans.cpp @@ -33,10 +33,10 @@ int main( int /*argc*/, char** /*argv*/ ) { int k, clusterCount = rng.uniform(2, MAX_CLUSTERS+1); int i, sampleCount = rng.uniform(1, 1001); - Mat points(sampleCount, 1, CV_32FC2), labels; + Mat points(sampleCount, 2, CV_32F), labels; clusterCount = MIN(clusterCount, sampleCount); - Mat centers(clusterCount, 1, points.type()); + Mat centers; /* generate random sample from multigaussian distribution */ for( k = 0; k < clusterCount; k++ ) diff --git a/samples/cpp/tutorial_code/ImgProc/Threshold.cpp b/samples/cpp/tutorial_code/ImgProc/Threshold.cpp index d98cc1182..96d5686a8 100644 --- a/samples/cpp/tutorial_code/ImgProc/Threshold.cpp +++ b/samples/cpp/tutorial_code/ImgProc/Threshold.cpp @@ -14,7 +14,7 @@ using namespace cv; /// Global variables int threshold_value = 0; -int threshold_type = 3;; +int threshold_type = 3; int const max_value = 255; int const max_type = 4; int const max_BINARY_value = 255;