24 #include <core/exceptions/software.h>
25 #include <core/exceptions/system.h>
26 #include <fvmodels/color/lookuptable.h>
27 #include <fvutils/color/yuv.h>
28 #include <fvutils/colormap/cmfile.h>
29 #include <fvutils/colormap/yuvcm.h>
30 #include <fvutils/ipc/shm_lut.h>
32 #include <sys/types.h>
33 #include <sys/utsname.h>
45 namespace firevision {
59 ColorModelLookupTable::ColorModelLookupTable(
YuvColormap *colormap)
68 ColorModelLookupTable::ColorModelLookupTable(
const char *lut_id,
bool destroy_on_free)
70 colormap_ =
new YuvColormap(lut_id, destroy_on_free);
78 ColorModelLookupTable::ColorModelLookupTable(
unsigned int depth,
82 colormap_ =
new YuvColormap(lut_id, destroy_on_free, depth);
90 ColorModelLookupTable::ColorModelLookupTable(
const char *file,
102 colormap_ =
new YuvColormap(tycm, lut_id, destroy_on_free);
109 ColorModelLookupTable::ColorModelLookupTable(
const char *file)
122 ColorModelLookupTable::~ColorModelLookupTable()
128 ColorModelLookupTable::determine(
unsigned int y,
unsigned int u,
unsigned int v)
const
130 return colormap_->determine(y, u, v);
134 ColorModelLookupTable::get_name()
136 return "ColorModelLookupTable";
143 ColorModelLookupTable::get_colormap()
const
162 ColorModelLookupTable::load(
const char *filename)
184 *colormap_ += *(cmlt.colormap_);
190 ColorModelLookupTable::reset()
201 ColorModelLookupTable::compose_filename(
const std::string format)
203 return ColormapFile::compose_filename(format);
Color model based on a lookup table.
void reset()
Reset colormap.
Colormap * get_colormap()
Get a freshly generated colormap based on current file content.
virtual void read(const char *file_name)
Read file.
Fawkes library namespace.