fixed some MSVC2008 compiler errors & warnings

pull/13383/head
Vadim Pisarevsky 15 years ago
parent 576adb434d
commit 9cf319d504
  1. 93
      OpenCVFindOpenEXR.cmake
  2. 2
      modules/core/include/opencv2/core/operations.hpp
  3. 22
      modules/features2d/include/opencv2/features2d/features2d.hpp
  4. 9
      modules/features2d/src/descriptors.cpp

@ -9,69 +9,62 @@
# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
#
INCLUDE(FindZLIB)
SET(LIBRARY_PATHS
/usr/lib
/usr/local/lib
/sw/lib
/opt/local/lib
$ENV{PROGRAM_FILES}/OpenEXR/lib/static)
FIND_PATH(OPENEXR_INCLUDE_PATH ImfRgbaFile.h
PATH_SUFFIXES OpenEXR
/usr/include
/usr/local/include
/sw/include
/opt/local/include)
IF(ZLIB_FOUND)
FIND_LIBRARY(OPENEXR_HALF_LIBRARY
NAMES Half
PATHS ${LIBRARY_PATHS})
SET(LIBRARY_PATHS
/usr/lib
/usr/local/lib
/sw/lib
/opt/local/lib
$ENV{PROGRAM_FILES}/OpenEXR/lib/static)
FIND_LIBRARY(OPENEXR_IEX_LIBRARY
NAMES Iex
PATHS ${LIBRARY_PATHS})
FIND_PATH(OPENEXR_INCLUDE_PATH ImfRgbaFile.h
PATH_SUFFIXES OpenEXR
/usr/include
/usr/local/include
/sw/include
/opt/local/include)
FIND_LIBRARY(OPENEXR_IMATH_LIBRARY
NAMES Imath
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_HALF_LIBRARY
NAMES Half
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_IEX_LIBRARY
NAMES Iex
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_IMATH_LIBRARY
NAMES Imath
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY
NAMES IlmImf
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY
NAMES IlmImf
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_ILMTHREAD_LIBRARY
NAMES IlmThread
PATHS ${LIBRARY_PATHS})
FIND_LIBRARY(OPENEXR_ILMTHREAD_LIBRARY
NAMES IlmThread
PATHS ${LIBRARY_PATHS})
ENDIF(ZLIB_FOUND)
#MESSAGE(STATUS ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY})
#MESSAGE(STATUS ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} zlib)
IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
SET(OPENEXR_FOUND TRUE)
SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
SET(OPENEXR_FOUND TRUE)
SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} zlib CACHE STRING "The libraries needed to use OpenEXR")
ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
IF(OPENEXR_FOUND)
IF(NOT OPENEXR_FIND_QUIETLY)
MESSAGE(STATUS "Found OpenEXR: ${OPENEXR_ILMIMF_LIBRARY}")
ENDIF(NOT OPENEXR_FIND_QUIETLY)
IF(NOT OPENEXR_FIND_QUIETLY)
MESSAGE(STATUS "Found OpenEXR: ${OPENEXR_ILMIMF_LIBRARY}")
ENDIF(NOT OPENEXR_FIND_QUIETLY)
ELSE(OPENEXR_FOUND)
IF(OPENEXR_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find OpenEXR library")
ENDIF(OPENEXR_FIND_REQUIRED)
IF(OPENEXR_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find OpenEXR library")
ENDIF(OPENEXR_FIND_REQUIRED)
ENDIF(OPENEXR_FOUND)
MARK_AS_ADVANCED(
OPENEXR_INCLUDE_PATHS
OPENEXR_LIBRARIES
OPENEXR_ILMIMF_LIBRARY
OPENEXR_IMATH_LIBRARY
OPENEXR_IEX_LIBRARY
OPENEXR_HALF_LIBRARY)
OPENEXR_INCLUDE_PATHS
OPENEXR_LIBRARIES
OPENEXR_ILMIMF_LIBRARY
OPENEXR_IMATH_LIBRARY
OPENEXR_IEX_LIBRARY
OPENEXR_HALF_LIBRARY)

@ -656,7 +656,7 @@ inline Matx<_Tp,m,n>::Matx(const _Tp* vals)
template<typename _Tp, int m, int n>
inline Matx<_Tp,m,n>::Matx(const Matx<_Tp,m,n>::base_type& v)
inline Matx<_Tp,m,n>::Matx(const Vec<_Tp,m*n>& v)
: base_type(v)
{
}

@ -1280,8 +1280,8 @@ public:
detectImpl( image, mask, keypoints );
}
virtual void read(const FileNode& fn) {};
virtual void write(FileStorage& fs) const {};
virtual void read(const FileNode&) {};
virtual void write(FileStorage&) const {};
protected:
/*
@ -1427,8 +1427,8 @@ public:
*/
virtual void compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const = 0;
virtual void read (const FileNode &fn) {};
virtual void write (FileStorage &fs) const {};
virtual void read (const FileNode&) {};
virtual void write (FileStorage&) const {};
protected:
/*
@ -1770,7 +1770,7 @@ protected:
Distance distance;
};
template<class Distance>
template<class Distance> inline
void BruteForceMatcher<Distance>::matchImpl( const Mat& descriptors_1, const Mat& descriptors_2,
const Mat& mask, vector<int>& matches ) const
{
@ -1784,7 +1784,7 @@ void BruteForceMatcher<Distance>::matchImpl( const Mat& descriptors_1, const Mat
}
}
template<class Distance>
template<class Distance> inline
void BruteForceMatcher<Distance>::matchImpl( const Mat& descriptors_1, const Mat& descriptors_2,
const Mat& mask, vector<DMatch>& matches ) const
{
@ -1832,7 +1832,7 @@ void BruteForceMatcher<Distance>::matchImpl( const Mat& descriptors_1, const Mat
}
}
template<class Distance>
template<class Distance> inline
void BruteForceMatcher<Distance>::matchImpl( const Mat& descriptors_1, const Mat& descriptors_2,
const Mat& mask, vector<vector<DMatch> >& matches, float threshold ) const
{
@ -1945,18 +1945,18 @@ public:
// image The source image
// points Test keypoints from the source image
// matches A vector to be filled with keypoint matches
virtual void match( const Mat& image, vector<KeyPoint>& points, vector<DMatch>& matches ) {};
virtual void match( const Mat& image, vector<KeyPoint>& points, vector<DMatch>& matches );
virtual void match( const Mat& image, vector<KeyPoint>& points, vector<vector<DMatch> >& matches, float threshold ) {};
virtual void match( const Mat& image, vector<KeyPoint>& points, vector<vector<DMatch> >& matches, float threshold );
// Clears keypoints storing in collection
virtual void clear();
// Reads match object from a file node
virtual void read( const FileNode& fn ) {};
virtual void read( const FileNode& ) {};
// Writes match object to a file storage
virtual void write( FileStorage& fs ) const {};
virtual void write( FileStorage& ) const {};
protected:
KeyPointCollection collection;

@ -364,6 +364,15 @@ void KeyPointCollection::clear()
/*
* GenericDescriptorMatch
*/
void GenericDescriptorMatch::match( const Mat&, vector<KeyPoint>&, vector<DMatch>& )
{
}
void GenericDescriptorMatch::match( const Mat&, vector<KeyPoint>&, vector<vector<DMatch> >&, float )
{
}
void GenericDescriptorMatch::add( KeyPointCollection& collection )
{
for( size_t i = 0; i < collection.images.size(); i++ )

Loading…
Cancel
Save