AliceVision
Photogrammetric Computer Vision Framework
Public Member Functions | List of all members
aliceVision::image::DCPDatabase Class Referencefinal

DCPDatabase manages DCP profiles loading and caching. More...

#include <dcp.hpp>

Public Member Functions

 DCPDatabase (const std::string &databaseDirPath)
 
int load (const std::string &databaseDirPath, bool force=false)
 load stores in a file list all the valid dcp filenames found in a folder (including subfolders). None of them are loaded in cache. param[in] database folder name. param[in] if true loading is forced even if a database with the same folder name is already loaded. return Number of DCP files found.
 
void clear ()
 clear clears the cache and the DCP file list.
 
bool empty ()
 Check if the database is empty. return True if empty.
 
size_t size ()
 Size of the database. return number of known profiles.
 
void add_or_replace (DCPProfile &dcpProf, const std::string &make, const std::string &model)
 add_or_replace adds or replaces an existing DCP profile in the cache. Update the DCP file list with dcpProf.info.filename. param[in] DCP profile to be stored. param[in] DSLR Maker. param[in] DSLR Model.
 
bool retrieveDcpForCamera (const std::string &make, const std::string &model, DCPProfile &dcpProf)
 retrieveDcpForCamera searches for a DCP profile in the database for a given camera. Search first in the cache. If no DCP profile is found search if an appropriate DCP file exists in the file list. If a dcp file is found then load it and store it in the cache. param[in] make The camera maker param[in] model The camera model param[in] dcpProf the DCP profile to be filled in return True if a corresponding profile has been found
 

Detailed Description

DCPDatabase manages DCP profiles loading and caching.


The documentation for this class was generated from the following files: