Fawkes API  Fawkes Development Version
firevision::ColorModelSimilarity::color_class_t Struct Reference

Parameters that define a certain color. More...

#include <similarity.h>

Public Member Functions

void set_reference (std::vector< unsigned int > &ref)
 Define the RGB values for the reference color. More...
 
 color_class_t (color_t expect, std::vector< unsigned int > &v, int chroma_threshold, int saturation_threshold, int luma_threshold=0)
 Initialize a color class. More...
 

Public Attributes

color_t result
 Discrete color_t represented by this class. More...
 
int ref_u
 YUV U-component of reference color. More...
 
int ref_v
 YUV V-component of reference color. More...
 
int ref_y
 YUV Y-component of reference color. More...
 
int luma_threshold
 Required luminousity. More...
 
int ref_length
 Length of U,V vector, i.e. More...
 
int chroma_threshold
 Required chroma similarity. More...
 
int saturation_threshold
 Required saturation. More...
 

Detailed Description

Parameters that define a certain color.

Definition at line 53 of file similarity.h.

Constructor & Destructor Documentation

◆ color_class_t()

firevision::ColorModelSimilarity::color_class_t::color_class_t ( color_t  expect,
std::vector< unsigned int > &  v,
int  chroma_threshold,
int  saturation_threshold,
int  luma_threshold = 0 
)
inline

Initialize a color class.

Parameters
expectDiscrete color_t represented by this class
vA 3-element list [R, G, B]
chroma_thresholdRequired color similarity (higher = more similar), 0..255
saturation_thresholdRequired saturation (higher = more saturation), 0..255
luma_thresholdRequired luminousity similarity (higher = more similar), 0..255, default 0

Definition at line 102 of file similarity.h.

References firevision::ColorModelSimilarity::add_color(), firevision::ColorModelSimilarity::add_colors(), chroma_threshold, firevision::ColorModelSimilarity::delete_colors(), luma_threshold, saturation_threshold, and set_reference().

Member Function Documentation

◆ set_reference()

void firevision::ColorModelSimilarity::color_class_t::set_reference ( std::vector< unsigned int > &  ref)
inline

Define the RGB values for the reference color.

Parameters
refA 3-element list [R, G, B]

Definition at line 82 of file similarity.h.

Referenced by color_class_t().

Member Data Documentation

◆ chroma_threshold

int firevision::ColorModelSimilarity::color_class_t::chroma_threshold

Required chroma similarity.

Definition at line 73 of file similarity.h.

Referenced by color_class_t().

◆ luma_threshold

int firevision::ColorModelSimilarity::color_class_t::luma_threshold

Required luminousity.

Definition at line 67 of file similarity.h.

Referenced by color_class_t().

◆ ref_length

int firevision::ColorModelSimilarity::color_class_t::ref_length

Length of U,V vector, i.e.

reference saturation

Definition at line 70 of file similarity.h.

◆ ref_u

int firevision::ColorModelSimilarity::color_class_t::ref_u

YUV U-component of reference color.

Definition at line 58 of file similarity.h.

◆ ref_v

int firevision::ColorModelSimilarity::color_class_t::ref_v

YUV V-component of reference color.

Definition at line 61 of file similarity.h.

◆ ref_y

int firevision::ColorModelSimilarity::color_class_t::ref_y

YUV Y-component of reference color.

Definition at line 64 of file similarity.h.

◆ result

color_t firevision::ColorModelSimilarity::color_class_t::result

Discrete color_t represented by this class.

Definition at line 55 of file similarity.h.

◆ saturation_threshold

int firevision::ColorModelSimilarity::color_class_t::saturation_threshold

Required saturation.

Definition at line 76 of file similarity.h.

Referenced by color_class_t().


The documentation for this struct was generated from the following file: