CPC A47J 31/4492 (2013.01) [A47J 31/3676 (2013.01); A47J 31/52 (2013.01)] | 15 Claims |
1. A machine for preparing and dispensing a beverage comprising:
an extraction unit for extracting a beverage ingredient capsule to form the beverage;
a control unit for controlling the extraction unit to extract such capsule;
an outlet for dispensing the beverage formed by extracting such capsule to a user-receptacle to collect the beverage,
a color recognition module for recognizing a color of a capsule inserted in the machine, the color recognition module comprising a color sensor for sensing a sample color of at least part of the surface of such capsule;
the color recognition module is configured to compare the sample color to at least one reference color by:
computing a HSL sample color vector of the sample color;
computing a hue distance between a hue component of the HSL sample color vector and a hue component of a HSL reference color vector of the at least one reference color,
computing a saturation distance between a saturation component of the HSL sample color vector and a saturation component of the HSL reference color vector,
computing a lightness distance between a lightness component of the HSL sample color vector and a lightness component of the HSL reference color vector, and
computing a HSL score with the hue distance, the saturation distance and the lightness distance to determine a match between the color sample and the at least one reference color.
|