Preprocess.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * @file Preprocess.h
  3. * @brief simple preprocessing operations
  4. * @author Erik Rodner
  5. * @date 02/20/2008
  6. */
  7. #ifndef PREPROCESSINCLUDE
  8. #define PREPROCESSINCLUDE
  9. #include "core/basics/Config.h"
  10. #include "core/image/ImageT.h"
  11. namespace OBJREC {
  12. /** @brief simple preprocessing operations */
  13. class Preprocess
  14. {
  15. protected:
  16. static int normalizeWidth;
  17. static int normalizeHeight;
  18. static bool init;
  19. static std::string substituteFilenameRegex;
  20. static std::string substituteFilenameSubs;
  21. static bool disableReadImg;
  22. static bool disableReadImgHeader;
  23. public:
  24. /** init preprocessing routines */
  25. static void Init ( const NICE::Config *conf );
  26. /** read an image and apply preprocessing
  27. @param filename input filename
  28. @return resulting grayscale image
  29. */
  30. static NICE::Image ReadImgAdv ( const std::string & filename );
  31. /** read a color image and apply preprocessing
  32. @param filename input filename
  33. @return resulting color image
  34. */
  35. static NICE::ColorImage ReadImgAdvRGB ( const std::string & filename );
  36. /** get the size of an image
  37. @param filename filename of the image
  38. @param xsize resulting width of the image
  39. @param ysize resulting height of the image
  40. */
  41. static void getImageSize ( const std::string & filename, int & xsize, int & ysize );
  42. };
  43. } // namespace
  44. #endif