12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- /**
- * @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 <vislearning/nice.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
|