Przeglądaj źródła

added CMakeList for core/image/

Johannes Ruehle 12 lat temu
rodzic
commit
da56ccdbb7

+ 11 - 0
CMakeLists.txt

@@ -31,6 +31,17 @@ if (OPENMP_FOUND)
     ADD_DEFINITIONS( "-DNICE_USELIB_OPENMP")
 endif()
 
+find_package(PNG)
+if (PNG_FOUND)
+  INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIRS})
+  ADD_DEFINITIONS( "-DNICE_USELIB_PNG")
+endif()
+
+#find_package(ImageMagick COMPONENTS Magick++)
+#if(ImageMagick_FOUND)
+#  INCLUDE_DIRECTORIES(${ImageMagick_INCLUDE_DIRS})
+#  ADD_DEFINITIONS( "-DNICE_USELIB_LIBMAGICK")
+#endif()
 
 #IF(WIN32)
  # MESSAGE(FATAL_ERROR "not yet ready")

+ 2 - 2
core/image/BlockImageAccessT.h

@@ -67,8 +67,8 @@ public:
 
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/BlockImageAccessT.tcc"
-#endif
+//#endif
 
 #endif

+ 12 - 0
core/image/CMakeLists.txt

@@ -0,0 +1,12 @@
+#message(STATUS "vector_location: ${OPENCV_MODULE_opencv_vector_LOCATION}")
+
+ocv_add_module(image)# ${Boost_LIBRARIES})# INTERNAL libnice_core_vector)
+
+#message(STATUS "vector_location: ${OPENCV_MODULE_vector_LOCATION}")
+
+ocv_module_include_directories()#${Boost_INCLUDE_DIR})
+#message(STATUS "vec-sources: ${OPENCV_MODULE_libnice_core_vector_SOURCES}")
+ocv_glob_module_sources()#(SOURCES ${OPENCV_MODULE_libnice_core_vector_SOURCES})
+ocv_create_module()
+
+#add_subdirectory(progs bin)

+ 2 - 2
core/image/ColorImageT.h

@@ -885,8 +885,8 @@ typedef ColorImageT<Ipp8u> YUVColorImage;
 
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/ColorImageT.tcc"
-#endif
+//#endif
 
 #endif

+ 2 - 2
core/image/ColorT.h

@@ -125,8 +125,8 @@ typedef ColorT<Ipp8u> Color;
 
 }; // namespace NICE
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/ColorT.tcc"
-#endif
+//#endif
 
 #endif // COLOR_H

+ 2 - 2
core/image/Convert.h

@@ -379,8 +379,8 @@ template<class P> class ImageT;
     void preventIppBug(IppiSize& ippiSize, Rect& clippedROI);
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include <core/image/Convert.tcc>
-#endif
+//#endif
 
 #endif // LIMUN_CONVERT_H

+ 2 - 2
core/image/CrossT.h

@@ -69,8 +69,8 @@ typedef CrossT<Ipp8u> Cross;
 
 } // namespace NICE
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/CrossT.tcc"
-#endif
+//#endif
 
 #endif /* _CROSS_IMAGE_H */

+ 2 - 2
core/image/DeprecatedConverter.h

@@ -881,8 +881,8 @@ private:
 #include "core/image/ImageT.h"
 #include "core/image/ColorImageT.h"
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include <core/image/DeprecatedConverter.tcc>
-#endif
+//#endif
 
 #endif

+ 2 - 2
core/image/EllipseT.h

@@ -79,8 +79,8 @@ typedef EllipseT<Ipp8u> Ellipse;
 
 } // namespace NICE
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/EllipseT.tcc"
-#endif
+//#endif
 
 #endif /* _ELLIPSE_IMAGE_H */

+ 2 - 2
core/image/Filter.h

@@ -470,9 +470,9 @@ ColorImageT<P>* wiener ( const ColorImageT<P>& src, int anchorx = -1, int anchor
                          float noiserateB = 0.5, ColorImageT<P>* dst = NULL );
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include <core/image/Filter.tcc>
-#endif
+//#endif
 
 #endif //LIMUN_FILTER_H
 

+ 2 - 2
core/image/GrayColorImageCommonImplementationT.h

@@ -329,8 +329,8 @@ protected:
 
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/GrayColorImageCommonImplementationT.tcc"
-#endif
+//#endif
 
 #endif

+ 2 - 2
core/image/ImageAccessT.h

@@ -34,8 +34,8 @@ public:
 
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/ImageAccessT.tcc"
-#endif
+//#endif
 
 #endif

+ 2 - 2
core/image/ImageFile.h

@@ -220,9 +220,9 @@ class ImageFile
 
 #include <core/image/GrayColorImageCommonImplementationT.h>
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
   #include "core/image/ImageFile.tcc"
-#endif
+//#endif
 
 #endif /* _IMAGEFILE_IMAGE_H */
 

+ 2 - 2
core/image/ImageT.h

@@ -811,8 +811,8 @@ typedef ImageT<Ipp32f> FloatImage;
 
 #include "core/image/GrayColorImageCommonImplementationT.h"
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/ImageT.tcc"
-#endif
+//#endif
 
 #endif

+ 2 - 2
core/image/ImageTools.h

@@ -418,8 +418,8 @@ namespace NICE {
 #include "core/image/ColorImageT.h"
 #include "core/image/Buffer.h"
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 	#include <core/image/ImageTools.tcc>
-#endif
+//#endif
 
 #endif //LIMUN_IMAGETOOLS_H

+ 2 - 2
core/image/LineT.h

@@ -76,8 +76,8 @@ typedef LineT<Ipp8u> Line;
 
 } // namespace NICE
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/LineT.tcc"
-#endif
+//#endif
 
 #endif /* _LINE_IMAGE_H */

+ 2 - 2
core/image/Morph.h

@@ -306,8 +306,8 @@ namespace NICE {
     */
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 	#include <core/image/Morph.tcc>
-#endif
+//#endif
 
 #endif //LIMUN_RANKING_H

+ 2 - 2
core/image/Pixel.h

@@ -96,8 +96,8 @@ public:
 
 }; // namespace NICE 
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/Pixel.tcc"
-#endif
+//#endif
 
 #endif // PIXEL_H

+ 2 - 2
core/image/PointT.h

@@ -74,8 +74,8 @@ typedef PointT<Ipp8u> Point;
 
 } // namespace NICE
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/PointT.tcc"
-#endif
+//#endif
 
 #endif /* _POINT_IMAGE_H */

+ 2 - 2
core/image/RectT.h

@@ -181,9 +181,9 @@ public:
 
 } // namespace
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/RectT.tcc"
-#endif
+//#endif
 
 
 #endif // _IMAGE_RECT_H

+ 2 - 2
core/image/RectangleT.h

@@ -105,8 +105,8 @@ typedef RectangleT<Ipp8u> Rectangle;
 
 } // namespace NICE
 
-#ifdef __GNUC__
+//#ifdef __GNUC__
 #include "core/image/RectangleT.tcc"
-#endif
+//#endif
 
 #endif /* _RectangleT_IMAGE_H */

+ 9 - 0
core/image/progs/CMakeLists.txt

@@ -0,0 +1,9 @@
+
+ADD_EXECUTABLE(testApproxGaussFilter testApproxGaussFilter.cpp)
+#ADD_EXECUTABLE(testGenericSobelFilter testGenericSobelFilter.cpp)
+
+TARGET_LINK_LIBRARIES(testApproxGaussFilter nice_core ${Boost_LIBRARIES} ${ImageMagick_LIBRARIES} ${PNG_LIBRARIES} )#nice_core_algebra nice_core_basics ${Boost_LIBRARIES})
+#TARGET_LINK_LIBRARIES(testGenericSobelFilter nice_core ${Boost_LIBRARIES})#nice_core_algebra nice_core_basics ${Boost_LIBRARIES})
+
+INSTALL(TARGETS testApproxGaussFilter DESTINATION bin)
+#INSTALL(TARGETS testGenericSobelFilter DESTINATION bin)

+ 2 - 2
core/image/progs/testApproxGaussFilter.cpp

@@ -26,9 +26,9 @@ int main ( int argc, char **argv )
   gaussResult.set ( 0 );
   gaussResultApprox.set ( 0 );
 
-  bool verbose = false;
+  bool verbose = true;
   bool evaluate_mean_filter = false;
-  bool write_last_result = false;
+  bool write_last_result = true;
 
   // ignore the following boundary when calculating the error
   const int boundary = 120;