Technical Field
The present disclosure relates to a method for the automatic diagnosis of the quality of milk foam, dispensed by a dispensing machine of milk-based hot and cold beverages. In particular and according to some preferred embodiments, the present disclosure regards a method for automatically evaluating the quality of milk foam dispensed by a frothed milk dispensing machine and for taking corrective actions. According to some embodiments, the present disclosure regards a method for the remote diagnosis of the quality of milk foam and for taking corrective actions.
Description of the Related Art
In the field of machines for preparing and dispensing coffee-based beverages, systems are generally known for the remote control of dispensing of a beverage from a machine. For example, it is possible to program the dispensing of a coffee of the desired type (cappuccino, espresso, macchiato) from a smartphone provided with a dedicated application and which communicates with a dispensing machine that includes Wi-Fi connection device.
EP2314188 describes an apparatus for refilling the filter-holders of an espresso coffee machine with selected doses of ground coffee which comprises a coffee machine that comprises at least one dispensing device and at least one grinder-meterer, wherein the machine comprises an identification unit which generates the information on the type of dose with which the filter-holder of the dispensing device must be refilled and the grinder-meterer comprises a detection unit for the information generated by the identification unit, wherein the detection unit causes the corresponding dose to be supplied to the filter-holder when the latter is positioned and retained on the grinder-meterer.
In the field of the automatic machines for the preparation of frothed milk, solutions have been developed that are set to attain a quality foam analogous to that obtained by an expert barman. The patent application EP1501398 describes a device for heating and frothing milk, with control of the temperature and foam quantity, in which pressurized air coming from a pump and vapor are introduced in a conveyor conduit immersible in a recipient containing milk.
Recently, there has been increased interest in beverages with cold frothed milk base. The patent application US 2010/0075007 describes a method for producing cold or hot milk foam, in which a mixture of milk and air is suctioned by means of a pump and selectively conveyed, through a throttle point, directly or through a flow heater.
A milk foam quality that satisfies the most demanding consumers is generally attributed with a very fine texture, which usually involves a creamy consistency and persistence. A visual inspection of the free surface of the beverage, and in particular of the frothed milk, provides indications regarding the quality of the foam. Nevertheless, a visual inspection often offers a result that is subjective, since it depends on the operator who executes the inspection and on the variability of his/her judgment, often influenced both by environmental factors and on his/her psycho-physical conditions. In order to seek to remedy the intrinsic subjectivity of an evaluation provided by a single operator, the sensory analysis is often carried out by a tasting group (panel), formed by “experts” of the field so as to “average out” the single evaluations.
The Applicant has observed that a more objective evaluation of the quality of milk foam, e.g. of the quality of a cappuccino or of a ‘latte macchiato’, would be advantageous in terms of time and result repeatability, resulting less expensive and more reliable.
The Applicant has understood that it is possible to automatically control the quality of milk foam dispensed by a machine for dispensing milk-based beverages through the analysis of an image of the free surface of the frothed milk contained in a container, wherein the analysis uses automatic procedures of image processing for identifying and quantifying, in the processed image, a physical characteristic representative of the texture of the surface of the frothed milk and hence indicative of the quality of milk foam.
In the preferred embodiments, the physical characteristic is an air bubble present on the surface of the frothed milk and the image processing is for identifying and numerically defining a plurality of air bubbles present on the surface of the frothed milk. The plurality of bubbles is numerically defined by a plurality of numerical parameters. The plurality of numerical parameters comprises the size of each bubble of the plurality of bubbles (e.g. average radius, in the case of description with ellipses, or radius, in the case of circles) and the number of the plurality of bubbles.
The present disclosure provides for a method of automatically assessing the quality of frothed milk foam in a milk-based beverage prepared by a dispensing machine, the method comprising:
providing a beverage containing frothed milk within a container, the beverage having a free surface of frothed milk having a surface texture;
defining a plurality of reference classes representative of a foam quality level based on a surface texture of the frothed milk on the free surface, wherein the surface texture is described by air bubbles on the free surface, said classes being characterized by a plurality of numerical parameters comprising size and number of the plurality of bubbles, and wherein each reference class is described by a respective plurality of numerical ranges of the plurality of numerical parameters, a numerical range corresponding to a respective numerical parameter of the plurality of numerical parameters for each reference class, whereby each reference class is defined by a respective plurality of numerical ranges of the plurality of numerical parameters;
acquiring a digital image of the free surface of the beverage as a primary image;
digitally processing the acquired primary image to obtain a processed image of the free surface of the frothed milk, wherein a plurality of bubbles representative of the surface texture is identified in the processed image, each bubble being defined by a contour line that defines its size;
in the processed image, calculating a plurality of values of the corresponding plurality of numerical parameters which characterize the plurality of bubbles that have been identified in the processed image;
checking the membership of each numerical parameter value that has been calculated in the processed image to the plurality of numerical ranges of said numerical parameter, the numerical ranges being associated with their respective reference classes, and
according to the result of the step of checking, assigning a current reference class of the plurality of reference classes, to thereby assign a reference class of foam quality to the acquired image of the beverage containing frothed milk.
In some preferred embodiments, the Applicant has considered an automatic machine for preparing and dispensing frothed milk in which cold milk is suctioned by a pump for milk and is mixed with air so as to produce a milk-air mixture dispensed from a dispensing outlet. The air generally comes from the outside environment through an air conduit connected to the milk suction conduit, and the adjustment of the incoming air flow rate and hence of the quantity of air introduced during the dispensing of a beverage is attained by means of a flow calibrator, which can be manually controlled or controlled by a control unit for the electronic control of the incoming air flow rate. Alternatively, compressed air can be thrust by an air pump into a conduit in which the milk flows or into a milk and air mixing device, for example of the type described in DE4445436.
Typically, an automatic machine for the dispensing of frothed milk is installed with specific operating parameters relative to the preparation of the frothed milk, in particular operating parameters of circuit elements relevant for the operation of dispensing frothed milk, among which, for example the delivery flow rate of the pump for the milk and the calibration of the air flow rate entering the suction conduit. For example, if the milk suction pump is a variable flow pump, one or more flow rate values are often set at the time of the installation of the machine. The Applicant has observed that, during the use of the machine, some use conditions can vary and it is possible that the parameters set at the time of installation do not achieve the desired foam quality result. In some cases, it is also possible that the user of the automatic machine for the dispensing of frothed milk wishes to know if the quality of the foam can be (further) improved and in what manner.
The Applicant has understood that an automatic evaluation of the quality of the frothed milk followed, if necessary, by instructions regarding a corrective action, can be advantageous in terms of service/assistance costs or times.
In some embodiments, the method for the automatic diagnosis of the milk quality is achieved remotely.
In accordance with some embodiments of the present disclosure, a method is provided for automatically evaluating the quality of milk foam dispensed by a frothed milk dispensing machine, the method comprising:
providing an automatic machine for dispensing frothed milk from a dispensing outlet, which comprises a milk circuit comprising a plurality of circuit elements for which a respective plurality of machine operating parameters are set as current operating parameters, the plurality of machine operating parameters comprising a first machine operating parameter of a first circuit element;
dispensing, from the dispensing outlet, a frothed milk—based beverage, the beverage having a free surface of frothed milk having a surface texture, in which the dispensing is achieved with the current machine operating parameters;
defining a plurality of reference classes representative of a foam quality level based on the surface texture of the frothed milk, wherein the surface texture is described by air bubbles present on the free surface and characterized by a plurality of numerical parameters which comprises the size and the number of the plurality of bubbles on the free surface and wherein each reference class is represented by a reference class value and is described by a respective plurality of numerical ranges of the plurality of numerical parameters, a numerical parameter of the plurality of numerical parameters corresponding to a respective numerical range for each reference class, such that each reference class is defined by a respective plurality of numerical ranges of the plurality of numerical parameters;
acquiring a digital image as primary image of the free surface of the beverage via a data terminal which comprises a camera and is connectable to a data communication network;
transmitting the acquired digital image to a computing device through the data communication network;
creating, on the computing device, a database which comprises at least one data table which comprises, as entries, a plurality of values of the first machine operating parameter, each value of the first machine operating parameter being associated with a respective reference class value;
digitally processing the acquired primary image on the computing device, so as to obtain a processed image, in which a plurality of bubbles representative of the surface texture of the beverage is identified, each bubble being defined by a contour line that defines its size;
in the processed image, calculating a plurality of values of the corresponding plurality of numerical parameters characterizing the plurality of bubbles;
checking the membership of each numerical parameter value calculated in the processed image to the plurality of numerical ranges of said numerical parameter associated with the reference classes, and
according to the result of the step of checking, assigning a current reference class represented by a reference class value Qk of the plurality of reference class values so as to assign a reference class of the quality of the foam to the acquired image of the beverage containing frothed milk.
In some preferred embodiments, the method is also for taking corrective actions and comprises, after assigning a current reference class:
retrieving a reference nominal class value Qn of the plurality of reference class values and checking whether the value Qk differs from the value Qn by a value greater than a predetermined threshold value;
if the value Qk differs from the nominal class value Qn by a value greater than the predetermined threshold value, retrieving a first value of first machine operating parameter associated with the nominal class Qn and a second value of first operating parameter associated with the current reference class value Qk from the database;
checking whether the first value of the machine operating parameter associated with the current reference class differs from the second value of first machine operating parameter, and
if it does, outputting corrective action instruction data for adjusting the first current machine operating parameter according to the difference between the first and the second values of first machine operating parameter.
In some embodiments, the computing device is a remote computing device, preferably a remote server.
In one embodiment, the computing device is installed in a dispensing machine which comprises a module for transmitting and receiving network data, the module being connectable with the data communication network.
Preferably, the acquired primary image is a photographic image.
Further characteristics and advantages of the disclosure will be clear from the following detailed description made with reference to embodiments of the disclosure given as non-limiting examples and to the enclosed figures in which:
The primary image of the free surface of the frothed milk-based beverage is, in the preferred embodiments, a photograph of the surface of the dispensed beverage in a container.
The Applicant has observed that it is possible to categorize a plurality of sample images in a plurality of reference classes representative of the quality level of the milk foam and defined on the basis of the surface texture of the frothed milk.
More generally, it is possible to define a plurality of reference classes representative of a foam quality level, the reference classes being indicated with a respective plurality of class values Qk, k=1, . . . , r, comprised between a minimum value, Qmin, and a maximum value of reference nominal class, Qmax, the quality of the foam gradually improving from Qmin to Qmax, in which each reference class is described by a plurality of numerical ranges of a corresponding plurality of reference parameters of the physical characteristic of surface texture, i.e. one or more air bubbles. The numerical value ranges quantitatively define the classes. Even if the embodiment of
In the embodiment of
The system 21 also comprises a module 23 for analyzing the processed image, logically connected to the image processing module 22, the image analysis module 23 being configured for receiving the processed image and for calculating, in the processed image, a plurality of parameters relative to the air bubbles.
The system 21 also comprises a database 24 in which a plurality of numerical ranges is stored for each numerical parameter of the plurality of numerical parameters characterizing the air bubbles, each numerical range being associated with a respective reference class Qk of the plurality of reference classes indicative of the quality of the foam, such that each reference class is described by a plurality of numerical ranges corresponding to the plurality of reference parameters.
Preferably, the reference classes are represented by a numerical value, indicated with class value, e.g. a numerical integer value. The database 24 is preferably a data structure, e.g. a lookup table formed by vectors, associated with a reference class and described by a plurality of numerical ranges associated with respective numerical parameters of the plurality of bubbles. The image analysis module 23 is logically connected to the database 24 and is configured to associate each numerical parameter of the plurality of numerical parameters calculated for the plurality of bubbles identified in the processed image with a numerical range of the corresponding reference parameters stored in the database 24, so as to determine the reference class of such calculated numerical parameter. The image analysis module 23 is also configured to, after determining the reference class of each calculated numerical parameter, calculating the reference class Qk on the basis of the one or more reference classes associated with the numerical parameters, as described in more detail hereinbelow.
Following the determination of the value of the reference class, Qk, of the plurality of reference classes Q1, Q2, . . . , Qr, derived from the analysis of the processed image, the image analysis module 23 is configured for outputting information data indicative of the reference class as result of the processing of the primary image and of the analysis of the processed image.
In one embodiment, in which the system 21 is installed in a dispensing machine provided with a user interface and a display, the image analysis module 23 is configured for communicating with a user interface of the machine for display of the value Qk on the display, which then becomes information usable by the user.
In another embodiment, in which the system 21 is installed in a server that is remote with respect to the dispensing machine, the image analysis module is configured for communicating with a transmission module for the transmission of the value Qk to a data terminal connected to the server through a data communication network or to a control unit of the dispensing machine, if the machine is provided with a data transceiver module, for display of the value Qk. In this manner, a user receives the information regarding the reference class that corresponds to the milk frothing in the dispensed beverage, which is in the primary image sent to the data processing system 21.
Preferably, the operating parameters associated with the reference classes are structured in a database 26, which comprises at least one data table in which a vector of values of the machine operating parameters is associated with each reference class of the plurality of reference classes. The database 26 is preferably comprised in the data processing system 21.
In one embodiment, the instruction data 27 is selected from a plurality of instruction data that is pre-programmed and stored in the system 29 such to be accessible to the corrective action module.
In one embodiment, in which the frothed milk dispensing machine is provided with a module for transmitting and receiving network data connectable with a data communication network and is provided with a control unit connected with the data transceiver module and with circuit elements relevant for the dispensing of the frothed milk for controlling the machine operating parameters of the circuit elements, outputting instruction data comprises transmitting the instruction data to the control unit of the dispensing machine and executing the instruction data by automatically adjusting at least one machine operating parameter relative to a circuit element.
In a further embodiment, the result of the processing executed by the corrective action module 25 comprises transmitting instruction data 27, automatically rendered to the user by displaying a message on the display of a data terminal or on the display of the dispensing machine, if the data terminal or the control unit of the dispensing machine is connected to the processing system 29 by means of a data communication network.
If the result of the corrective action is the display of a message, the instruction data is, in accordance with one embodiment, in the form of a pre-programmed written message, for example “Change the power of the pump to 30% PWM”, in which the value “30%” is retrieved from the database 26 as value of the operating parameter pump power, associated with the reference nominal class Qn.
The nominal class value, Qn, for example corresponds to the maximum quality of milk foam obtainable from the dispensing machine.
In a network-connected environment, the data processing system for automatically diagnosing the quality of milk foam is realized as a software that provides high level application programs. The modules of the data processing system for the diagnosis of the quality of the foam are software components provided by high level application programs that include database applications, mathematical algorithms, and software infrastructures that connect the various software components.
In accordance with the preferred embodiments, a digital image of the free surface of the frothed milk—based beverage is acquired via a data terminal which comprises a camera and can be connected to a mobile data communication network mobile or to a fixed line data network. In one embodiment, the data terminal is a smartphone or a tablet provided with a camera and connectable to a mobile data network, e.g. UMTS, EDGE or GPRS. As is generally known, if the data terminal is provided with a WiFi function, the connection to a data network is possible through a local network by means of wireless signals (WLAN). Typically, the data terminals equipped with a camera comprise a memory on which it is possible to store a photograph captured with the terminal.
In the present context and in a more general form, with data terminal provided with camera it is meant a device which comprises a data transceiver module and a camera.
In the preferred embodiments, the data terminal is provided with an application software for managing the interaction between the data terminal and a remote server. Preferably, the application software is a program that is connected via a Web API to a remote end-point that carries out the required image analysis function and returns the result.
Through the electronic control unit, the dispensing of the frothed milk in a cup is controlled by a user, e.g. by means of a button or a touch-screen display connected with a user interface in turn connected to the electronic control unit of the machine. A data terminal 31 is provided that is equipped with a mobile operating system (e.g. Android, iOS or WindowsPhone) and with a digital camera. The terminal 31 is for example a smartphone or a tablet. On the data terminal, an application software is installed and running that is configured for accessing a remote server 33 which has installed the application software of a data processing system for the diagnosis of the quality of milk foam, e.g. of the type described with reference to
In some embodiments, with the opening of the application by the user, such user is requested to insert technical information regarding the function of the dispensing machine as input data. The input data comprises machine operating parameters and in particular operating parameters of circuit elements relative to the dispensing of frothed milk, such as the operating power of the milk suction pump, expressed for example in a number of motor revolutions or in a percentage value of PWM signal to the pump, or the flow rate of air entering the milk flow, e.g. expressed through the flow cross-section of an air inlet valve. The input data can also comprise the model of the machine, registration or barcode number, or any other machine identification code.
In this operating mode of manual insertion of input data by the user, the application installed in the terminal is configured for transmitting the input data to the server. The input data relative to the operating parameters of the machine are preferably encoded in the software setting of the server in a data structure.
Following a dispensing of milk foam in a container, e.g. in a cup, by the machine 30, the user takes a photograph 34 of the free surface of the milk foam in the cup by means of the data terminal 31 and transmits the photograph 34 through a data communication network 32 to the remote server 33, by using the application. The remote server, upon reception of the photograph, initializes the diagnosis processing system in the server-side application (in per se known modes, for example by means of a script that invokes the application).
In one embodiment, the data terminal 31 comprises a digital camera configured for capturing the image with a resolution of at least 8 megapixels.
Preferably, with the opening of the application by the user, the application itself produces a query that requests the insertion of the nominal class value Qn associated with the quality of the foam considered optimal for the dispensing machine under examination or desired by the user. Preferably, the query also requests the insertion of the value of the diameter of the cup where the frothed milk must be dispensed or has been dispensed.
In per se known modes, with its opening, the application produces a template, comprising a query presented to the user through a user interface application. The input data is inserted by the user in usual ways, e.g. through the user interface application connected to the application through a display unit (e.g. a display) and an input unit (e.g. a keyboard, a touch display, etc.) of the data terminal.
Upon reception of the image transmitted by the data terminal, the server-side application is initialized and sequentially executes the digital processing of the received image in order to produce a processed image in which the physical characteristics representative of the surface texture of the foam (i.e. air bubbles) are identified, and the analysis of the processed image by calculating the numerical parameters that quantitatively define the plurality of bubbles identified in the processed image in order to determine which reference class Qk of the plurality of reference classes is associated with the dispensed beverage.
In an electronic data processing system for automatically diagnosing the quality of milk foam of the type described in
In the preferred embodiments, the method and system for electronic data processing for automatically diagnosing the quality of milk foam provide for automatically checking if there is a difference ΔQ, between the calculated reference class Qk and the nominal class Qn, ΔQ=(Qn−Qk)≠0, with absolute value greater than a predetermined threshold value and, if so, outputting corrective action instruction data for adjusting at least one machine operating parameter.
The control unit of the machine is configured in a manner such that, upon reception of the instruction data from the server 33, it executes an automatic adjustment of at least one machine operating parameter for the operation of dispensing frothed milk, e.g. the variation of the flow rate of air entering the milk flow or the variation of the output milk-air flow rate, e.g. by means of adjustment of a solenoid valve in an air conduit or of a compressed air pump.
With reference to the embodiment of
In some preferred embodiments, Qn represents the reference class with highest value (in the example of
In some preferred embodiments, upon reception of the image transmitted by the data terminal, the server-side application is initialized, and it sequentially executes the digital processing of the received image in order to show a plurality of bubbles on the surface of the frothed milk, the analysis of the processed image in order to determine a reference class value Qk associated with the numerical parameters relative to the plurality of bubbles identified in the processed image, and it checks whether a difference ΔQ=(Qn−Qk)≠0 is present with absolute value greater than a predetermined threshold value. If this is the case, the method comprises retrieving, from a data table preferably installed on a server, at least one respective operating parameter of the machine relative to Qn and Qk and outputting instruction data which comprise one of the following corrective actions:
automatically executing an adjustment of the at least one operating parameter of the machine 30, by transmitting electronic commands to the control unit connected to the one or more circuit elements relative to the frothed milk dispensing, and
transmitting instruction data to the data terminal 31 in a form such to be displayed on the display of the terminal and hence usable by the user, who can subsequently impart commands to the machine for adjusting the at least one operating parameter.
The corrective actions can comprise a combination of the actions (i) and (ii).
In an embodiment not illustrated in
In a further embodiment (not shown in
In one embodiment, the system checks if the value of the class Qk is different from the value of the nominal class Qn inserted as input data by the user and, if it is, the system transmits a message from the server to the user requesting if he/she wishes to proceed with a corrective action for the machine. If the user selects the option of proceeding with a corrective action, the method comprises retrieving, from a data table preferably installed on the server, a respective value of at least one operating parameter of the machine relative to Qn and to Qk and outputting instruction data comprises transmitting instruction data to the data terminal 31 in a form such to be displayed on the display of the terminal and hence usable by the user, who can subsequently impart commands to the machine for adjusting the at least one operating parameter.
The method in accordance with the present disclosure is preferably implemented on an automatic machine for dispensing frothed milk which comprises a pump for sucking in cold milk from a container along a milk suction conduit, in which the milk is mixed with air introduced into the milk flow, for example into the suction conduit, such to produce a milk-air mixture dispensed from a dispensing outlet. In one embodiment, the actuation of the pump and the flow rate of the air flow entering the milk flow are controlled by a control unit. In one embodiment, the pump has variable flow rate and the control unit is configured for controlling the pump output flow rate. Preferably the flow calibrator is a flow-control solenoid valve, in which the flow rate of air entering the air conduit is controlled by the control unit.
Without wishing to limit the present disclosure to a particular solution for heating milk (the machine could be configured for dispensing only cold frothed milk) or to a particular circuit for dispensing milk,
Cold milk 2, preferably cooled to a temperature ranging from 3° C. to 5° C., is contained in a container 1. The cold milk 2 is suctioned from the container, by means of a pump 5 driven by a motor 6, along a suction conduit 3 having a first open end inserted in the container 1 and a second end connected to the pump. The pump can be for example a gear pump. Upstream of the pump, a first air conduit 7 is connected to the suction conduit 3 by means of a first connection point 4. The first air conduit has a free end for the ambient air inlet, and a solenoid valve 8 is arranged thereon with adjustable flow rate for adjusting the incoming air and hence the quantity of air introduced during the dispensing of a beverage. A variation of the incoming air flow allows varying the ratio between air and milk in the air/milk mixture sucked by the pump and generally modifies the frothing of the milk. The adjustment of the air flow rate via the solenoid valve 8 is preferably controlled by an electronic control unit (CPU) 12 which controls the incoming air flow rate by selecting a specific cross-section opening value, e.g. a specific value of the section transverse to the air flow that crosses the outlet opening. In one embodiment, the air flow-control valve 8 is a solenoid valve of proportional type in which the variable flow rate is proportional to the control signal. In a different embodiment, the valve 8 is a graduated calibrator which can be manually adjusted.
In
Milk and air are mixed inside the pump 5 and delivered from the pump outlet into an outlet conduit 11 that terminates with a frothed milk dispensing outlet or end 16. The compressed mixture of milk and air is thrust along the outlet conduit 20 through a flow heater 17 arranged in the outlet conduit and configured for heating the milk during its passage to the interior of the heater. In an embodiment, shown in
The pump 5 works in an operating condition, defined by at least one operating parameter, corresponding to a delivery flow rate of the air/milk mixture introduced into the outlet conduit 11. The CPU 12 controls the actuation of the pump by controlling the motor 6.
In some embodiments, the pump 5 is a variable flow pump, preferably with variable rotation speed. A variation of the delivery flow of the pump allows varying the ratio between air and milk in the air/milk mixture. In the case of variable flow pump, the CPU 12 controls the motor 6 of the pump 5 by controlling the rotation speed of the pump.
The cold or hot frothed milk exits from the dispensing outlet 16 positioned at the open end of the outlet conduit 11 and ends in a cup or glass 19. With reference to the non-limiting example for the preparation of a cappuccino, the coffee is typically dispensed from a separate dispensing outlet (not shown) into the cup and then the milk foam is dispensed from the milk dispensing outlet 16, which fills or nearly fills the cup.
In a different embodiment, not shown in the figure, downstream of the pump, on the outlet conduit, a diverter valve is arranged which selectively conveys the milk-air mixture directly to the dispensing outlet or through a flow heater. A circuit for dispensing milk of this type is described in US 2010/0075007.
After dispensing the cappuccino, the user initializes the application in the data terminal, takes a photograph and transmits the photographic image (primary image) of the cup filled with the cappuccino to the server which executes a digital image processing process of the received photographic image.
With the photographic image, the user inserts a calibration parameter, such as an inner diameter of the container, preferably a cappuccino cup. Once the inner diameter of the cup has been received as input data, the image processing process proceeds with the measurement of the cup inner diameter, in pixels, thus enabling a calibration of the images from image units (pixels) to metric units. Preferably, the user inserts current machine operating parameters (in use in the machine during the dispensing of the beverage whose photograph was acquired) which comprise at least one operating parameter of the pump, e.g. the operating power of the milk suction pump, expressed for example in number of revolutions of the motor or in a percentage value of PWM signal to the pump, if the pump is a pump with variable rotation speed, and the opening of the air flow regulation valve if the valve is a manually-adjustable flow calibrator, or the work voltage of the flow-regulator solenoid valve. Optionally, the user inserts, as input data, other machine operating parameters such as the temperature of the boiler or the vapor pressure and the model of the machine or another product identification code.
(a) receiving the primary digital image;
(b) receiving, as input data, the value of the external radius of the edge of the cup, in metric units;
(c) limiting the primary image by using one or more library functions (e.g. OPENCV), eliminating the region of the image outside the edge of the cup or covering the external region with a uniform color, e.g. black;
(d) measuring, in pixel units, the value of the external radius of the edge of the cup, so as to obtain a calibration for the conversion of elements of the image from pixel coordinates to metric units;
(e) converting the internal region limited by the edge of the cup of the image into a gray scale so as to create a mapping of the surface of the frothed milk in gray scale;
(f) applying a smoothing filter on the image and one or more sharpening filters, in order to remove the noise present in the primary image. For example, the smoothing filter is a Gaussian filter. For example, the sharpening filter is a Laplacian filter;
(g) converting the gray scale image obtained in step (f) into a binary image. For example, if in the gray scale image each pixel has an intensity value comprised between 0 and 255, the binarization of the image provides for converting into black all the pixels in which the value is less than 220 and into white all those whose value is greater than or equal to 220.
(h) applying, on the binary image, a digital filter for extracting the contours, in order to define the edges of the bubbles on the surface of the milk, obtaining as result a plurality of contours, one for each bubble shown by the digital processing of the preceding steps. The contour extraction algorithm is for example SUZUKI 85, described in “Topological structural analysis of digitized binary images by border following”, by S. Suzuki and K. Abe, published in Computer Vision, Graphics, and Image Processing, 30(1):32-46 (1985). The extracted contour lines are spatially defined in the image in pixel coordinates, which are converted into metric units by means of the above-indicated calibration;
(i) transforming the plurality of the contour lines of the bubbles identified in the preceding step into ellipses, e.g. by means of the Fitzgibbon 95 algorithm, described by Andrew W Fitzgibbon and Robert B Fisher in “A buyer's guide to conic fitting”, Proceedings of the 6th British Conference on Machine Vision (Vol. 2), pp. 513-522 (1995). This operation allows to numerically define the bubbles as easily-examinable geometric figures;
(j) for the purpose of eliminating from the image bubbles that are too small or too large, which are very probably false positives, eliminating the ellipses which have area less than a first threshold value of area, or greater than a second threshold value of area in order to retain only the significant ellipses;
(k) on the image obtained in the preceding step, selecting the pairs of ellipses perimetrically tangent or partially superimposed on each other, and joining said pairs of ellipses by using suitable geometric functions since very probably they derive from a single large bubble which the digital contour extraction filter erroneously broke in two, and
(l) selecting ellipses that are overly long, e.g. with the ratio between the semimajor axis and the semiminor axis greater than 1.77, and dividing each selected ellipse into two or three smaller ellipses defined by two or three contour lines contained in the original contour line. This operation can be made for example by applying geometric functions.
At the end of the above-described steps (a) to (l) for digital processing of the digital primary image, a plurality of ellipses are identified in the processed image, which represent the contours of the respective plurality of bubbles highlighted on the surface of the frothed milk, in which each ellipse is defined by a plurality of geometric parameters, such as the semimajor axis and the semiminor axis.
The digital filters described in the present context are realized by means of mathematical algorithms suitable for image processing and implemented with commercial or custom software programs.
Although, in accordance with one embodiment, the air surface bubbles are described with the geometric shape of an ellipse, the present disclosure does not exclude that the bubbles can be geometrically described with a circle. In this case, the bubble is defined by one geometric parameter, the radius or diameter.
The process comprises, following the process step (l), the step of:
calculating a plurality of numerical parameters P relative to the plurality of bubbles identified on the processed final image of the milk surface.
Since a fine surface texture of the frothed milk usually contains few air bubbles with small radius or, in the case of very fine texture, the surface bubbles are nearly absent, the characterization of the size of the bubbles present in the surface and their density (number of bubbles per unit of area) and/or the number of bubbles allows the evaluation of the quality of the foam.
In some embodiments, the plurality of numerical parameters P calculated for the quantitative definition of the plurality of air bubbles comprise:
average radius Rave of the plurality of bubbles identified in the processed image calculated as average value of the average radii (Rave)i of the i-th bubble of the plurality of bubbles, in which (Rave)i of each bubble is the average value of the semimajor axis and of the semiminor axis of the ellipse that geometrically describes the contour of the bubble;
total density DT of the plurality of bubbles in the surface area inside the cup;
total number N of the plurality of bubbles;
density DG of “large” bubbles, i.e. the percentage of area of the free surface of the frothed milk which is occupied by bubbles which have an average radius greater than a given value (typically representative of a non-fine surface texture of the frothed milk), e.g. r>3.7 mm;
the density DM of “medium” bubbles, the percentage of area of the free surface of the frothed milk which is occupied by bubbles which have an average radius within a certain range of values, e.g. 1.87 mm≦r≦3.7 mm, and
the density DP of “small” bubbles, i.e. the percentage of area of the free surface of the frothed milk which is occupied by bubbles which have an average radius less than a given value, e.g. r<1.87 mm.
In some embodiments, the numerical parameters P also comprise:
average minimum radius Rmin of the bubbles, and
average maximum radius Rmax of the bubbles.
It is to be understood that the numerical parameters of interest can be a subset of the above-listed parameters and that the above-reported numerical values which define the bubbles of large, medium and small size are merely exemplifying. In one embodiment, a class is defined by a subset of numerical parameters, e.g. with number N of bubbles and the density DG of large bubbles. In another embodiment, a reference class is defined by only one numerical parameter, e.g. N.
For each numerical parameter, a plurality of numerical ranges is selected, as many as the number r of reference classes, and each numerical range is associated with a reference class, Qk, with k=1, 2, . . . r, indicative of the quality of the foam.
The process proceeds with the association of each parameter value P calculated on the basis of the ellipses identified in the processed image with the numerical range which comprises such value and is associated with a specific reference class Qk. In this manner, a reference class is associated with the numerical value of each parameter of the plurality of numerical parameters of the plurality of bubbles identified in the processed image. The association of each parameter P with a reference class can be executed by means of known software instruments.
In one embodiment, the numerical ranges which define a class Qk are empirically determined from the analysis of the sample frothed milk photograph associated with a respective reference class.
The Applicant has observed that: (a) numerical ranges of a specific numerical parameter P (e.g. Rave, DG, DM, etc.) associated with the plurality of reference classes are not necessarily, for reasons of continuity and completeness, separated from and contiguous to each other and it can happen that a numerical value of a parameter P can belong to two ranges associated with respective, different reference classes, and (b) in the case of classification which uses a plurality of numerical parameters, different numerical parameters calculated on the same processed image, hence associated with the same dispensing operation, can be comprised in respective numerical ranges of different reference classes (e.g., Rave in class Q1, DG in class Q2, N in class Q1, etc.).
Preferably, the association of a numerical parameter with a reference class is represented by a numerical factor f, indicated hereinbelow with membership degree factor, defined by a positive real number comprised between a minimum value indicating that a numerical parameter does not fall within a numerical range of the plurality of numerical ranges of the reference class and a maximum value which represents the belonging of the numerical parameter within the range.
In some embodiments, a numerical value of each parameter P is associated with the factor f of membership degree to a numerical range for each reference class of the plurality of reference classes, in which f=1 if such value is comprised in that numerical range (including the ends of the range) and f=0 if it is outside such range.
Preferably, at least one third value of membership degree factor, f, is defined which represents the condition in which the parameter P is outside the range, but is positioned close thereto. In one embodiment, given a range of values [a,b] associated with a parameter P and with a class Qk of the plurality of reference classes, the numerical value of the parameter P is associated with a membership degree factor selected from among the following values:
f=1, if the numerical value is comprised in the range [a,b];
f=0.33, if does not lie within the range [a,b], but lies in a range extended 25% with respect to the range [a,b];
f=0.1, if does not lie within the range [a,b], but lies in a range extended 33% with respect to the range [a,b], and
f=0, if it does not belong to the range [a,b] and not even in a ranged extended 33% with respect to the range [a,b].
By way of example, the parameter of the total number of bubbles identified on the surface of the frothed milk (in the digital processed image), N, is selected and it is assumed that the numerical range of the parameter N is [30,70] for the class Qk=1 and [60,100] for the class Qk+1=2. If, from the analysis of the processed image, 40 bubbles are identified on the surface of the frothed milk, N=40, the parameter N is assigned f=1 in the class Qk=1 and f=0 in the class Qk+1=2. If the value of the parameter is N=63, f=1 is associated in the class Qk=1 and f=1 in the class Qk+1=2. Assuming N=75, f=0.33 in the class Qk=1, i.e. the number 75 is situated in the range of the class Qk=1 when the values of both range ends are increased by 25%, i.e. extended range is [25,75], and f=1 in the class Qk+1=2.
The assigning of membership degree factors to the plurality of classes is executed for each numerical parameter and for each class of the plurality of reference classes. At the end of the assigning procedure, each reference class is represented by a plurality of factors f associated with the respective numerical parameters which characterize the air bubbles in the foam.
In one embodiment, the membership degree of the plurality of numerical parameters relative to the bubbles to a reference class is defined by an index of membership to a class Qk, IQ,k, defined by the sum of the plurality of factors f associated with the respective plurality of numerical parameters.
The Applicant has observed that, in the plurality of numerical parameters relative to the air bubbles which describe the surface texture of the foam, some numerical parameters are more important for the definition of the quality of milk foam with respect to other parameters. The Applicant has realized that it is preferable to associate a weight factor to the value of each numerical parameter for each reference class of the plurality of reference classes Q1, . . . , Qr, the weight factor indicating the probability that the milk foam of the digital processed image belongs to a reference class based on that specific numerical parameter. The weight factor, indicated hereinbelow with wj, of a j-th parameter, is represented by real number ranging from 0 to 1.
In one embodiment, the weight factors associated with the radii of the bubbles are 0.05 and the weight factors associated with the number of bubbles and with the densities are equal to 0.25.
In the embodiments in which the numerical parameters are represented by membership degree factors, f, the process proceeds by assigning, to a reference class k, a class membership index indicated with IQ,k, which is defined as sum of the membership degree factors of all the numerical parameters of the bubbles associated with that reference class, in which each factor fj is weighted by a weight factor wj:
I
Q,k=Σ1mwj·fj, (1)
where m is the number of parameters and k=1, 2, . . . , r, in which r is the number of the plurality of reference classes.
Since both fj are wj are positive real numbers, the membership index associated with a reference class Qk is a positive real number.
With reference to an above-described embodiment and in accordance with some embodiments, for each reference class, Qk, a plurality of weight factors is defined which are associated with the respective plurality of reference parameters, which weigh the membership degree factors f: w1, weight factor of Rave, w2 for the total density DT of bubbles, w3 for the total number N of the plurality of bubbles, w4 for the density DG of “large” bubbles, w5 for the density DM of “medium” bubbles, w6 for the density DP of “small” bubbles, w7 for the average minimum radius Rmin of the bubbles, and w8 for the average maximum radius Rmax of the bubbles. In this example, for each reference class of index k, IQ,k=Σ18wj·fj. For example, w1=0.025, w2=0.33, w3=0.25, w4=0.25, w5=0.25, w6=0.1, w7=0.025 and w8=0.025.
Preferably, after having determined the membership index to the k-th class, the process proceeds by normalizing the indexes IQ,k, obtaining for each k-th class the corresponding normalized membership index ĨQ,k and selecting the class with highest normalized membership index ĨQ,k.
In some preferred embodiments, the process comprises, once the highest normalized membership index ĨQ,k is selected, comparing such value with the normalized indexes ĨQ,k+1 and ĨQ,k−1 corresponding to the contiguous classes Qk+1 and Qk−1, checking if the differences (ĨQ,k−ĨQ,k−1) and (ĨQ,k−ĨQ,k+1) are greater than or less than or equal to a threshold difference value, for example equal to 0.5.
If the result of the checking is that both the differences (ĨQ,k−ĨQ,k−1) and (ĨQ,k−ĨQ,k+1) are greater than the threshold value, then the resulting class is Qk.
If instead (ĨQ,k−ĨQ,k−1) or (ĨQ,k−ĨQ,k+1) is not greater than the threshold value, the process selects the contiguous class Qk+1 or the contiguous class Qk−1 depending on whether ĨQ,k+1 is respectively greater or less than ĨQ,k−1 and calculates the resulting class as final class, Qfin, expressed by a positive real number comprised between the class Qmin and Qmax and determined by one of the following equations:
Q
fin=(Qk·ĨQ,k+Qk+1·ĨQ,k+1)/(ĨQ,k+ĨQ,k+1) (2)
if ĨQ,k+1>ĨQ,k−1, or
Q
fin=(Qk·ĨQ,k+Qk−1·ĨQ,k−1)/(ĨQ,k+ĨQ,k−1) (3)
if ĨQ,k+1<ĨQ,k−1.
The value Qfin obtained from Equation (2) or from Equation (3) represents the resulting class, i.e. the result at the output.
According to an example, a plurality of three reference classes, Q1, Q2 and Q3 are defined, the classes being indicative of the quality of the foam of a cappuccino, and two numerical parameters are taken as parameters associated with the bubbles identified and quantified in the processed image of the free surface of a cappuccino. The two parameters are the total density, DT, of bubbles and the total number of bubbles, N. Table 1 provides exemplifying values of the membership degree factor f, of the total density, fDT, and of the factor f of the total number of bubbles, fN, for each class.
In this example, the factors f are not weighted by a weight factor (wj=1, j=1, . . . , m), therefore the Equation (1) becomes: IQ,k=Σ1mfj.
From the sum of the factors f of the parameters, the class membership indices are IQ1=0.33, IQ2=1.33 and IQ3=0.33. By normalizing such values in a manner such that IQ1+IQ2+IQ3=1, one obtains (IQ1)n=0.165, (IQ2)n=0.665 and (IQ3)n=0.165. The cappuccino has 16.5% probability to be of class Q1, 66.5% to be of class Q2 and 16.5% to be of class Q3. The reference class is class Q2, which has a class index much greater than the class indices Q1 and Q3.
In case all the class indices are lower than a threshold value, it is not possible to establish any reference class and the process terminates by giving a message as a result, displayed on the display of the data terminal or of the dispensing machine, which indicates that the frothed milk of the cappuccino does not belong to any class.
If the difference between the highest class index and the class index contiguous to the first is less than a predetermined threshold value, for example 0.5, a linear combination is calculated based on the respective indices (Equation 2) and a real value is obtained that expresses the class of cappuccino with decimal numbers.
For example, if IQ1=0.1 (10%), IQ2=0.4 (40%) and IQ3=0.2 (20%), the class with the highest index is Q2, and of the classes contiguous thereto Q1 and Q3, Q3 has the higher index. The class representative of the quality of the cappuccino is a linear combination of IQ2 and IQ3, each weighted based on its respective score (in percentage values), I=(40×2+20×3)/60=2.3, which corresponds to the value of the reference class.
Preferably, each reference class is described by a class value, preferably represented by an integer, the plurality of classes being indicated by respective numerical values that range from a minimum value, Qmin, to a maximum reference class value, Qmax, the quality of the foam gradually improving from Qmin to Qmax (typically, Qmax is associated with an optimal or desired foam surface texture). In the preferred embodiments, the process proceeds with checking if the class value Qk determined in the image of the dispensed beverage is different from the nominal class value Qn desired by a user or considered optimal for the machine. If Qn=Qmax, the process checks if Qk<Qn.
If the user inserts a positive response to the question, the process continues and passes to step 45, in which the program retrieves the value (S)k of the flow section opening of the air flow-control valve associated with the class Qk from a database 46 which comprises at least one data table, preferably configured as a lookup table data structure, comprising a list of entries of air valve section opening values associated with a plurality of class values Q, from a minimum value (foam with little or no texture) to a maximum value (foam with very fine texture). The values of class Q comprise the values Qk and Qn.
Preferably, the program also retrieves a plurality of current machine operating parameters, i.e. in use during the dispensing operation, from a database 44, such as the value of the pump power (PWM)k and the temperature (T)k. As described above, the current machine operating parameters can be inserted by the user at the time of initialization of the application in the data terminal or can be automatically retrieved from the dispensing machine. Preferably, the data table of the database 46 comprises, as entries, other operating parameters of the machine such as the temperature of the milk (which in part depends on the quantity of milk and air in the air-milk mixture) and the pump working parameters so that the valve section opening values can be associated with any possible combination of input data and a corresponding configuration of output data.
The values reported in the data table and their associations can be derived from empirical formulas and/or from test results on a machine having the same characteristics and functions as the dispensing machine under examination.
In some embodiments, the database 46 comprises a plurality of data tables, each data table being associated with a machine model. The user inserts the model of the dispensing machine or, if the machine is in communication with the server, the data extraction step 45 comprises retrieving the machine model, and, subsequently, the data extraction step 45 selects the table associated with that machine model.
In some embodiments, the data base 46 comprises a plurality of tables for each machine model, each table being associated with a work condition for the preparation of frothed milk, for example in accordance with the type of milk used, e.g. skim milk or whole milk. In this case, the extraction step 45 comprises retrieving information data indicative of the type of milk used for preparing the beverage and selecting the relevant data table according to the received information data.
After the extraction from the database 46 of the value (S)k corresponding to the class Qk, and preferably of the values (PWM)k and (T)k from the database 44, the process extracts, from the data table in the database 46, a flow section opening value of the air valve, (S)n, associated with the nominal class Qn. It is to be understood that the extraction of the value (S)n from the data table can be executed before the extraction of the value (S)k.
In step 49, the process checks if a difference is present between the values of flow opening of the air valve corresponding to the different reference classes Qk and Qn, ΔS=(S)n−(S)k. In block 50, the process determines if |ΔS| is smaller than or equal to a threshold value, δ, or if it is greater than such threshold value. If |ΔS|≦δ, the difference is deemed to be insignificant and the process is interrupted (block 51). The threshold value δ can for example be equal to 0.05 (5%). If |ΔS|>δ, the process continues to block 52, outputting instruction data which comprises the value of the difference ΔS for adjusting the opening of the air valve.
The instruction data is transmitted to the control unit of the machine which controls the automatic execution of an adjustment of the flow section opening of the valve in a manner so as to increase or decrease the current opening value by the amount ΔS. The automatic adjustment comprises transmitting instructions for corrective actions in the form of electronic commands to the control unit of the machine and, upon reception of the instruction data, adjusting (by the control unit) the cross-sectional opening of the air valve so as to increase or decrease the current opening value by the amount ΔS.
In one embodiment, after the transmission of instructions to the dispensing machine, the process returns to step 41 and repeats the dispensing with the new flow section opening value of the air valve and repeats the process from the acquisition of a new image to the calculation of a reference class Qk and the sequence of the steps of the process of
If the checking executed at the block 56 gives negative result, the process terminates as indicated by the block 51. In this case, the user, after having seen the message that indicates the adjustment of the machine parameters to be carried out (i.e. adjusting of the air valve), can operate on the machine, imparting a command that actuates the adjusting of the air valve, if the air valve is a solenoid valve controlled by the control unit, or manually adjusting the opening of the air valve, if the valve is a manually-adjustable flow calibrator.
The various embodiments described above can be combined to provide further embodiments. These and other changes can be made to the embodiments in light of the above-detailed description. In general, in the following claims, the terms used should not be construed to limit the claims to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which such claims are entitled. Accordingly, the claims are not limited by the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
102016000025716 | Mar 2016 | IT | national |