A method of automatically assessing the quality of frothed milk foam in a milk-based beverage prepared by a dispensing machine (30, 35), 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 (Q k) 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 (Q k) being characterized by a plurality of numerical parameters, comprising the size and number of the plurality of bubbles, and wherein each reference class (Q k) is described by a respective plurality of numerical ranges ([a,b]) of the plurality of numerical parameters, a numerical range ([a,b]) corresponding to a numerical parameter of the plurality of numerical parameters for each reference class (Q k), whereby each reference class (Q k) is defined by a respective plurality of numerical ranges ([a,b]) 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 ([a,b]) of said numerical parameter, the numerical ranges ([a,b]) being associated with their respective reference classes (Q k), and - according to the result of the step of checking, assigning a current reference class (Q k) of the plurality of reference classes (Q k), to thereby assign a foam quality reference class (Q k) to the acquired image of the beverage containing frothed milk. - 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 (Q k) 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 (Q k) being characterized by a plurality of numerical parameters, comprising the size and number of the plurality of bubbles, and wherein each reference class (Q k) is described by a respective plurality of numerical ranges ([a,b]) of the plurality of numerical parameters, a numerical range ([a,b]) corresponding to a numerical parameter of the plurality of numerical parameters for each reference class (Q k), whereby each reference class (Q k) is defined by a respective plurality of numerical ranges ([a,b]) 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 ([a,b]) of said numerical parameter, the numerical ranges ([a,b]) being associated with their respective reference classes (Q k), and - according to the result of the step of checking, assigning a current reference class (Q k) of the plurality of reference classes (Q k), to thereby assign a foam quality reference class (Q k) to the acquired image of the beverage containing frothed milk.