123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- /**
- * @file LFCache.h
- * @brief read and write cache for local features
- * @author Björn Fröhlich
- * @date 02/18/2010
- */
- #ifndef LFCacheINCLUDE
- #define LFCacheINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/image/ImageT.h"
- #include "core/basics/Config.h"
- #include "LocalFeature.h"
- namespace OBJREC {
-
- class LFCache : public LocalFeature
- {
- protected:
- //! local feature
- LocalFeature *lf;
-
- //! read/write from cachedir
- std::string cachedir;
-
- //! writing format
- int descFormat;
-
-
- int cachemode;
-
- template <class ImageClass>
- int getDescriptorsTemplate ( const ImageClass & img, NICE::VVector & positions, NICE::VVector & descriptors ) const;
- public:
-
- /** simple constructor */
- LFCache ( const NICE::Config *conf, LocalFeature *_lf );
-
- /** simple destructor */
-
- virtual ~LFCache();
-
- /**
- * returns the size of local feature
- * @return size
- */
- int getDescSize() const { return lf->getDescSize(); };
-
- /**
- * get the descriptor
- * @param img input image
- * @param positions positions
- * @param descriptors output
- * @return 0
- */
- int getDescriptors ( const NICE::Image & img, NICE::VVector & positions, NICE::VVector & descriptors ) const;
-
- /**
- * get the descriptor
- * @param cimg input color image
- * @param positions positions
- * @param descriptors output
- * @return 0
- */
- int getDescriptors ( const NICE::ColorImage & cimg, NICE::VVector & positions, NICE::VVector & descriptors ) const;
-
- void visualizeFeatures ( NICE::Image & mark,
- const NICE::VVector & positions,
- size_t color ) const;
-
- };
- } // namespace
- #include "LFCache.tcc"
- #endif
|