Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CMVision Class Reference

#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_infogetColorInfo (int color)
 
void getColorInfo (int color, color_info &info)
 
char * getColorName (int color)
 
rgb getColorVisual (int color)
 
unsigned * getMap ()
 
regiongetRegions (int color_id)
 
bool getThreshold (int color, int &a_low, int &a_high, int &b_low, int &b_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 a_low, int a_high, int b_low, int b_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 ()
 
int mergeRegions (region *p, int num, double density_thresh)
 
int separateRegions (region *restrict reg, int num)
 
regionsortRegionListByArea (region *restrict list, int passes)
 
void sortRegions (int max_area)
 

Protected Attributes

unsigned a_class [CMV_COLOR_LEVELS]
 
unsigned b_class [CMV_COLOR_LEVELS]
 
color_info colors [CMV_MAX_COLORS]
 
int height
 
unsigned * map
 
unsigned options
 
int region_count [CMV_MAX_COLORS]
 
regionregion_list [CMV_MAX_COLORS]
 
region region_table [CMV_MAX_REGIONS]
 
rle rmap [CMV_MAX_RUNS]
 
int width
 

Detailed Description

Definition at line 108 of file cmvision.h.

Constructor & Destructor Documentation

◆ CMVision()

CMVision::CMVision ( )
inline

Definition at line 188 of file cmvision.h.

◆ ~CMVision()

CMVision::~CMVision ( )
inline

Definition at line 189 of file cmvision.h.

Member Function Documentation

◆ calcAverageColors()

void CMVision::calcAverageColors ( region *restrict  reg,
int  num_reg,
image_pixel *restrict  img,
rle *restrict  rmap,
int  num_runs 
)
protected

Definition at line 313 of file cmvision.cc.

◆ classifyFrame()

void CMVision::classifyFrame ( image_pixel *restrict  img,
unsigned *restrict  map 
)
protected

Definition at line 105 of file cmvision.cc.

◆ clear()

void CMVision::clear ( )
protected

Definition at line 608 of file cmvision.cc.

◆ close()

void CMVision::close ( )

Definition at line 830 of file cmvision.cc.

◆ connectComponents()

void CMVision::connectComponents ( rle *restrict  map,
int  num 
)
protected

Definition at line 169 of file cmvision.cc.

◆ disable()

bool CMVision::disable ( unsigned  opt)

Definition at line 820 of file cmvision.cc.

◆ enable()

bool CMVision::enable ( unsigned  opt)

Definition at line 810 of file cmvision.cc.

◆ encodeRuns()

int CMVision::encodeRuns ( rle *restrict  out,
unsigned *restrict  map 
)
protected

Definition at line 124 of file cmvision.cc.

◆ extractRegions()

int CMVision::extractRegions ( region *restrict  reg,
rle *restrict  rmap,
int  num 
)
protected

Definition at line 246 of file cmvision.cc.

◆ getColorInfo() [1/2]

color_info* CMVision::getColorInfo ( int  color)
inline

Definition at line 214 of file cmvision.h.

◆ getColorInfo() [2/2]

void CMVision::getColorInfo ( int  color,
color_info info 
)
inline

Definition at line 216 of file cmvision.h.

◆ getColorName()

char* CMVision::getColorName ( int  color)
inline

Definition at line 209 of file cmvision.h.

◆ getColorVisual()

rgb CMVision::getColorVisual ( int  color)
inline

Definition at line 211 of file cmvision.h.

◆ getMap()

unsigned* CMVision::getMap ( )
inline

Definition at line 206 of file cmvision.h.

◆ getRegions()

CMVision::region * CMVision::getRegions ( int  color_id)

Definition at line 970 of file cmvision.cc.

◆ getThreshold()

bool CMVision::getThreshold ( int  color,
int &  a_low,
int &  a_high,
int &  b_low,
int &  b_high 
)

Definition at line 865 of file cmvision.cc.

◆ initialize()

bool CMVision::initialize ( int  nwidth,
int  nheight 
)

Definition at line 621 of file cmvision.cc.

◆ loadOptions()

bool CMVision::loadOptions ( const char *  filename)

Definition at line 666 of file cmvision.cc.

◆ mergeRegions() [1/2]

int CMVision::mergeRegions ( )
protected

Definition at line 587 of file cmvision.cc.

◆ mergeRegions() [2/2]

int CMVision::mergeRegions ( region p,
int  num,
double  density_thresh 
)
protected

Definition at line 532 of file cmvision.cc.

◆ numRegions()

int CMVision::numRegions ( int  color_id)

Definition at line 964 of file cmvision.cc.

◆ processFrame() [1/2]

bool CMVision::processFrame ( image_pixel image)

Definition at line 906 of file cmvision.cc.

◆ processFrame() [2/2]

bool CMVision::processFrame ( unsigned *  map)

Definition at line 937 of file cmvision.cc.

◆ saveOptions()

bool CMVision::saveOptions ( char *  filename)

Definition at line 776 of file cmvision.cc.

◆ separateRegions()

int CMVision::separateRegions ( region *restrict  reg,
int  num 
)
protected

Definition at line 431 of file cmvision.cc.

◆ setColorInfo()

void CMVision::setColorInfo ( int  color,
color_info info 
)
inline

Definition at line 218 of file cmvision.h.

◆ setThreshold()

bool CMVision::setThreshold ( int  color,
int  a_low,
int  a_high,
int  b_low,
int  b_high 
)

Definition at line 880 of file cmvision.cc.

◆ sortRegionListByArea()

CMVision::region * CMVision::sortRegionListByArea ( region *restrict  list,
int  passes 
)
protected

Definition at line 474 of file cmvision.cc.

◆ sortRegions()

void CMVision::sortRegions ( int  max_area)
protected

Definition at line 517 of file cmvision.cc.

◆ testClassify()

bool CMVision::testClassify ( rgb *restrict  out,
image_pixel *restrict  image 
)

Definition at line 839 of file cmvision.cc.

Member Data Documentation

◆ a_class

unsigned CMVision::a_class[CMV_COLOR_LEVELS]
protected

Definition at line 153 of file cmvision.h.

◆ b_class

unsigned CMVision::b_class[CMV_COLOR_LEVELS]
protected

Definition at line 154 of file cmvision.h.

◆ colors

color_info CMVision::colors[CMV_MAX_COLORS]
protected

Definition at line 162 of file cmvision.h.

◆ height

int CMVision::height
protected

Definition at line 163 of file cmvision.h.

◆ map

unsigned* CMVision::map
protected

Definition at line 164 of file cmvision.h.

◆ options

unsigned CMVision::options
protected

Definition at line 166 of file cmvision.h.

◆ region_count

int CMVision::region_count[CMV_MAX_COLORS]
protected

Definition at line 158 of file cmvision.h.

◆ region_list

region* CMVision::region_list[CMV_MAX_COLORS]
protected

Definition at line 157 of file cmvision.h.

◆ region_table

region CMVision::region_table[CMV_MAX_REGIONS]
protected

Definition at line 156 of file cmvision.h.

◆ rmap

rle CMVision::rmap[CMV_MAX_RUNS]
protected

Definition at line 160 of file cmvision.h.

◆ width

int CMVision::width
protected

Definition at line 163 of file cmvision.h.


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


cmvision
Author(s): Nate Koenig, Nate Koenig
autogenerated on Wed Mar 2 2022 00:03:25