27 #include <fvmodels/color/thresholds.h> 42 ColorModelThresholds::determine(
unsigned int y,
46 if ( y >= THRESHOLD_WHITE_Y_LOW) {
49 if ( u <= THRESHOLD_GREEN_U_HIGH &&
50 v <= THRESHOLD_GREEN_V_HIGH) {
54 u <= THRESHOLD_ORANGE_U_HIGH &&
55 v >= THRESHOLD_ORANGE_V_LOW) {
58 else if (u >= THRESHOLD_BLUE_U_LOW &&
59 v <= THRESHOLD_BLUE_V_HIGH) {
62 else if (u <= THRESHOLD_YELLOW_U_HIGH &&
63 v >= THRESHOLD_YELLOW_V_LOW) {
66 else if (u >= THRESHOLD_MAGENTA_U_LOW &&
67 v >= THRESHOLD_MAGENTA_V_LOW) {
70 else if (THRESHOLD_CYAN_U_LOW <= u &&
71 u <= THRESHOLD_CYAN_U_HIGH &&
72 v <= THRESHOLD_CYAN_V_HIGH) {
81 ColorModelThresholds::get_name()
83 return "ColorModelThresholds";
90 ColorModelThresholds::print_thresholds()
92 cout <<
"ColorModelThresholds" << endl
93 <<
"==========================================================" << endl
94 <<
"Orange: u_low=" << THRESHOLD_ORANGE_U_LOW
95 <<
" u_high=" << THRESHOLD_ORANGE_U_HIGH
96 <<
" v_low=" << THRESHOLD_ORANGE_V_LOW
98 <<
"Yellow: u_high=" << THRESHOLD_YELLOW_U_HIGH
99 <<
" v_low=" << THRESHOLD_YELLOW_V_LOW