Caches image pyramids in main memory up to a maximum number of images or memory limit.
More...
|
| drwnImagePyramidCache (double downSampleRate=0.5, int minSize=32, int maxLevels=DRWN_INT_MAX, bool bGreyImages=GREY_IMAGES, bool bBigMemory=BIG_MEMORY) |
| constructor
|
|
| drwnImagePyramidCache (const vector< string > &filenames, double downSampleRate=0.5, int minSize=32, int maxLevels=DRWN_INT_MAX, bool bGreyImages=GREY_IMAGES, bool bBigMemory=BIG_MEMORY) |
| constructor with filename initialization
|
|
| ~drwnImagePyramidCache () |
| destructor
|
|
void | initialize (const vector< string > &filenames) |
| initializes the cache with a list of filenames (cache must be clear)
|
|
void | append (const string &filename) |
| adds a filename to the list of filenames managed by the cache
|
|
void | clear () |
| Clear all images from the cache (cannot be called if some images are still locked). Does nothing if in big memory mode.
|
|
bool | empty () const |
| returns true if the cache is empty (but may still be initialized with filenames)
|
|
size_t | size () const |
| returns number of image pyramids stored in the cache
|
|
size_t | numLocked () const |
| returns number of locked image pyramids in the cache
|
|
size_t | memory () const |
| returns memory used by in-memory image pyramids
|
|
const string & | filename (unsigned indx) const |
| return the filename for image indx
|
|
int | index (const string &filename) const |
| returns the index for filename (slow)
|
|
void | lock (unsigned indx) |
| lock an image pyramid for use (loads if not already in the cache)
|
|
void | lock (const string &filename) |
| lock an image pyramid for use (loads if not already in the cache)
|
|
size_t | levels (unsigned indx) const |
| returns the number of levels in an image pyramid (which must first be locked)
|
|
size_t | levels (const string &filename) const |
| returns the number of levels in an image pyramid (which must first be locked)
|
|
const cv::Mat & | get (unsigned indx, unsigned level=0) const |
| returns an image (which must first be locked)
|
|
const cv::Mat & | get (const string &filename, unsigned level=0) const |
| returns an image (which must first be locked)
|
|
void | unlock (unsigned indx) |
| marks an image as free
|
|
void | unlock (const string &filename) |
| marks an image as free
|
|
cv::Mat | copy (unsigned indx, unsigned level=0) |
| copies an image without locking it (caller must free the image)
|
|
cv::Mat | copy (const string &filename, unsigned level=0) |
| copies an image without locking it (caller must free the image)
|
|
Caches image pyramids in main memory up to a maximum number of images or memory limit.
- See Also
- drwnImageCache.