fixed ~200 warnings for windows
authorAnatoly Baksheev <no@email>
Tue, 14 Feb 2012 10:22:34 +0000 (10:22 +0000)
committerAnatoly Baksheev <no@email>
Tue, 14 Feb 2012 10:22:34 +0000 (10:22 +0000)
minor build system changes (now cuda code in opencv_core is compiled using CUDA_ARCH* cmake variables)

29 files changed:
cmake/OpenCVFindOpenNI.cmake
modules/calib3d/test/test_homography.cpp
modules/contrib/src/gencolors.cpp
modules/contrib/src/imagelogpolprojection.hpp
modules/contrib/src/templatebuffer.hpp
modules/core/CMakeLists.txt
modules/core/src/cmdparser.cpp
modules/core/src/opengl_interop.cpp
modules/core/test/test_countnonzero.cpp
modules/core/test/test_eigen.cpp
modules/features2d/src/fast.cpp
modules/features2d/src/orb.cpp
modules/flann/include/opencv2/flann/nn_index.h
modules/gpu/include/opencv2/gpu/gpu.hpp
modules/gpu/src/gftt.cpp
modules/gpu/src/orb.cpp
modules/gpu/test/test_features2d.cpp
modules/highgui/src/cap_openni.cpp
modules/highgui/src/window.cpp
modules/highgui/src/window_w32.cpp
modules/imgproc/perf/perf_filter2d.cpp
modules/imgproc/src/gabor.cpp
modules/imgproc/src/geometry.cpp
modules/imgproc/src/morph.cpp
modules/imgproc/src/thresh.cpp
modules/stitching/include/opencv2/stitching/detail/util.hpp
modules/stitching/perf/perf_stich.cpp
modules/stitching/src/seam_finders.cpp
modules/ts/src/ts_perf.cpp

index 2fbd698..1e892cf 100644 (file)
@@ -24,7 +24,13 @@ if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
     set(HAVE_OPENNI TRUE)
     # the check: are PrimeSensor Modules for OpenNI installed
     if(WIN32)
-        find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore.dll" PATHS "c:/Program Files/Prime Sense/Sensor/Bin" DOC "Core library of PrimeSensor Modules for OpenNI")
+        find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore.dll" 
+                               PATHS 
+                                       "c:/Program Files/Prime Sense/Sensor/Bin" 
+                                       "c:/Program Files (x86)/Prime Sense/Sensor/Bin"
+                                       "c:/Program Files/PrimeSense/SensorKinect/Bin" 
+                                       "c:/Program Files (x86)/PrimeSense/SensorKinect/Bin"
+                               DOC "Core library of PrimeSensor Modules for OpenNI")           
     elseif(UNIX OR APPLE)
         find_library(OPENNI_PRIME_SENSOR_MODULE "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
     endif()
index 428dc0c..0c4a4e1 100644 (file)
@@ -102,10 +102,10 @@ private:
        void print_information_8(int j, int N, int k, int l, double diff);\r
 };\r
 \r
-CV_HomographyTest::CV_HomographyTest() : max_diff(1e-2), max_2diff(2e-2)\r
+CV_HomographyTest::CV_HomographyTest() : max_diff(1e-2f), max_2diff(2e-2f)\r
 {\r
     method = 0;\r
-    image_size = 1e+2;\r
+    image_size = 100;\r
     reproj_threshold = 3.0;\r
     sigma = 0.01;\r
 }\r
index 0ecbdb2..1774631 100644 (file)
@@ -63,7 +63,7 @@ void downsamplePoints( const Mat& src, Mat& dst, size_t count )
     {
         for( int j = i; j < dists.cols; j++ )
         {
-            float dist = norm(src.at<Point3_<uchar> >(i) - src.at<Point3_<uchar> >(j));
+            float dist = (float)norm(src.at<Point3_<uchar> >(i) - src.at<Point3_<uchar> >(j));
             dists.at<float>(j, i) = dists.at<float>(i, j) = dist;
         }
     }
index cde6a3a..e7350e0 100644 (file)
@@ -231,6 +231,9 @@ private:
        bool _initLogRetinaSampling(const double reductionFactor, const double samplingStrenght);
        bool _initLogPolarCortexSampling(const double reductionFactor, const double samplingStrenght);
 
+       ImageLogPolProjection(const ImageLogPolProjection&);
+       ImageLogPolProjection& operator=(const ImageLogPolProjection&);
+
 };
 
 }
index 37e18bf..69d2699 100644 (file)
@@ -260,7 +260,7 @@ public:
        * @param sensitivity: strenght of the sigmoide
        * @param maxOutputValue: the maximum output value
        */
-       inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0){normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels());};
+       inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0){ (void)maxOutputValue; normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels());};
 
        /**
        * sigmoide image normalization function (saturates min and max values), in this function, the sigmoide is centered on low values (high saturation of the medium and high values
index 4f831f7..baf0fa1 100644 (file)
@@ -10,19 +10,9 @@ if(HAVE_CUDA)
   file(GLOB lib_cuda "src/cuda/*.cu")
   source_group("Cuda" FILES "${lib_cuda}")
   
-  include_directories(${CUDA_INCLUDE_DIRS} "${OpenCV_SOURCE_DIR}/modules/gpu/src" "${OpenCV_SOURCE_DIR}/modules/gpu/src/cuda")
-
-  set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10
-                                         -gencode arch=compute_11,code=sm_11
-                                         -gencode arch=compute_12,code=sm_12
-                                         -gencode arch=compute_13,code=sm_13
-                                         -gencode arch=compute_20,code=sm_20
-                                         -gencode arch=compute_20,code=sm_21)
-
+  include_directories(${CUDA_INCLUDE_DIRS} "${OpenCV_SOURCE_DIR}/modules/gpu/src" "${OpenCV_SOURCE_DIR}/modules/gpu/src/cuda")  
   OCV_CUDA_COMPILE(cuda_objs ${lib_cuda})
-
-  unset(CUDA_npp_LIBRARY CACHE)
-  find_cuda_helper_libs(npp)
+  
   set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
 else()
   set(lib_cuda "")
index 1d29b39..c76cf4e 100644 (file)
@@ -291,7 +291,7 @@ template<typename _Tp>
                buf = "";
                if (del_space(it->second[1]) != "") buf += del_space(it->second[1]);
 
-               while (true)
+               for(;;)
                {
                        bool tr = ((int)buf.length() > col_d-2) ? true: false;
                        int pos;
@@ -299,7 +299,7 @@ template<typename _Tp>
                        if (tr)
                        {
                                pos = buf.find_first_of(' ');
-                               while (true)
+                               for(;;)
                                {
                                        if ((int)buf.find_first_of(' ', pos + 1 ) < col_d-2 &&
                         (int)buf.find_first_of(' ', pos + 1 ) != (int)std::string::npos)
index d0b2385..e478c69 100644 (file)
@@ -161,9 +161,11 @@ void icvSetOpenGlFuncTab(const CvOpenGlFuncTab* tab)
 void cv::gpu::setGlDevice(int device)\r
 {\r
 #ifndef HAVE_CUDA\r
+       (void)device;\r
     throw_nocuda;\r
 #else\r
     #ifndef HAVE_OPENGL\r
+           (void)device;\r
         throw_nogl;\r
     #else\r
         if (!glFuncTab()->isGlContextInitialized())\r
@@ -483,6 +485,7 @@ inline void cv::GlBuffer::Impl::unmapDevice(cudaStream_t stream)
 cv::GlBuffer::GlBuffer(Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)usage;\r
     throw_nogl;\r
 #else\r
     impl_ = Impl::empty();\r
@@ -492,6 +495,10 @@ cv::GlBuffer::GlBuffer(Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage
 cv::GlBuffer::GlBuffer(int rows, int cols, int type, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)rows;\r
+       (void)cols;\r
+       (void)type;\r
+       (void)usage;\r
     throw_nogl;\r
 #else\r
     impl_ = new Impl(rows, cols, type, usage);\r
@@ -504,6 +511,9 @@ cv::GlBuffer::GlBuffer(int rows, int cols, int type, Usage usage) : rows_(0), co
 cv::GlBuffer::GlBuffer(Size size, int type, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)size;\r
+       (void)type;\r
+       (void)usage;\r
     throw_nogl;\r
 #else\r
     impl_ = new Impl(size.height, size.width, type, usage);\r
@@ -516,6 +526,8 @@ cv::GlBuffer::GlBuffer(Size size, int type, Usage usage) : rows_(0), cols_(0), t
 cv::GlBuffer::GlBuffer(InputArray mat_, Usage usage) : rows_(0), cols_(0), type_(0), usage_(usage)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)mat_;\r
+       (void)usage;\r
     throw_nogl;\r
 #else\r
     int kind = mat_.kind();\r
@@ -547,6 +559,10 @@ cv::GlBuffer::GlBuffer(InputArray mat_, Usage usage) : rows_(0), cols_(0), type_
 void cv::GlBuffer::create(int rows, int cols, int type, Usage usage)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)rows;\r
+       (void)cols;\r
+       (void)type;\r
+       (void)usage;\r
     throw_nogl;\r
 #else\r
     if (rows_ != rows || cols_ != cols || type_ != type || usage_ != usage)\r
@@ -572,6 +588,7 @@ void cv::GlBuffer::release()
 void cv::GlBuffer::copyFrom(InputArray mat_)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)mat_;\r
     throw_nogl;\r
 #else\r
     int kind = mat_.kind();\r
@@ -910,6 +927,9 @@ cv::GlTexture::GlTexture() : rows_(0), cols_(0), type_(0)
 cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), type_(0)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)rows;\r
+       (void)cols;\r
+       (void)type;\r
     throw_nogl;\r
 #else\r
     impl_ = new Impl(rows, cols, type);\r
@@ -922,6 +942,8 @@ cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), typ
 cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)size;\r
+       (void)type;\r
     throw_nogl;\r
 #else\r
     impl_ = new Impl(size.height, size.width, type);\r
@@ -934,6 +956,8 @@ cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)
 cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_(0)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)mat_;\r
+       (void)bgra;\r
     throw_nogl;\r
 #else    \r
     int kind = mat_.kind();\r
@@ -977,6 +1001,9 @@ cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_
 void cv::GlTexture::create(int rows, int cols, int type)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)rows;\r
+       (void)cols;\r
+       (void)type;\r
     throw_nogl;\r
 #else\r
     if (rows_ != rows || cols_ != cols || type_ != type)\r
@@ -1001,6 +1028,8 @@ void cv::GlTexture::release()
 void cv::GlTexture::copyFrom(InputArray mat_, bool bgra)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)mat_;\r
+       (void)bgra;\r
     throw_nogl;\r
 #else\r
     int kind = mat_.kind();\r
@@ -1229,6 +1258,8 @@ cv::GlFont::GlFont(const string& family, int height, Weight weight, Style style)
 void cv::GlFont::draw(const char* str, int len) const\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)str;\r
+       (void)len;\r
     throw_nogl;\r
 #else\r
     if (base_ && len > 0)\r
@@ -1271,6 +1302,10 @@ namespace
 Ptr<GlFont> cv::GlFont::get(const std::string& family, int height, Weight weight, Style style)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)family;\r
+       (void)height;\r
+       (void)weight;\r
+       (void)style;\r
     throw_nogl;\r
     return Ptr<GlFont>();\r
 #else\r
@@ -1296,6 +1331,9 @@ Ptr<GlFont> cv::GlFont::get(const std::string& family, int height, Weight weight
 void cv::render(const GlTexture& tex, Rect_<double> wndRect, Rect_<double> texRect)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)tex;\r
+       (void)wndRect;\r
+       (void)texRect;\r
     throw_nogl;\r
 #else\r
     if (!tex.empty())\r
@@ -1328,6 +1366,9 @@ void cv::render(const GlTexture& tex, Rect_<double> wndRect, Rect_<double> texRe
 void cv::render(const GlArrays& arr, int mode, Scalar color)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)arr;\r
+       (void)mode;\r
+       (void)color;\r
     throw_nogl;\r
 #else\r
     glColor3d(color[0] / 255.0, color[1] / 255.0, color[2] / 255.0);\r
@@ -1343,6 +1384,10 @@ void cv::render(const GlArrays& arr, int mode, Scalar color)
 void cv::render(const string& str, const Ptr<GlFont>& font, Scalar color, Point2d pos)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)str;\r
+       (void)font;\r
+       (void)color;\r
+       (void)pos;\r
     throw_nogl;\r
 #else\r
     glPushAttrib(GL_DEPTH_BUFFER_BIT);\r
@@ -1497,6 +1542,9 @@ void cv::GlCamera::setupModelViewMatrix() const
 bool icvCheckGlError(const char* file, const int line, const char* func)\r
 {\r
 #ifndef HAVE_OPENGL\r
+       (void)file;\r
+       (void)line;\r
+       (void)func;\r
     return true;\r
 #else\r
     GLenum err = glGetError();\r
index 456f97a..7d0f2bb 100644 (file)
@@ -82,7 +82,7 @@ private:
     void print_information(int right, int result);\r
 };\r
 \r
-CV_CountNonZeroTest::CV_CountNonZeroTest(): eps_32(1e-8), eps_64(1e-16), src(Mat()), current_type(-1) {}\r
+CV_CountNonZeroTest::CV_CountNonZeroTest(): eps_32(1e-8f), eps_64(1e-16f), src(Mat()), current_type(-1) {}\r
 CV_CountNonZeroTest::~CV_CountNonZeroTest() {}\r
 \r
 void CV_CountNonZeroTest::generate_src_data(cv::Size size, int type)\r
index 6b396df..200a727 100644 (file)
@@ -165,7 +165,7 @@ void Core_EigenTest_Scalar_64::run(int)
 void Core_EigenTest_32::run(int) { check_full(CV_32FC1); }\r
 void Core_EigenTest_64::run(int) { check_full(CV_64FC1); }\r
 \r
-Core_EigenTest::Core_EigenTest() : eps_val_32(1e-3), eps_vec_32(1e-2), eps_val_64(1e-4), eps_vec_64(1e-3) {}\r
+Core_EigenTest::Core_EigenTest() : eps_val_32(1e-3f), eps_vec_32(1e-2f), eps_val_64(1e-4f), eps_vec_64(1e-3f) {}\r
 Core_EigenTest::~Core_EigenTest() {}\r
 \r
 bool Core_EigenTest::check_pair_count(const cv::Mat& src, const cv::Mat& evalues, int low_index, int high_index)\r
@@ -387,7 +387,7 @@ bool Core_EigenTest::check_full(int type)
     const int MATRIX_COUNT = 500;\r
     const int MAX_DEGREE = 7;\r
 \r
-    srand(time(0));\r
+    srand((unsigned int)time(0));\r
 \r
     for (int i = 1; i <= MATRIX_COUNT; ++i)\r
     {\r
index d709b21..4fe8421 100644 (file)
@@ -280,7 +280,7 @@ void cv::FAST(const Mat& img, std::vector<KeyPoint>& keypoints, int threshold, b
                     {
                         cornerpos[ncorners++] = j+k;
                         if(nonmax_suppression)
-                            curr[j+k] = cornerScore(ptr+k, pixel, threshold);
+                            curr[j+k] = (uchar)cornerScore(ptr+k, pixel, threshold);
                     }
             }
     #endif
@@ -318,7 +318,7 @@ void cv::FAST(const Mat& img, std::vector<KeyPoint>& keypoints, int threshold, b
                             {
                                 cornerpos[ncorners++] = j;
                                 if(nonmax_suppression)
-                                    curr[j] = cornerScore(ptr, pixel, threshold);
+                                    curr[j] = (uchar)cornerScore(ptr, pixel, threshold);
                                 break;
                             }
                         }
@@ -340,7 +340,7 @@ void cv::FAST(const Mat& img, std::vector<KeyPoint>& keypoints, int threshold, b
                             {
                                 cornerpos[ncorners++] = j;
                                 if(nonmax_suppression)
-                                    curr[j] = cornerScore(ptr, pixel, threshold);
+                                    curr[j] = (uchar)cornerScore(ptr, pixel, threshold);
                                 break;
                             }
                         }
index 9bc5580..97f2d7a 100644 (file)
@@ -974,7 +974,7 @@ void ORB::computeKeyPoints(const vector<Mat>& image_pyramid,
  * @param scale the scale at which we compute the orientation
  * @param keypoints the resulting keypoints
  */
-void ORB::computeOrientation(const Mat& image, const Mat&, unsigned int scale,
+void ORB::computeOrientation(const Mat& image, const Mat&, unsigned int /*scale*/,
                              vector<KeyPoint>& keypoints) const
 {
     int half_patch_size = params_.patch_size_/2;
@@ -1003,7 +1003,7 @@ void ORB::computeIntegralImage(const Mat&, unsigned int, Mat&)
  * @param keypoints the keypoints to use
  * @param descriptors the resulting descriptors
  */
-void ORB::computeDescriptors(const Mat& image, const Mat& integral_image, unsigned int,
+void ORB::computeDescriptors(const Mat& image, const Mat& /*integral_image*/, unsigned int,
                              vector<KeyPoint>& keypoints, Mat& descriptors) const
 {
     //convert to grayscale if more than one color
index 518babf..6aed20e 100644 (file)
@@ -119,7 +119,7 @@ public:
             dists_ptr = dists[0];
         }
 
-        RadiusUniqueResultSet<DistanceType> resultSet(radius);
+        RadiusUniqueResultSet<DistanceType> resultSet((DistanceType)radius);
         resultSet.clear();
         findNeighbors(resultSet, query[0], params);
         if (n>0) {
index f4ca508..8440ef2 100644 (file)
@@ -1664,7 +1664,7 @@ private:
     GpuMat pattern_;\r
 \r
     std::vector<GpuMat> imagePyr_;\r
-    std::vector<GpuMat> maskPyr_;\r
+       cv::Ptr<std::vector<GpuMat>> maskPyr_;\r
 \r
     GpuMat buf_;\r
 \r
index 869c155..f386ae9 100644 (file)
@@ -130,7 +130,7 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
 \r
                     if (!m.empty())\r
                     {\r
-                        for(int j = 0; j < m.size(); j++)\r
+                        for(size_t j = 0; j < m.size(); j++)\r
                         {\r
                             float dx = p.x - m[j].x;\r
                             float dy = p.y - m[j].y;\r
index 2854404..f0c1781 100644 (file)
@@ -493,7 +493,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
     CV_Assert(mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size()));\r
 \r
     imagePyr_.resize(params_.n_levels_);\r
-    maskPyr_.resize(params_.n_levels_);\r
+    maskPyr_->resize(params_.n_levels_);\r
 \r
     for (int level = 0; level < static_cast<int>(params_.n_levels_); ++level)\r
     {\r
@@ -502,8 +502,8 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
         Size sz(cvRound(image.cols * scale), cvRound(image.rows * scale));\r
 \r
         ensureSizeIsEnough(sz, image.type(), imagePyr_[level]);\r
-        ensureSizeIsEnough(sz, CV_8UC1, maskPyr_[level]);\r
-        maskPyr_[level].setTo(Scalar::all(255));\r
+        ensureSizeIsEnough(sz, CV_8UC1, (*maskPyr_)[level]);\r
+        (*maskPyr_)[level].setTo(Scalar::all(255));\r
         \r
         // Compute the resized image\r
         if (level != static_cast<int>(params_.first_level_))\r
@@ -528,7 +528,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
             image.copyTo(imagePyr_[level]);\r
 \r
             if (!mask.empty())\r
-                mask.copyTo(maskPyr_[level]);\r
+                mask.copyTo((*maskPyr_)[level]);\r
         }\r
 \r
         // Filter keypoints by image border\r
@@ -537,7 +537,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas
         Rect inner(params_.edge_threshold_, params_.edge_threshold_, sz.width - 2 * params_.edge_threshold_, sz.height - 2 * params_.edge_threshold_);\r
         buf_(inner).setTo(Scalar::all(255));\r
 \r
-        bitwise_and(maskPyr_[level], buf_, maskPyr_[level]);\r
+        bitwise_and((*maskPyr_)[level], buf_, (*maskPyr_)[level]);\r
     }\r
 }\r
 \r
@@ -573,7 +573,7 @@ void cv::gpu::ORB_GPU::computeKeyPointsPyramid()
     \r
     for (int level = 0; level < static_cast<int>(params_.n_levels_); ++level)\r
     {\r
-        keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], maskPyr_[level]);\r
+        keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], (*maskPyr_)[level]);\r
 \r
         ensureSizeIsEnough(3, keyPointsCount_[level], CV_32FC1, keyPointsPyr_[level]);\r
 \r
@@ -752,7 +752,7 @@ void cv::gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, std::
 void cv::gpu::ORB_GPU::release()\r
 {\r
     imagePyr_.clear();\r
-    maskPyr_.clear();\r
+    maskPyr_->clear();\r
 \r
     buf_.release();\r
 \r
index 3fe6a1b..e979090 100644 (file)
@@ -267,7 +267,7 @@ TEST_P(BruteForceMatcher, MatchAdd)
         cv::DMatch match = matches[i];\r
         int shift = isMaskSupported ? 1 : 0;\r
         {\r
-            if (i < queryDescCount / 2)\r
+            if ((int)i < queryDescCount / 2)\r
             {\r
                 if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + shift) || (match.imgIdx != 0))\r
                     badCount++;\r
@@ -390,7 +390,7 @@ TEST_P(BruteForceMatcher, KnnMatchAdd2)
             {\r
                 cv::DMatch match = matches[i][k];\r
                 {\r
-                    if (i < queryDescCount / 2)\r
+                    if ((int)i < queryDescCount / 2)\r
                     {\r
                         if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )\r
                             localBadCount++;\r
@@ -452,7 +452,7 @@ TEST_P(BruteForceMatcher, KnnMatchAdd3)
             {\r
                 cv::DMatch match = matches[i][k];\r
                 {\r
-                    if (i < queryDescCount / 2)\r
+                    if ((int)i < queryDescCount / 2)\r
                     {\r
                         if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )\r
                             localBadCount++;\r
@@ -552,7 +552,7 @@ TEST_P(BruteForceMatcher, RadiusMatchAdd)
             {\r
                 cv::DMatch match = matches[i][k];\r
                 {\r
-                    if (i < queryDescCount / 2)\r
+                    if ((int)i < queryDescCount / 2)\r
                     {\r
                         if ((match.queryIdx != (int)i) || (match.trainIdx != (int)i * countFactor + k + shift) || (match.imgIdx != 0) )\r
                             localBadCount++;\r
index 74bc74a..c470be7 100644 (file)
@@ -401,7 +401,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
         res = baseline;
         break;
     case CV_CAP_PROP_OPENNI_FOCAL_LENGTH :
-        res = depthFocalLength_VGA;
+        res = (double)depthFocalLength_VGA;
         break;
     case CV_CAP_PROP_OPENNI_REGISTRATION :
         res = depthGenerator.GetAlternativeViewPointCap().IsViewPointAs(imageGenerator) ? 1.0 : 0.0;
@@ -552,7 +552,7 @@ inline void getDepthMapFromMetaData( const xn::DepthMetaData& depthMetaData, cv:
     // CV_Assert( sizeof(unsigned short) == sizeof(XnDepthPixel) );
     memcpy( depthMap.data, pDepthMap, cols*rows*sizeof(XnDepthPixel) );
 
-    cv::Mat badMask = (depthMap == noSampleValue) | (depthMap == shadowValue) | (depthMap == 0);
+    cv::Mat badMask = (depthMap == (double)noSampleValue) | (depthMap == (double)shadowValue) | (depthMap == 0);
 
     // mask the pixels with invalid depth
     depthMap.setTo( cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL ), badMask );
@@ -588,8 +588,8 @@ IplImage* CvCapture_OpenNI::retrievePointCloudMap()
         for( int x = 0; x < cols; x++ )
         {
             int ind = y*cols+x;
-            proj[ind].X = x;
-            proj[ind].Y = y;
+            proj[ind].X = (float)x;
+            proj[ind].Y = (float)y;
             proj[ind].Z = depth.at<unsigned short>(y, x);
         }
     }
@@ -625,7 +625,7 @@ void computeDisparity_32F( const xn::DepthMetaData& depthMetaData, cv::Mat& disp
 
     // disparity = baseline * F / z;
 
-    float mult = baseline /*mm*/ * F /*pixels*/;
+    float mult = (float)(baseline /*mm*/ * F /*pixels*/);
 
     disp.create( depth.size(), CV_32FC1);
     disp = cv::Scalar::all( CvCapture_OpenNI::INVALID_PIXEL_VAL );
index 70235f0..5601134 100644 (file)
@@ -393,6 +393,9 @@ void cv::pointCloudShow(const string& winname, const GlCamera& camera, const GlA
 {
 #ifndef HAVE_OPENGL
     CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
+       (void)winname;
+       (void)camera;
+       (void)arr;
 #else
     namedWindow(winname, WINDOW_OPENGL);
 
@@ -436,6 +439,10 @@ void cv::pointCloudShow(const string& winname, const GlCamera& camera, const GlA
 void cv::pointCloudShow(const std::string& winname, const cv::GlCamera& camera, InputArray points, InputArray colors)
 {
 #ifndef HAVE_OPENGL
+       (void)winname;
+       (void)camera;
+       (void)points;
+       (void)colors;
     CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
 #else
     namedWindow(winname, WINDOW_OPENGL);
index 37a0177..c52ab81 100644 (file)
@@ -560,6 +560,7 @@ double cvGetOpenGlProp_W32(const char* name)
         
     __END__;
 #endif
+       (void)name;
 
     return result;   
 }
index c87f31c..5aa000c 100644 (file)
@@ -32,7 +32,7 @@ PERF_TEST_P( TestFilter2d, Filter2d,
 \r
     Mat kernel(kSize, kSize, CV_32FC1);\r
     randu(kernel, -3, 10);\r
-    float s = fabs( sum(kernel)[0] );\r
+    float s = (float)fabs( sum(kernel)[0] );\r
     if(s > 1e-3) kernel /= s;\r
 \r
     declare.in(src, WARMUP_RNG).out(dst).time(20);\r
index 5a81312..867fa1a 100644 (file)
@@ -60,12 +60,12 @@ cv::Mat cv::getGaborKernel( Size ksize, double sigma, double theta,
     if( ksize.width > 0 )
         xmax = ksize.width/2;
     else
-        xmax = std::max(fabs(nstds*sigma_x*c), fabs(nstds*sigma_y*s));
+        xmax = (int)std::max(fabs(nstds*sigma_x*c), fabs(nstds*sigma_y*s));
     
     if( ksize.height > 0 )
         ymax = ksize.height/2;
     else
-        ymax = std::max(fabs(nstds*sigma_x*s), fabs(nstds*sigma_y*c));
+        ymax = (int)std::max(fabs(nstds*sigma_x*s), fabs(nstds*sigma_y*c));
         
     xmin = -xmax;
     ymin = -ymax;
index 66d0291..63bab60 100644 (file)
@@ -439,8 +439,8 @@ static char segSegInt( Point2f a, Point2f b, Point2f c, Point2f d, Point2f& p, P
              (0.0 > t) || (t > 1.0) )
         code = '0';
     
-    p.x = a.x + s * ( b.x - a.x );
-    p.y = a.y + s * ( b.y - a.y );
+    p.x = (float)(a.x + s * ( b.x - a.x ));
+    p.y = (float)(a.y + s * ( b.y - a.y ));
     
     return code;
 }
@@ -652,7 +652,7 @@ float cv::intersectConvexConvex( InputArray _p1, InputArray _p2, OutputArray _p1
             _p12.release();
             return 0.f;
         }
-        area = contourArea(_InputArray(result, nr), false);
+        area = (float)contourArea(_InputArray(result, nr), false);
     }
     
     if( _p12.needed() )
index 9fa1d59..d8921b5 100644 (file)
@@ -1074,10 +1074,8 @@ public:
     {
         int row0 = min(cvRound(range.begin() * src.rows / nStripes), src.rows);
         int row1 = min(cvRound(range.end() * src.rows / nStripes), src.rows);
-
-        if(0)
-            printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n",
-                   src.rows, src.cols, range.begin(), range.end(), row0, row1);
+        
+        //printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n", src.rows, src.cols, range.begin(), range.end(), row0, row1);
 
         Mat srcStripe = src.rowRange(row0, row1);
         Mat dstStripe = dst.rowRange(row0, row1);
@@ -1102,6 +1100,9 @@ private:
     int rowBorderType;
     int columnBorderType;
     const Scalar& borderValue;
+
+       MorphologyRunner(const MorphologyRunner&);
+       MorphologyRunner& operator=(const MorphologyRunner&);
 };
 
 static void morphOp( int op, InputArray _src, OutputArray _dst,
index 14c5b16..f200890 100644 (file)
@@ -682,10 +682,8 @@ public:
     {
         int row0 = std::min(cvRound(range.begin() * src.rows / nStripes), src.rows);
         int row1 = std::min(cvRound(range.end() * src.rows / nStripes), src.rows);
-
-        if(0)
-            printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n",
-                   src.rows, src.cols, range.begin(), range.end(), row0, row1);
+        
+        //printf("Size = (%d, %d), range[%d,%d), row0 = %d, row1 = %d\n", src.rows, src.cols, range.begin(), range.end(), row0, row1);
 
         Mat srcStripe = src.rowRange(row0, row1);
         Mat dstStripe = dst.rowRange(row0, row1);
index 1887f6b..ddbe932 100644 (file)
     } while(0);\r
 #else\r
   #include <iostream>\r
-  #define LOG_STITCHING_MSG(msg) do { std::cout << msg; std::cout.flush(); } while(0);\r
+  #define LOG_STITCHING_MSG(msg) for(;;) { std::cout << msg; std::cout.flush(); break; }\r
 #endif\r
 #else\r
   #define LOG_STITCHING_MSG(msg)\r
 #endif\r
 \r
 #define LOG_(_level, _msg)                     \\r
-    do {                                       \\r
-        if ((_level) >= ::cv::detail::stitchingLogLevel()) { \\r
+    for(;;)                                    \\r
+    {                                          \\r
+        if ((_level) >= ::cv::detail::stitchingLogLevel()) \\r
+        {                                      \\r
             LOG_STITCHING_MSG(_msg);           \\r
         }                                      \\r
-    } while(0)\r
+               break;                                 \\r
+    } \r
 \r
 \r
 #define LOG(msg) LOG_(1, msg)\r
index 0898aa5..81d8bc0 100644 (file)
@@ -87,8 +87,8 @@ PERF_TEST_P( match, bestOf2Nearest, testing::Values("surf", "orb"))
 {\r
     Mat img1, img1_full = imread( getDataPath("stitching/b1.jpg") );\r
     Mat img2, img2_full = imread( getDataPath("stitching/b2.jpg") );\r
-    float scale1 = std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));\r
-    float scale2 = std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));\r
+    float scale1 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));\r
+    float scale2 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));\r
     resize(img1_full, img1, Size(), scale1, scale1);\r
     resize(img2_full, img2, Size(), scale2, scale2);\r
 \r
index 9350307..13a670e 100644 (file)
@@ -158,6 +158,8 @@ public:
     Impl(int cost_type, float terminal_cost, float bad_region_penalty)\r
         : cost_type_(cost_type), terminal_cost_(terminal_cost), bad_region_penalty_(bad_region_penalty) {}\r
 \r
+       ~Impl() {}\r
+\r
     void find(const vector<Mat> &src, const vector<Point> &corners, vector<Mat> &masks);\r
     void findInPair(size_t first, size_t second, Rect roi);\r
 \r
index a29ff46..302e32d 100644 (file)
@@ -985,6 +985,7 @@ TestBase::_declareHelper& TestBase::_declareHelper::tbb_threads(int n)
     if (n > 0)\r
         test->p_tbb_initializer=new tbb::task_scheduler_init(n);\r
 #endif\r
+       (void)n;\r
     return *this;\r
 }\r
 \r