24 #include <fvmodels/color/lookuptable.h>
26 #include <fvutils/color/yuv.h>
27 #include <fvutils/colormap/yuvcm.h>
28 #include <fvutils/colormap/cmfile.h>
29 #include <fvutils/ipc/shm_lut.h>
31 #include <core/exceptions/software.h>
32 #include <core/exceptions/system.h>
35 #include <sys/utsname.h>
38 #include <sys/types.h>
45 using namespace fawkes;
47 namespace firevision {
64 ColorModelLookupTable::ColorModelLookupTable(
YuvColormap *colormap)
66 __colormap = colormap;
73 ColorModelLookupTable::ColorModelLookupTable(
const char *lut_id,
bool destroy_on_free)
75 __colormap =
new YuvColormap(lut_id, destroy_on_free);
84 ColorModelLookupTable::ColorModelLookupTable(
unsigned int depth,
85 const char *lut_id,
bool destroy_on_free)
87 __colormap =
new YuvColormap(lut_id, destroy_on_free, depth);
96 ColorModelLookupTable::ColorModelLookupTable(
const char *file,
97 const char *lut_id,
bool destroy_on_free)
107 __colormap =
new YuvColormap(tycm, lut_id, destroy_on_free);
115 ColorModelLookupTable::ColorModelLookupTable(
const char *file)
121 if ( ! __colormap ) {
129 ColorModelLookupTable::~ColorModelLookupTable()
136 ColorModelLookupTable::get_name()
138 return "ColorModelLookupTable";
145 ColorModelLookupTable::get_colormap()
const
166 ColorModelLookupTable::load(
const char *filename)
189 *__colormap += *(cmlt.__colormap);
196 ColorModelLookupTable::reset()
207 ColorModelLookupTable::compose_filename(
const std::string format)
209 return ColormapFile::compose_filename(format);