#include <cmvision.h>
Classes | |
struct | color_info |
struct | line |
struct | point |
struct | rectangle |
struct | region |
struct | rle |
Public Member Functions | |
void | close () |
CMVision () | |
bool | disable (unsigned opt) |
bool | enable (unsigned opt) |
color_info * | getColorInfo (int color) |
void | getColorInfo (int color, color_info &info) |
char * | getColorName (int color) |
rgb | getColorVisual (int color) |
unsigned * | getMap () |
region * | getRegions (int color_id) |
bool | getThreshold (int color, int &y_low, int &y_high, int &u_low, int &u_high, int &v_low, int &v_high) |
bool | initialize (int nwidth, int nheight) |
bool | loadOptions (const char *filename) |
int | numRegions (int color_id) |
bool | processFrame (image_pixel *image) |
bool | processFrame (unsigned *map) |
bool | saveOptions (char *filename) |
void | setColorInfo (int color, color_info &info) |
bool | setThreshold (int color, int y_low, int y_high, int u_low, int u_high, int v_low, int v_high) |
bool | testClassify (rgb *restrict out, image_pixel *restrict image) |
~CMVision () | |
Protected Member Functions | |
void | calcAverageColors (region *restrict reg, int num_reg, image_pixel *restrict img, rle *restrict rmap, int num_runs) |
void | classifyFrame (image_pixel *restrict img, unsigned *restrict map) |
void | clear () |
void | connectComponents (rle *restrict map, int num) |
int | encodeRuns (rle *restrict out, unsigned *restrict map) |
int | extractRegions (region *restrict reg, rle *restrict rmap, int num) |
int | mergeRegions (region *p, int num, double density_thresh) |
int | mergeRegions () |
int | separateRegions (region *restrict reg, int num) |
region * | sortRegionListByArea (region *restrict list, int passes) |
void | sortRegions (int max_area) |
Protected Attributes | |
color_info | colors [CMV_MAX_COLORS] |
int | height |
unsigned * | map |
unsigned | options |
int | region_count [CMV_MAX_COLORS] |
region * | region_list [CMV_MAX_COLORS] |
region | region_table [CMV_MAX_REGIONS] |
rle | rmap [CMV_MAX_RUNS] |
unsigned | u_class [CMV_COLOR_LEVELS] |
unsigned | v_class [CMV_COLOR_LEVELS] |
int | width |
unsigned | y_class [CMV_COLOR_LEVELS] |
Definition at line 116 of file cmvision.h.
CMVision::CMVision | ( | ) | [inline] |
Definition at line 198 of file cmvision.h.
CMVision::~CMVision | ( | ) | [inline] |
Definition at line 199 of file cmvision.h.
void CMVision::calcAverageColors | ( | region *restrict | reg, |
int | num_reg, | ||
image_pixel *restrict | img, | ||
rle *restrict | rmap, | ||
int | num_runs | ||
) | [protected] |
Definition at line 327 of file cmvision.cc.
void CMVision::classifyFrame | ( | image_pixel *restrict | img, |
unsigned *restrict | map | ||
) | [protected] |
Definition at line 105 of file cmvision.cc.
void CMVision::clear | ( | void | ) | [protected] |
Definition at line 622 of file cmvision.cc.
void CMVision::close | ( | ) |
Definition at line 842 of file cmvision.cc.
void CMVision::connectComponents | ( | rle *restrict | map, |
int | num | ||
) | [protected] |
Definition at line 183 of file cmvision.cc.
bool CMVision::disable | ( | unsigned | opt | ) |
Definition at line 832 of file cmvision.cc.
bool CMVision::enable | ( | unsigned | opt | ) |
Definition at line 822 of file cmvision.cc.
int CMVision::encodeRuns | ( | rle *restrict | out, |
unsigned *restrict | map | ||
) | [protected] |
Definition at line 138 of file cmvision.cc.
int CMVision::extractRegions | ( | region *restrict | reg, |
rle *restrict | rmap, | ||
int | num | ||
) | [protected] |
Definition at line 260 of file cmvision.cc.
color_info* CMVision::getColorInfo | ( | int | color | ) | [inline] |
Definition at line 226 of file cmvision.h.
void CMVision::getColorInfo | ( | int | color, |
color_info & | info | ||
) | [inline] |
Definition at line 228 of file cmvision.h.
char* CMVision::getColorName | ( | int | color | ) | [inline] |
Definition at line 221 of file cmvision.h.
rgb CMVision::getColorVisual | ( | int | color | ) | [inline] |
Definition at line 223 of file cmvision.h.
unsigned* CMVision::getMap | ( | ) | [inline] |
Definition at line 218 of file cmvision.h.
CMVision::region * CMVision::getRegions | ( | int | color_id | ) |
Definition at line 988 of file cmvision.cc.
bool CMVision::getThreshold | ( | int | color, |
int & | y_low, | ||
int & | y_high, | ||
int & | u_low, | ||
int & | u_high, | ||
int & | v_low, | ||
int & | v_high | ||
) |
Definition at line 877 of file cmvision.cc.
bool CMVision::initialize | ( | int | nwidth, |
int | nheight | ||
) |
Definition at line 636 of file cmvision.cc.
bool CMVision::loadOptions | ( | const char * | filename | ) |
Definition at line 681 of file cmvision.cc.
int CMVision::mergeRegions | ( | region * | p, |
int | num, | ||
double | density_thresh | ||
) | [protected] |
Definition at line 546 of file cmvision.cc.
int CMVision::mergeRegions | ( | ) | [protected] |
Definition at line 601 of file cmvision.cc.
int CMVision::numRegions | ( | int | color_id | ) |
Definition at line 982 of file cmvision.cc.
bool CMVision::processFrame | ( | image_pixel * | image | ) |
Definition at line 924 of file cmvision.cc.
bool CMVision::processFrame | ( | unsigned * | map | ) |
Definition at line 955 of file cmvision.cc.
bool CMVision::saveOptions | ( | char * | filename | ) |
Definition at line 787 of file cmvision.cc.
int CMVision::separateRegions | ( | region *restrict | reg, |
int | num | ||
) | [protected] |
Definition at line 445 of file cmvision.cc.
void CMVision::setColorInfo | ( | int | color, |
color_info & | info | ||
) | [inline] |
Definition at line 230 of file cmvision.h.
bool CMVision::setThreshold | ( | int | color, |
int | y_low, | ||
int | y_high, | ||
int | u_low, | ||
int | u_high, | ||
int | v_low, | ||
int | v_high | ||
) |
Definition at line 894 of file cmvision.cc.
CMVision::region * CMVision::sortRegionListByArea | ( | region *restrict | list, |
int | passes | ||
) | [protected] |
Definition at line 488 of file cmvision.cc.
void CMVision::sortRegions | ( | int | max_area | ) | [protected] |
Definition at line 531 of file cmvision.cc.
bool CMVision::testClassify | ( | rgb *restrict | out, |
image_pixel *restrict | image | ||
) |
Definition at line 851 of file cmvision.cc.
color_info CMVision::colors[CMV_MAX_COLORS] [protected] |
Definition at line 172 of file cmvision.h.
int CMVision::height [protected] |
Definition at line 173 of file cmvision.h.
unsigned* CMVision::map [protected] |
Definition at line 174 of file cmvision.h.
unsigned CMVision::options [protected] |
Definition at line 176 of file cmvision.h.
int CMVision::region_count[CMV_MAX_COLORS] [protected] |
Definition at line 168 of file cmvision.h.
region* CMVision::region_list[CMV_MAX_COLORS] [protected] |
Definition at line 167 of file cmvision.h.
region CMVision::region_table[CMV_MAX_REGIONS] [protected] |
Definition at line 166 of file cmvision.h.
rle CMVision::rmap[CMV_MAX_RUNS] [protected] |
Definition at line 170 of file cmvision.h.
unsigned CMVision::u_class[CMV_COLOR_LEVELS] [protected] |
Definition at line 163 of file cmvision.h.
unsigned CMVision::v_class[CMV_COLOR_LEVELS] [protected] |
Definition at line 164 of file cmvision.h.
int CMVision::width [protected] |
Definition at line 173 of file cmvision.h.
unsigned CMVision::y_class[CMV_COLOR_LEVELS] [protected] |
Definition at line 162 of file cmvision.h.