CN108022239B - Bubbling wine browning process detection device and method based on machine vision - Google Patents

Bubbling wine browning process detection device and method based on machine vision Download PDF

Info

Publication number
CN108022239B
CN108022239B CN201711266254.8A CN201711266254A CN108022239B CN 108022239 B CN108022239 B CN 108022239B CN 201711266254 A CN201711266254 A CN 201711266254A CN 108022239 B CN108022239 B CN 108022239B
Authority
CN
China
Prior art keywords
image
channel
browning
sample
ave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711266254.8A
Other languages
Chinese (zh)
Other versions
CN108022239A (en
Inventor
张卫正
钱慎一
张伟伟
刘岩
李萌
张焕龙
陈启强
邹东尧
甘勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou University of Light Industry
Original Assignee
Zhengzhou University of Light Industry
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou University of Light Industry filed Critical Zhengzhou University of Light Industry
Priority to CN201711266254.8A priority Critical patent/CN108022239B/en
Publication of CN108022239A publication Critical patent/CN108022239A/en
Application granted granted Critical
Publication of CN108022239B publication Critical patent/CN108022239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30128Food products

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a device and a method for detecting a browning process of sparkling wine based on machine vision, which are used for solving the problems of complex detection process, high cost and poor applicability in the prior art; the method comprises the steps of collecting a sample placed on a diffuse light source panel at the bottom of a collection box by using a camera of a smart phone to obtain a digital image of the sparkling wine, carrying out graying, binaryzation, corrosion and other treatment on the digital image by using machine vision and image processing technologies, analyzing three channels of RGB (red, green and blue) of the image, and taking the attenuation percentage of a blue channel as a quality mark of the sparkling wine, wherein the attenuation percentage is highly related to the absorbance at 420nm and the content of 5-hydroxymethyl-2-furfural. The method only needs to obtain the transmission images of the sparkling wine samples in different browning stages, can simultaneously analyze a plurality of brands of sparkling wine samples, avoids complex sample processing, can analyze a plurality of samples, and has the advantages of high speed, low cost and no need of expensive professional instruments and other chemical reagents.

Description

Bubbling wine browning process detection device and method based on machine vision
Technical Field
The invention relates to the technical field of foaming wine browning and image processing, in particular to a device and a method for detecting a browning process of foaming wine based on machine vision.
Background
At the present time, sparkling wines are almost all produced around the world, and consumer enjoyment and demand for sparkling wines is increasing. The foaming principle is that sugar and yeast are added into the brewed wine to perform the second alcoholic fermentation in a closed container, and carbon dioxide generated in the fermentation process is limited in the bottle to be the source of bubbles in the wine (Serra-Cayuela A, Journal M, Riu-Austell M, et al. kinetics of fermentation, phenolics, and 5-hydroxymethane fuel in commercial specialty fibers [ J ]. Journal of agricultural & Food Chemistry,2014,62(5 1159-. The added yeast converts the added sugar into alcohol and carbon dioxide, causing the bubbles to tumble, which is one of the most important features of sparkling wine.
Sparkling wine consumption has increased rapidly, according to the statistics of the international wine organization, sparkling wine production has increased by 40% in recent years, sparkling wine accounts for 8% of the global wine production. China and the united states have become the prime forces driving this growth.
Spanish slips and french champagne are the best known brands of sparkling wine. Slips are high quality sparkling wines produced by traditional methods protected by the place of origin naming system. The grapes used in kava are carefully selected and care must be taken during the juicing process to obtain the best juice at the desired maturity. Then pouring the grape juice into a stainless steel barrel for low-temperature fermentation, standing, tasting to determine the quality of the grape juice, and selectively blending. After the final blending, the wine is bottled and placed in a wine cabinet for at least 9 months, but generally this shelf life is longer. During this time, the wine will undergo secondary fermentation in the bottle, forming the wine's complex organoleptic properties such as aroma, color and foaming properties, becoming sparkling wine and producing yeast sediment. After the aging period, the yeast can be carefully taken out, the bottle mouth is filled with the same batch of wine, the bottle mouth is sealed by a cork stopper, and a seal is added. Furthermore, there are two different categories depending on the duration of ageing in the bottle: at least 15 months of Reserva, at least 30 months of Gran Reserva (Serra-Cayuela A, Aguilra-Curie M A, Riu-Austell M, et al, browning, biological imaging and commercial storage of the Cava sparking line and the use of5-HMF as a quality marker [ J ]. Food research International,2013,53(1): 226-). 231. Besides improving the quality of the grape, the production cost is also influenced by the aging time, and the final price of the aged grape wine is higher than that of the new grape wine.
Wine is a dynamic product in terms of physicochemical and organoleptic properties, and therefore undergoes complex chemical changes during biological ageing and storage. These chemical changes may cause changes in sensory characteristics, particularly aroma, flavor, and color (royal jade peak. study of factors affecting the aroma of wine [ D ]. denna: eastern Shandong light industry academy, 2010).
Browning, which is an oxidation process involving sugars, lipids, amino acids and phenols (Li H, Guo a, Wang H. mechanismso acidic browning of wine [ J ]. Food chemistry,2008,108(1):1-13.), reduces the organoleptic quality of wine (changes in color, flavor and aroma, and increase in astringency), and must therefore be controlled during processing and storage. Once the bottle is sealed, browning cannot be regulated anymore. Therefore, breweries must find markers and parameters that indicate browning of sparkling wines and detect browning of sparkling wines by technical means. There is a great need in actual production to develop a fast and reliable method of monitoring the degree of browning and to define parameters indicative of the quality of sparkling wines.
Prior studies have proposed several methods for quantifying and characterizing the browning process of sparkling wines based on different quality marking and measuring techniques. Such as Ultraviolet-visible spectroscopy (UV-VIS) and High Performance Liquid Chromatography (HPLC) (Serra-Cayuela A, Aguilra-Curie M A, Riu-Automatell M, et al, browning and compacting biological imaging and commercial of Cava spackling wire and the use of5-HMF as a quality marker [ J ] Food Research International,2013,53(1):226 storage 231.).
Absorbance at 420nm wavelength (A)420) Used as a parameter for monitoring browning of white wine (Kallithraka S, Salacha M I, Tzourou I. Change in phenolic composition and antioxidant activity of white wine reduced bottle storage J. corrected browning test for white wine].Food Chemistry,2009,113(2):500-505.),A420The increase in value is directly related to the browning process (Ibarz A, Pagan J, Garza S. kinetic models of non-enzymatic browning initial pure [ J.)].Journal of the Science of Food&Agriculture,2000,80(8): 1162-. However, in previous studies, A was used as a quality marker for kava sparkling wines420The parameters proved to have low sensitivity and low specificity, after which the 5-hydroxymethyl-2-furfural (5-HMF) content was used instead as a more efficient marker (Serra-Cayuela A, Aguilera-Curie M A, Riu-Austell M, et al, browning during biological labeling and commercial storage of Cava spackling wire and the use of5-HMF as quality marker [ J]Food Research International 2013,53(1): 226-.
Among the existing research methods, the successful use of fluorescence excitation-emission spectroscopy in combination with parallel factor analysis for monitoring the browning process of four sparkling wines has been identified as a method for monitoring A420Or a rapid alternative method for realizing browning detection by using the content of 5-HMF. In order to investigate better alternatives, researchers have proposed a new method based on colorimetric techniques for monitoring the browning process in kava sparkling wines in accelerated browning tests. The degree of Browning was measured using a Lab color pattern defined by the International Commission on illumination (CIE) or a Lab color pattern created by Richard. S.Hunter (Raquel P FG, Joao Barroca M.evaluation of the Browning Kinetics for Browning dynamics and PearsSubmitted to conductive Drying [ J]Current Biochemical Engineering,2014,1:165- & 172.), but these methods require the use of a dedicated colorimeter or spectrophotometer.
In recent years, as the performance of sensors of smartphones is improved, the research on applications based on smartphones is also increasing. Compared with professional instruments and equipment in a laboratory, the smart phone has the advantages of low cost, convenience in carrying, capability of acquiring and analyzing on site, easiness in sharing results and the like.
Disclosure of Invention
Aiming at the technical problems that a special colorimeter or a spectrophotometer is needed to be used for browning detection of the existing sparkling wine, the detection process is complex, and the applicability is not strong, the invention provides the device and the method for detecting the browning process of the sparkling wine based on machine vision.
In order to achieve the purpose, the technical scheme of the invention is realized as follows: a sparkling wine browning process detection device and method based on machine vision comprises the following steps:
the method comprises the following steps: building an experimental device and preparing a sample;
step two: acquiring a sample image by using a camera of a smart phone, and acquiring an RGB image IGiCarrying out graying and binarization processing to obtain a binary image BINi,i=1,2,…,6;
Step three: BIN imageiAll the pixels in the image are inverted to obtain an image IRi(ii) a Using pairs of structural elements IRiCorroding to obtain an image IERiObtaining a constricted region of the well containing the sample;
step four: image IERiCarrying out connected region marking, and identifying each type of sample according to the connected region marking;
step five: by image IG1The average of the R channel, G channel and B channel of the area of the contracted sample well of the standard original sample of (1) is taken as a reference, and a correction factor is calculated for the image IGiColor correction is carried out on each channel to obtain a corrected image IGCi,i=2,…6;
Step six: computingCorrected image IGCiSelecting a channel B as a browning parameter according to the average value of R, G, B channels in the area of the shrinkage hole of each brand sample;
step seven: calculating the color invariant of the B channel and the blue decay percentage, wherein the blue decay percentage has a linear relation with time, and the blue decay percentage is consistent with the browning process of the sparkling wine and is used as a quality mark for browning detection.
The samples are four popular brands of kava foaming wine of Brut, Brut Reserva, Brut Gran Reserva and Semiseco, and the four wines have different sugar contents and production years; 10mL of each of the solutions were taken and charged into 420 mL amber vials in N2Degassing under airflow; placing the 4 amber vials containing different brands of sparkling wine in a dark environment and maintaining the ambient temperature at 8 ℃; the different brands of sparkling wines in the 4 bottles were used as standard samples for the subsequent 10-day experiment, and the 4 amber vials containing the standard samples were named Bottle1, Bottle2, Bottle3, Bottle 4; then, 10mL of each of the four brands of sparkling wine was filled into 4 amber vials of 20mL and placed in N2Degassing under airflow; placing the 4 amber vials filled with sparkling wines of different brands in a completely dark environment, then placing the vials in an oven, setting the constant temperature of 65 +/-1 ℃, and performing an accelerated browning test; the 4 amber vials containing the accelerated browning samples were designated Bottle5, Bottle6, Bottle7, Bottle 8; collecting sample information at sampling time points of 0, 2, 4,6, 8 and 10 days, wherein the collection time interval is 48 hours; at each sampling time point, (1) 1 part of each standard sample of Brut, BrutReserva, Brut Gran Reserva and Semiseco is extracted firstly, placed in the holes in the middle of a 96-hole plate from top to bottom in sequence, vertically arranged in 1 row and named as the 1 st row; (2) then 4 parts of samples of Brut, Brut Reserva, Brut GranReserva and Semiseco which accelerate browning are extracted, and then 1 column of each brand is put into the 2 nd to 5 th columns of a 96-well plate in sequence.
The experimental device comprises a collection box and a light source, wherein the light source is arranged below the collection box, a pore plate used for containing a sample is arranged on the lower portion of the collection box, a collection hole is formed in the top of the collection box, and the collection hole is located right above the pore plate.
The collecting box is made of a black foam core plate, and matte black velvet paper covers the inside of the collecting box; the collecting box is of a cuboid structure with the height of 80cm, and the difference between a diagonal line and a central vertical light path is less than 5%; the light source is a diffuse reflection light source with controllable intensity; the pore plate is a 96 pore plate, is made of imported optical transparent pure polystyrene and is sterilized by gamma rays.
The method for acquiring the sample image comprises the following steps: arranging the kava sparkling wine samples in the middle of a pore plate by using a 0.3ml micropipette, placing the pore plate on a panel of a light source, covering an acquisition box on the pore plate, positioning an acquisition hole above the middle of the pore plate, placing a smart phone on the acquisition hole at the top of the acquisition box, and obtaining an image with the highest resolution by using a built-in camera of the smart phone and storing the image as JPEG; the standard raw samples are arrayed in a well plate and all samples are taken in the same image.
The method for carrying out graying and binarization processing on the obtained RGB image comprises the following steps:
IG (image group) of RGB (Red Green blue) image obtained by smart phoneiThe average value of R, G, B three components of each pixel is used as the Gray value of the image, i.e. Grayi(x,y)=(RIG,i(x,y)+GIG,i(x,y)+BIG,i(x, y))/3 to obtain a Gray image Grayi
For Gray scale image GrayiAn optimal threshold T is calculated using Otsu's algorithm, which is a gray value gt that maximizes σ: assuming that the gray level of the gray image is L, the gray range is [0, L-1]]The optimal threshold for calculating the gray level image by using the Ostu method is as follows: max [ w [ ]0(gt)×(u0(gt)-u)^2+w1(gt)×(u1(gt)-u)^2)]Wherein w is0As a foreground proportion, u0Is the mean value of the gray levels of the foreground, w1As background proportion, u1Is the background gray level mean value, and u is the mean value of the whole gray level image.
T is the optimal threshold value of the segmentation image, the gray level image is segmented into 2 parts according to the optimal threshold value T, and the binary image BIN is obtainedi(x,y):
Figure BDA0001494635100000041
Wherein, Grayi(x, y) is the value of the pixel at (x, y) in the grayscale image;
BIN binary imageiThe binary image IR is obtained by inversion (pixel value becomes 0 when 1, and pixel value becomes 1 when 0)i(ii) a Adopting imeriode function in Matlab to carry out IR on binary imageiCarrying out corrosion operation: IERi=imerode(IRi,D1) Wherein, IERiRepresenting a binarized image IRiCircular structural element D with diameter of 81The image obtained after etching, i ═ 1,2,3, ·, 6; d1Stral ('disk',4), disk denotes a circular shape.
Image IERiThe method for marking the connected region comprises the following steps: adopting a connected region mark function bwleabel in Matlab: [ LJi,LNUMi]=bwlabel(IERi8), wherein, LNUMiRepresentation image IERiNumber of interconnected regions, LJiRepresentation and image IERiMatrices of equal size, the matrix LJiContains a label image IERiClass label for each connected region, the labels having values of 1,2, …, LNUMiAnd 8, searching a connected region according to 8 neighborhoods;
the method for identifying the position of each type of sample comprises the following steps: the connected regions labeling treats each contracted sample region as a connected region, using, for each connected region, the regionprops function in Matlab: STATSi=regionprops(LJi'Central'), the 'Central' attribute is the Centroid of the connected region, STATSiContains an image IERiOf (a) each connected region (centroid coordinates (RX)i,nu,LYi,nu) And the subscript nu has a value of 1-20.
The method for acquiring the corrected image comprises the following steps: by image IG1Of the standard original sample, the R channel, the G channel and the B channel of the area of the constricted sample wellValue R1,ave、G1,aveAnd B1,aveFor reference, the mean value of the R channel, the G channel and the B channel of the area of the contracted sample hole where the standard original sample in the images acquired by the subsequent different time sampling points is Ri,ave、GiaveAnd Bi,aveFor reference, three correction factors C are calculatedi,R、Ci,GAnd Ci,B
Figure BDA0001494635100000051
Wherein, Ci,R、Ci,G、Ci,BAs an image IGiI ═ 2,3, …, 6;
image IGiR channels R of all pixel pointsIG,iMultiplying by Ci,RG channel GIG,iMultiplying by Ci,GThe B channel BIG,iMultiplying by Ci,BI 2,3, …,6, obtaining new RGB three channels, and forming a corrected image IGCi
Image IER1The column coordinate of the centroid coordinate in (1) is LY1,1~LY1,4The pixel point of the connected region is set to 1, and other pixel points are set to 0 to obtain a matrix JZ1Original image IG1The values of the R channels of all the pixel points in (1) are used as a matrix RIG,1Original image IG1The values of the G channels of all the pixel points in (1) are used as a matrix GIG,1Original image IG1The values of the B channels of all the pixel points in (1) are used as a matrix BIG,1(ii) a Will matrix JZ1Dot-by-dot matrix RIG,1Obtaining a matrix DCR1Will matrix JZ1Dot-product matrix GIG,1Obtaining a matrix DCG1Will matrix JZ1Dot-by-dot matrix BIG,1Obtaining a matrix DCB1
R1,ave=sum(sum(DCR1))/sum(MJ1),
G1,ave=sum(sum(DCG1))/sum(MJ1),
B1,ave=sum(sum(DCB1))/sum(MJ1),
Of these, sum (DCR)1) Is a matrix DCR1Sum of all the element values in (1), sum (DCG)1) Is a matrix DCG1Sum of all the element values in (1), sum (DCB)1) Is a matrix DCB1Sum of all element values in, sum (MJ)1) Is an image IER1The column coordinate of the centroid coordinate in (1) is LY1,1~LY1,4Total number of pixels of connected region, MJ1=regionprops(JZ1The 'Area' attribute is the number of pixels in each Area of the image.
IGC sample imageiThe B channel of (a) is converted to a corresponding color invariant: bi=BIGC,i,ave/(RIGC,i,ave+GIGC,i,ave+BIGC,i,ave) Calculating the blue decay percentage% Bt
Figure BDA0001494635100000052
Wherein, bt0B channel invariant when t is 0, BtIs the color invariant of the B channel at time t; percentage of blue decay% BtThe browning process is shown as follows: y ═ Y0+kt,
Wherein Y is the absorbance at 420nm or the 5-HMF content or% Bt,Y0Is the absorbance at 420nm or the 5-HMF content or% BtT is time and k is the velocity constant.
The invention has the beneficial effects that: placing a foaming wine sample in a hole in the middle of a 96-hole plate, placing the hole plate on a diffuse light source panel at the bottom of an acquisition box, taking a smart phone as image acquisition equipment, obtaining a digital image of the foaming wine from the acquisition hole at the top of the acquisition box, performing digital image processing and analysis, detecting the browning of the foaming wine in an RGB color space, and determining the browning degree of the foaming wine; in comparison to two widely used methods of studying absorbance at 420nm and obtaining 5-HMF content, the percentage of blue channel decay is highly correlated with the commonly used browning index and is a new marker for browning of sparkling wines. The invention can simultaneously analyze the browning samples of the foaming wines of a plurality of brands by only acquiring the transmission images of the foaming wine samples at different browning stages, avoids complex sample processing, can synchronously analyze a plurality of samples, has high speed and low device price, and does not need expensive professional instruments and other chemical reagents.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the present invention.
Fig. 2 is a schematic mechanism diagram of the image capturing apparatus of the present invention.
FIG. 3 shows the arrangement sequence of the samples according to the invention.
Fig. 4 is a grayscale image of a sample of the invention.
FIG. 5 is a binarized image of a sample of the present invention.
FIG. 6 is an image after etching according to the present invention.
Fig. 7 is a schematic representation of the mean change of the R, G, B channels for each brand sample area due to accelerated browning.
Fig. 8 is a percentage image of B-channel decay versus heating time for each brand sample.
FIG. 9 is an image of absorbance at 420nm versus percent blue channel attenuation for each brand sample.
FIG. 10 is a graph of5-HMF content versus percent blue channel decay for each brand sample.
Figure 11 is a qualitative comparison of several algorithms.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, a machine vision-based foamed wine browning process detection device and method includes the following steps:
the method comprises the following steps: and (4) building an experimental device and preparing a sample.
Four marketable brands of kava sparkling wines were used as subjects, including Brut, Brut Reserva, Brut Gran Reserva and Semiseco, with the four wines having different sugar contents and production years. The quality parameters for each type of kava wine at the initial sampling are shown in table 1. The content of sugar, alcohol, pH, free and total sulfur dioxide of each sample was measured using the standard methods of the international grape and wine organization. Wherein the alcohol content meets the value marked on the kava wine bottle.
TABLE 14 quality parameters of Cava sparkling wines of the brands
Figure BDA0001494635100000071
Four brands of sparkling wine, 10mL each, were filled into 420 mL amber vials in N2Degassing under a gas stream. The 4 amber vials containing different brands of sparkling wine were then placed in a dark environment and stored at an ambient temperature of 8 ℃ for a period of 10 days with negligible browning. Different brands of sparkling wine in the 4 bottles were used as standard samples for subsequent experiments, and the 4 amber vials containing the standard samples were named Bottle1, Bottle2, Bottle3, Bottle 4.
Next, 10mL of each of the four brands of sparkling wine was placed in 4 amber vials of 20mL and placed in N2Degassing under a gas stream. The 4 amber vials containing different brands of sparkling wine were placed in a completely dark environment and then placed in an ovenA constant temperature of 65. + -. 1 ℃ was set, and an accelerated browning test was conducted. And the 4 amber vials containing the accelerated browning samples were designated Bottle5, Bottle6, Bottle7, Bottle 8.
Sample information was collected on days 0, 2, 4,6, 8 and 10 (6 sampling time points) at 48 hour intervals. At each sampling time point, (1) 1 part of each standard sample of Brut, Brut Reserva, Brut Gran Reserva and Semiseco is extracted firstly, placed in the holes in the middle of a 96-hole plate from top to bottom in sequence, vertically arranged in 1 row and named as the 1 st row; (2) then, 4 parts of samples of Brut, Brut Reserva, Brut Gran Reserva and Semiseco which accelerate browning are extracted, and then 1 column of each brand is put into the 2 nd to 5 th columns of a 96-well plate in sequence, as shown in figure 3. Thus, a total of 120 samples (6 sampling time points × 4 Cava brands × 5 parts (4 accelerated browning samples and 1 standard sample)) were analyzed.
The experimental device comprises a collection box 2 and a light source 4, wherein the light source 4 is arranged below the collection box 2, a 96-hole plate 3 used for containing a sample is arranged on the lower portion of the collection box 2, a collection hole 1 is formed in the top of the collection box 2, and the collection hole 1 is located right above the hole plate 3. The collection box 1 is made of a black foam core board, and is covered with matte black velvet paper to eliminate internal light reflection. The collection box 1 is a cuboid with a height of 80cm such that the difference between the diagonal and central vertical light paths is less than 5% in order to reduce the difference caused by light rays passing through different paths. The light source 4 is a diffuse reflective light source with controllable intensity. The well plate 3 is a 96 well plate made of imported optical transparent pure polystyrene and sterilized by gamma ray.
Step two: and acquiring a sample image by using a camera of the smart phone, and carrying out graying and binarization processing on the acquired RGB image.
Slips-bubbled wine samples were arrayed in wells in the middle of well plate 3 using micropipettes (0.3ml), 0.15ml sample was added per well, well plate 3 was placed on the face plate of light source 4, collection box 2 was covered on well plate 3, and collection well 1 was located directly above well plate 3. The smartphone was placed on the acquisition hole 1 at the top of the acquisition box, and the image was obtained at the highest resolution (3888 × 5152-20030976 pixels) using the built-in camera of the smartphone and saved in JPEG format. When the samples are collected every time, all the samples in the pore plate are obtained to be in the same image, so that the influence caused by the fluctuation of an illumination source or the shaking of the smart phone is avoided. To improve efficiency and allow comparison between different sample images, each time an image is taken, a standard primary sample is placed in column 1 of the well plate, taken from either of the dotted 1, dotted 2, dotted 3, and dotted 4 at each time point used.
The samples were placed in the center of a 96-well plate and arranged in order from left to right, with column 1 being the standard raw sample (1 for each sparkling wine, 4 from Bottle1, Bottle2, Bottle3 and Bottle4, respectively), column 2 being the Brut sample 4 (from Bottle5), column 3 being the Brut Reserva sample 4 (from Bottle6), column 4 being the Brut GranReserva sample 4 (from Bottle7), and column 5 being the Semiseco sample 4 (from Bottle8), as shown in FIG. 3.
Images of samples containing both the accelerated browning sparkling wine and the standard sparkling wine were first acquired, and images containing both the browning samples and the standard samples were collected at subsequent sampling time points. By acquiring 6 images at 6 sampling time points, at 1 st, an image IG of the standard sample in the well plate and the sample subjected to accelerated browning for 0 day was acquired1(ii) a At pass 2, images IG of the standard sample in the well plate and the sample with accelerated browning over 2 days were taken2(ii) a At pass 3, images IG of the standard sample in the well plate and the sample with accelerated browning over 4 days were taken3(ii) a At 4 th time, images IG of the standard sample in the well plate and the sample with accelerated browning over 6 days were taken4(ii) a At the 5 th time, images IG of the standard sample in the well plate and the sample with accelerated browning over 8 days were obtained5(ii) a At the 6 th time, an image IG of the standard sample in the well plate and the sample subjected to accelerated browning for 10 days was obtained6. Before images are acquired at each sampling time point, samples are taken from the Bottle 1-Bottle 8 and placed in the corresponding positions in the well plate, as shown in fig. 3. When the image of the sample is collected, each column with the sample is ensured to be in a vertical state in a preview window of the camera to the greatest extent, so that the obtained image is close to the ideal position for placing the sample in the image 3, and the subsequent images are convenient to useAnd (6) image processing.
Uniformity of illumination and measurement was studied using a white board, which was placed on a diffuse reflective light source, and an image IB (3888 × 5152 — 20030976 pixels) was obtained at the highest resolution using a built-in camera of a smartphone, and the image IB was equally divided into 322 × 243 — 78246 blocks (each block represented as BK)num1,num2Num1 has a value of 1 to 322, num2 has a value of 1 to 243), and the size of each block is 16 × 16 to 256 pixels. Statistics BKnum1,num2RGB three-channel mean value BKnum1,num2,ave
Figure BDA0001494635100000091
Wherein R isIB(x,y)、GIB(x, y) and BIB(x, y) respectively represent the value of the R channel, the value of the G channel, and the value of the B channel at the pixel point (x, y) in the image IB. The value range of x is 0-3887, and the value range of y is 0-5151.
Statistics BKnum1,num2,aveMAX of (3)bkAnd minimum MINbkCalculated, maximum difference (MAX)bk-MINbk)/MAXbkLess than 1% indicates less influence of external illumination, satisfying the requirement of the present invention for uniformity of illumination. The present invention uses image data of the center position of the aperture plate to minimize errors.
IG (image group) of RGB (Red Green blue) image obtained by smart phonei(value of i is 1-6) converting the image into a Gray image GrayiAnd adopting an average value method, namely extracting the average value of RGB three channels as a gray value:
Grayi(x,y)=(RIG,i(x,y)+GIG,i(x,y)+BIG,i(x,y))/3
wherein R isIG,i(x,y)、GIG,i(x,y)、BIG,i(x, y) are each an image IGiThe value of the R, G, B channel at pixel point (x, y) in (a); grayi(x, y) represents the gray value of the gray image at the pixel point (x, y), as shown in fig. 4.
The threshold needs to be determined to be able to apply to the Gray image GrayiCarry out binarizationThe maximum inter-class variance method (Ostu) is simple, stable and effective in processing, and is a method for determining a threshold value frequently adopted in practical application. The Ostu algorithm is considered as a better algorithm for selecting the threshold value in image segmentation, and the algorithm is not influenced by the brightness and the contrast of an image, so the Ostu algorithm is widely applied to digital image processing. The Ostu algorithm divides an image into a background part and a foreground part according to the gray characteristic of the image. The larger the inter-class variance between the background and the foreground is, the larger the difference between two parts constituting the image is, and when part of the foreground is wrongly classified as the background or part of the background is wrongly classified as the foreground, the difference between the two parts is reduced, so that the segmentation with the largest inter-class variance means the probability of wrong classification is the smallest.
Assuming that the gray level of the gray image is L, the gray range is [0, L-1], and the optimal threshold of the gray image is calculated by using the Ostu algorithm as follows:
σ=Max[w0(gt)×(u0(gt)-u)^2+w1(gt)×(u1(gt)-u)^2)]
wherein, w0As a foreground proportion, u0Is the mean value of the gray levels of the foreground, w1As background proportion, u1And u is the average value of the whole gray image, so that the gray value gt with the maximum sigma is the optimal threshold value T of the segmentation image.
For Gray scale image Grayi(x, y) using the above criteria to find the optimal threshold T, dividing the image into 2 parts, and obtaining the binary image BINi(x,y)。
Figure BDA0001494635100000101
Wherein, Grayi(x, y) is a Gray image GrayiThe value of the pixel at the middle (x, y) position, the value of i is 1-6 (6 images are collected in total, 1 image is obtained each time), and the image BIN after binarizationi(x, y) is shown in FIG. 5.
Step three: BIN imageiAll the pixels in the image are inverted to obtain a binary image IRi(ii) a Using structural elements for IR imagesiCorroding to obtain an image IERiObtaining a sample containingThe constricted region of the well prevents the edges of the well containing the sample from interfering with the image processing of the sample.
D1A circular structural element with a diameter of 4 is represented, whose creation function is:
D1=strel('disk',4)
meaning that a circular structuring element is created with a radius of 4 (i.e. a diameter of 8), disk representing a circular shape. The function of the strel function is to construct a structural element (so-called structural element), which can be regarded as a small image, and is usually used for morphological operations (such as expansion, erosion, opening and closing operations) of the image.
BIN imageiAll the pixels in the image are inverted to obtain an image IRi. Namely image BINiIf the value of the original pixel point is 0, the value is changed into 1; the original pixel value is 1, which becomes 0.
Adopting imeriode function in Matlab to carry out IR on binary imageiThe etching operation in the morphological treatment is carried out by the following specific operation method:
IERi=imerode(IRi,D1)
wherein, IERiRepresenting a binarized image IRiCircular structural element D with diameter of 81The image obtained after etching, i ═ 1,2, ·, 6. As shown in fig. 6. Using circular structural elements D1For the binary image IRiAnd performing morphological corrosion treatment to remove the boundaries of the empty holes not containing the samples in the image and simultaneously remove the boundaries of the holes containing the samples to obtain the image of the central area of the sample, namely the contraction area of the holes containing the samples, so as to prevent the edges of the holes containing the samples from interfering the image treatment of the samples. In the area of the hole containing the sample in the image, the sample area in the image is corroded by a morphological corrosion method (the purpose of shrinking the sample area is achieved), and only the pixels inside the hole are used, so that the influence of the boundary of the hole is removed.
Step four: image IERiAnd carrying out connected region marking, and identifying the position of each type of sample according to the connected region marking.
Image IERiConnected region labeling is performed for processing images of wells containing different samples. If E is communicated with F and F is communicated with G, E is communicated with G. Visually, the dots that are connected to each other form one area, while the dots that are not connected form a different area. Such a set of all points that are connected to each other is called a connected region. The most important method for analyzing the binary image is connected region marking, each single connected region forms an identified block through marking white pixels (targets) in the binary image, and geometric parameters such as areas, outlines, circumscribed rectangles, centroids and invariant moments of the blocks can be further obtained.
The invention adopts a connected region marking function bwleabel in Matlab: [ LJi,LNUMi]=bwlabel(IERi8), wherein LNUMiRepresentation image IERiThe number of interconnected regions, LNUM because there are 20 samples in each imagei=20。LJiRepresentation and IERiBeing matrices of equal size, LJiThe matrix contains the label image IERiClass label for each connected region, the labels having values of 1,2, …, LNUMiAnd 8 in the formula is to search a connected region according to 8 neighborhoods.
The algorithm of the function bwleael is to traverse the image once and note down the equivalent pairs of consecutive blobs and labels in each row (or column), and then relabel the original image by the equivalent pairs. The algorithm is one of the high efficiency at present, a sparse matrix is used in the algorithm, and a Dulmage-Mendelsohn decomposition algorithm is used for eliminating equivalence pairs.
Image IERiPerforming connected region labeling, wherein each contracted sample region is used as a connected region, and for each connected region, adopting a regionprops function in Matlab: STATSi=regionprops(LJi'Centroid'), the 'Centroid' attribute is the Centroid of the region (i.e., the Centroid of the connected region).
STATS calculated according to regionprops functioniContains an image IERiEach of (1) toCentroid coordinates (RX) of each connected region (i.e., each sample region)i,nu,LYi,nu) Wherein nu is 1-20. The centroids of the connected regions are arranged as LY according to the column coordinate from small to largei,1~LYi,20With the smallest column coordinate LYi,1~LYi,4The 4 sample regions are standard sample regions in the sample image (the column has four samples, namely, a Brut standard sample, a BrutReserva standard sample, a Brut Gran Reserva standard sample and a Semiseco standard sample from top to bottom); column coordinate is LYi,5~LYi,8The 4 sample regions are Brut sample regions in the sample image; column coordinate is LYi,9~LYi,12The 4 sample regions are Brut Reserva sample regions in the sample image; column coordinate is LYi,13~LYi,16The 4 sample regions are Brut Gran Reserva sample regions in the sample image; column coordinate is LYi,17~LYi,20These 4 sample regions are referred to as semisecoco sample regions in the sample image.
Step five: by image IG1The average of the R channel, G channel and B channel of the area of the contracted sample well of the standard original sample of (1) is taken as a reference, and a correction factor is calculated for the image IGiColor correction is carried out on each channel to obtain a corrected image IGCi,i=2,…6。
Image IER1The column coordinate of the centroid coordinate in (1) is LY1,1~LY1,4The pixel point of the connected region is set to 1, and other pixel points are set to 0 to obtain a matrix JZ1Then the original image IG1The values of the R channels of all the pixel points in (1) are used as a matrix RIG,1Original image IG1The values of the G channels of all the pixel points in (1) are used as a matrix GIG,1Original image IG1The values of the B channels of all the pixel points in (1) are used as a matrix BIG,1. Will JZ1Dot multiplied by RIG,1Obtaining the DCR1A JZ1Dot-ride GIG,1To obtain DCG1A JZ1Dot-by-dot BIG,1To obtain DCB1
The regionprops function in matlab is used: MJ1=regionprops(JZ1'Area'), calculating image IG1The mean of the R channels of the area of the shrinkage cavity of the standard sample. The 'Area' attribute contained in the function is the total number of pixels in each Area of the image.
R1,ave=sum(sum(DCR1))/sum(MJ1),
G1,ave=sum(sum(DCG1))/sum(MJ1),
B1,ave=sum(sum(DCB1))/sum(MJ1),
Of these, sum (DCR)1) Is a matrix DCR1Sum of all the element values in (1), sum (DCG)1) Is a matrix DCG1Sum of all the element values in (1), sum (DCB)1) Is a matrix DCB1Sum of all element values in, sum (MJ)1) Is an image IER1The column coordinate of the centroid coordinate in (1) is LY1,1~LY1,4Total number of pixels of the connected component. In the same way, G is obtained by calculation1,aveAnd B1,ave
Similarly, calculating to obtain an image IGiThe mean value R of R channel, G channel and B channel of the area of the constricted sample well of the standard samplei,ave、Gi,aveAnd Bi,aveWhere i is 2,3, …, 6.
Color correction is then performed. By image IG1Of the standard raw sample, the mean value R of the R channel, G channel and B channel of the area of the constricted sample well1,ave、G1,aveAnd B1,aveImage IG collected for reference and subsequent different time sampling pointsi(i-2, 3, …,6) of the standard original sample in the well region of the average of R, G and B channels is Riave、Gi,aveAnd Bi,aveFor reference (where i ═ 2,3, …,6), three correction factors C were calculatedi,R、Ci,GAnd Ci,B(where i ═ 2,3, …, 6).
Figure BDA0001494635100000121
Wherein, Ci,R、Ci,G、Ci,BAs an image IGiR channel, G channel, and B channel.
Image IGiR channels R of all pixel pointsIG,iMultiplying by Ci,RG channel GIGI times Ci,GThe B channel BIG,iMultiplying by Ci,BObtaining new RGB three channels, and the formed image is named as a correction image IGCiWhere i is 2,3, …, 6.
Step six: calculating a corrected image IGCiThe B channel was selected as a browning parameter, as an average of R, G, B channels in the area of the constricting orifice for each brand sample.
Obtaining the corrected image IGC by the previous methodi(i-1, 2, …,6) mean R of R, G, B three channels in the constricted region of accelerated browning samples for each brandIGC,i,ave、GIGC,i,ave、BIGC,i,aveAnd drawing, as shown in fig. 7. Fig. 7 shows the evolution of R, G and B channel values for the sample region with heating time. It can be seen that the acceleration change is mainly reflected in the B channel, while the R and G values remain substantially constant. With increasing heating time, this appears as a darker yellow color, i.e. a change to a lighter brown color. The B channel changes for the Brut and GRes samples were clearly linearly dependent, whereas in Res and SS browning began after 48 hours, after which the blue channel values were again linearly dependent on time. The original sparkling wine samples showed slight differences in their color, as the Brut and Brut Reserva (Res) samples were more similar to each other. Whereas semi secoco (ss) and BrutGran resurva (GRes) showed large differences, the largest difference between samples was in the blue channel.
Step seven: calculating the color invariant and blue decay percentage of the B channel; the percentage of blue decay has a linear relationship with time, consistent with the browning process of sparkling wines.
Except for using RIGC,i,ave、GIGC,i,ave、BIGC,i,aveAnalysis of the change in value, and a study of browning using the R, G, B color invariant was also performed.IGC sample imageiIs converted into a corresponding color invariant (B)i=BIGC,i,ave/(RIGC,i,ave+GIGC,i,ave+BIGC,i,ave) To quantify and compare browning. The B channel color invariant is similar to absorbance and the percentage of blue decay (% B) can be calculatedt). At this time biCorresponds to bt
Figure BDA0001494635100000131
Wherein, bt0B channel invariant when t is 0, BtIs the color invariant of the B channel at time t. FIG. 8 shows% B of the samples studiedtAs a function of time, it can be seen that the browning is reflected in% BtIncreasing linearly with time.
For the case of Brut,
Figure BDA0001494635100000133
R2is 0.99.
For a Brut Reserva,
Figure BDA0001494635100000137
R2is 0.93.
In the case of the semi secoco, the,
Figure BDA0001494635100000138
R2is 0.93.
For the Brut gray Reserva,
Figure BDA0001494635100000139
R2is 0.96.
Wherein x isdayIn time units (days).
(in Shimadzu ultraviolet spectrophotometer)
Figure BDA0001494635100000132
UV-3600, duisburg, germany) using a 10mm path length quartz cuvette and double distilled water as reference, measure 4 brands of Cava @Absorbance of the brewed wine at 420 nm. At 420nm (A)420) The absorbance value of (A) is multiplied by 1000 times and expressed as milli-absorbance units (mAU). The 5-HMF was determined in each sample according to the International grape and wine organization method, and liquid chromatography analysis of 4 brands of Cava sparkling wine was performed using Hitachi liquid chromatograph (Hitachi) with a four stage L-7100 pump, L-7455 diode array detector, and LaChrom chromatography column. The image acquisition equipment is a gorgeous 7 smart phone, is provided with a 5.2-inch touch display screen, has a resolution of 1920 pixels × 1080 pixels and 2000 ten thousand pixel cameras (5152 × 3888 pixel images), and supports PDAF phase detection quick focusing and an F2.0 aperture.
To evaluate the detection effect of the present invention,% BtWith other conventional browning monitoring parameters (e.g. A)420And 5-HMF content), FIG. 9 shows the concentration at 420nm (A)420) Measured absorbance and% BtThe correlation between them.
Linear regression analysis was performed to determine the relationship between these browning indicators:
for the case of Brut,
Figure BDA0001494635100000141
R2is 0.98.
For a Brut Reserva,
Figure BDA0001494635100000142
R2is 0.98.
In the case of the semi secoco, the,
Figure BDA0001494635100000143
R2is 0.99.
For the Brut gray Reserva,
Figure BDA0001494635100000144
R2is 0.96.
Wherein x is the sample at 420nm (A)420) Absorbance of (a) and y is% Bt
The results show that,% BtThe browning index represented by a420 showed a similar tendency. It should be noted that there is a high degree of correlation between the two different methods. Considering that 420nm corresponds to a color in the boundary between blue and violet, the absorption band will yellow to orange/brown the sample and accordingly these changes will be reflected in the B channel of the image. Also significant is the agreement between different samples, which are very similar in slope, especially the Brut, Res and SS samples.
On the other hand, FIG. 10 shows% BtAnd 5-HMF content. Linear regression analysis was performed to determine the relationship between these browning indicators:
for the case of Brut,
Figure BDA0001494635100000145
R2is 0.93.
For a Brut Reserva,
Figure BDA0001494635100000146
R2is 0.97.
In the case of the semi secoco, the,
Figure BDA0001494635100000147
R2is 0.99.
For the Brut gray Reserva,
Figure BDA0001494635100000148
R2is 0.91.
Wherein x is the 5-HMF content of the sample and y is% Bt
It can be seen that there is a high correlation between them, particularly the Brut, Res and SS samples. It should be noted that 5-HMF is not the only compound that indicates browning of the wine, and therefore the difference in the value of the slope can be attributed to the presence of other compounds also affecting the color of the wine.
With respect to% Bt5-HMF content and A420The results obtained, which characterize the browning process, can be described by the following equation:
Y=Y0+kt (8)
wherein Y is the absorbance (mAU) at 420nm or the 5-HMF content or% BtT is time (in days) and k is the velocity constant (denoted A)420mAU/day, 5-HMF mg/L/day for BtThe percentage decay of the blue channel per day).
Zero-order kinetics (zero-order kinetics) refers to the elimination of a drug at a constant rate in vivo, i.e., the amount of drug eliminated per unit time is constant regardless of the plasma drug concentration. The main reason for the zero order kinetic process is the saturation process of drug metabolizing enzyme, drug transporter and drug binding with plasma protein, and the zero order kinetic process has the characteristic of active transport. Zero order kinetics are established from natural force systems such as electromagnetic forces, biomechanics, attraction. The zero-order dynamics has rich connotation, natural formation, profound enlightenment and wide application. The invention adopts the related theory of zero-order dynamics to research the browning of the sparkling wine. The formula for the zero order kinetics is the same as above (in this case k is the zero order rate constant, Y0Initial blood concentration, blood concentration when Y is t). The calculated rate constants and monitoring methods for zero order kinetics for each sample are shown in table 2. It can be seen that% B is usedtZero order kinetics were also observed as a control variable (table 2 and figure 8). Furthermore, although the values of the evaluated browning rate constants differ according to the different methods of use, the relationship between the results does follow the same trend.
TABLE 2 zero order kinetic parameters (A)420、5-HMF、%Bt)
Figure BDA0001494635100000151
As time increases, the sparkling wine is continuously fermented (from Brut Gran Reserva to Brut Reserva), and the rate constant of browning increases with increasing sugar content (from Brut to Semiseco). Shows a constant rate of increase in sugar content, as expected, 5-HMF formation is highly correlated with the initial sugar content, since the rate of5-HMF formation is sugar dependent (Camara J S, Alves M A, Marques J C. changes in volatile composition of microorganisms during oxidation [ J ] analytical Chimica Acta,2006,563(1): 188-. Thus, the sparkling wine that is least affected by the browning process appears to be the highest quality wine (Brut GranReserva, Brut Reserva). Fig. 11 graphically summarizes the results obtained and it can be seen that the present invention allows the browning process to be characterized and is in full accord with known methods.
The invention provides a colorimetric method for monitoring browning process of sparkling wine, which has high speed and low consumption. The camera of the smart phone is used as a collecting device and is used for analyzing the transmission image of the Kawa wine, so that complex sample processing is avoided, and single-step multi-sample analysis can be performed. The present invention proposes a new control parameter, the percentage of blue channels decaying over time, which allows the browning kinetics to be studied and characterized. That is, the R, G channel remains almost unchanged during browning, which is time-dependent and affects mainly the B channel with time. The invention provides that the blue channel attenuation percentage percent Bt is used as a quality marker of sparkling wine, the value is highly related to the absorbance at 420nm and the content of 5-hydroxymethyl-2-furfural, the absorbance at 420nm and the content of 5-hydroxymethyl-2-furfural are common quality markers of wine browning, and the obtained result is completely consistent with the existing research method. Thus, the new parameters are highly correlated with the presence of furfural compounds, reflected in the correlation with a420 and to a lesser extent with the 5-HMF concentration, since this is only one of the colouring compounds involved in the browning process. The result of the invention shows that the percent Bt is a good browning descriptor, the analysis of a plurality of brands of sparkling wine samples can be simultaneously carried out only by acquiring the transmission images of sparkling wine samples at different browning stages, the device has low price, and expensive professional instruments and other chemical reagents are not needed.
The proposed method can be used as an alternative to conventional methods and can be used as a key quality control indicator for sparkling wines. The method proposed by the present invention has proven its usefulness, and therefore further research based on this method would be of great interest.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for detecting browning process of sparkling wine based on machine vision is characterized by comprising the following steps:
the method comprises the following steps: building an experimental device and preparing a sample;
step two: acquiring a sample image by using a camera of a smart phone, and acquiring an RGB image IGiCarrying out graying and binarization processing to obtain a binary image BINi,i=1,2,…,6;
Step three: BIN for binary image by using structural elementsiEtching to obtain image IEiObtaining a constricted region of the well containing the sample;
step four: image IEiAll the pixels in the image are inverted to obtain an image IERi(ii) a Image IERiCarrying out connected region marking, and identifying each type of sample according to the connected region marking;
step five: by image IG1The mean value of the R channel, G channel and B channel of the area of the shrinkage hole of the standard original sample as a reference, and calculating a correction factor for the image IGiColor correction is carried out on each channel to obtain a corrected image IGCi,i=2,…6;
Step six: calculating a corrected image IGCiSelecting a channel B as a browning parameter according to the average value of R, G, B channels in the area of the shrinkage hole of each brand sample;
step seven: calculating the color invariant of the channel B and the blue decay percentage, wherein the blue decay percentage has a linear relation with time, and the blue decay percentage is consistent with the browning process of the sparkling wine and is used as a quality marker for browning detection;
IGC corrected imageiB-channel to B-channel color invariant: bi=BIGC,i,ave/(RIGC,i,ave+GIGC,i,ave+BIGC,i,ave) Calculating the blue decay percentage% Bt
Figure FDA0002273560690000011
Wherein, bt0B is the B channel color invariant when t is 0, BtIs the B channel color invariant at time t; rIGC,i,ave、GIGC,i,ave、BIGC,i,aveRespectively corrected image IGCiAccelerated browning of the R, G, B three-channel mean of the constricted region of the sample.
2. A machine vision based detection method of browning process in sparkling wines according to claim 1, characterized in that said samples are Brut, Brut Reserva, Brut Gran Reserva and semi seco four popular brands of kava sparkling wines with different sugar content and production year; 10mL of each of the solutions were taken and charged into 420 mL amber vials in N2Degassing under airflow; placing the 4 amber vials containing different brands of sparkling wine in a dark environment and maintaining the ambient temperature at 8 ℃; the different brands of sparkling wines in the 4 bottles were used as standard samples for the subsequent 10-day experiment, and the 4 amber vials containing the standard samples were named Bottle1, Bottle2, Bottle3, Bottle 4; then, 10mL of each of the four brands of sparkling wine was filled into 4 amber vials of 20mL and placed in N2Degassing under airflow; placing the 4 amber vials filled with sparkling wines of different brands in a completely dark environment, then placing the vials in an oven, setting the constant temperature of 65 +/-1 ℃, and performing an accelerated browning test; the 4 amber vials containing the accelerated browning samples were designated Bottle5, Bottle6, Bottle7, Bottle 8; collecting sample information at sampling time points of 0, 2, 4,6, 8 and 10 days, wherein the collection time interval is 48 hours; at each sampling time, (1) 1 part each of the standard samples of Brut, Brut Reserva, Brutgran Reserva and Semiseco was first extracted, and the wells placed in the middle of a 96-well plate in this order from top to bottomIn the column, 1 is vertically arranged and then named as the 1 st column; (2) then 4 parts of samples of Brut, Brut Reserva, Brut Gran Reserva and Semiseco which accelerate browning are extracted, and then 1 column of each brand is put into the 2 nd to 5 th columns of a 96-well plate in sequence.
3. The machine vision-based sparkling wine browning process detection method according to claim 1, wherein the experimental device comprises a collection box (2) and a light source (4), the light source (4) is arranged below the collection box (2), a pore plate (3) for containing a sample is arranged at the lower part of the collection box (2), a collection hole (1) is arranged at the top of the collection box (2), and the collection hole (1) is positioned right above the pore plate (3).
4. The machine vision-based detection method for browning processes of sparkling wine according to claim 3, characterized in that said collection box (2) is made of black foam core board, and the inside of collection box (2) is covered with matt black velvet paper; the collection box (2) is of a cuboid structure with the height of 80cm, and the difference between a diagonal line and a central vertical light path is less than 5%; the light source (4) is a diffuse reflection light source with controllable intensity; the pore plate (3) is a 96 pore plate, and the pore plate (3) is made of imported optical transparent pure polystyrene and is sterilized by gamma rays.
5. A machine vision based detection method for browning processes of sparkling wines according to claim 2 or 3, characterized in that the method of obtaining the image of the sample is: arranging kava bubble grape wine samples in the middle of a pore plate (3) by using a 0.3ml micropipette, placing the pore plate (3) on a panel of a light source (4), covering an acquisition box (2) on the pore plate (3), positioning the acquisition hole (1) right above the pore plate (3), placing a smart phone on the acquisition hole (1) at the top of the acquisition box, and obtaining images at the highest resolution by using a built-in camera of the smart phone and storing the images as JPEG; the standard raw samples are arrayed in a well plate and all samples are taken in the same image.
6. The machine vision-based sparkling wine browning process detection method according to claim 1, wherein the obtained RGB image is subjected to graying and binarization by:
IG (image group) of RGB (Red Green blue) image obtained by smart phoneiThe average value of R, G, B three components of each pixel is used as the Gray value of the image, i.e. Grayi(x,y)=(RIG,i(x,y)+GIG,i(x,y)+BIG,i(x, y))/3 to obtain a Gray image Grayi
For Gray scale image GrayiAn optimal threshold T is calculated using Otsu's algorithm, which is a gray value gt that maximizes σ: assuming that the gray level of the gray image is L, the gray range is [0, L-1]]The optimal threshold for calculating the gray level image by using the Ostu method is as follows: max [ w [ ]0(gt)×(u0(gt)-u)^2+w1(gt)×(u1(gt)-u)^2)]Wherein w is0As a foreground proportion, u0Is the mean value of the gray levels of the foreground, w1As background proportion, u1Is the background gray level mean value, and u is the mean value of the whole gray level image;
t is the optimal threshold value of the segmentation image, the gray level image is segmented into 2 parts according to the optimal threshold value T, and the binary image BIN is obtainedi(x,y):
Figure FDA0002273560690000021
Wherein, Grayi(x, y) is the value of the pixel at (x, y) in the grayscale image;
BIN binary imageiObtaining a binary image IR by negationiIR is subjected to the imode function in MatlabiCarrying out corrosion operation: IERi=imerode(IRi,D1) Wherein, IERiRepresenting a binarized image IRiCircular structural element D with diameter of 81The image obtained after etching, i ═ 1,2,3, ·, 6; d1Stral ('disk',4), disk denotes a circular shape.
7. Machine vision based detection method for browning process of sparkling wine according to claim 6, characterised in that it consists in detecting the browning process of sparkling wineImage IERiThe method for marking the connected region comprises the following steps: adopting a connected region mark function bwleabel in Matlab: [ LJi,LNUMi]=bwlabel(IERi8), wherein, LNUMiRepresentation image IERiNumber of interconnected regions, LJiRepresentation and image IERiMatrices of equal size, the matrix LJiContains a label image IERiClass label for each connected region, the labels having values of 1,2, …, LNUMiAnd 8, searching a connected region according to 8 neighborhoods;
the method for identifying the position of each type of sample comprises the following steps: the connected regions labeling treats each contracted sample region as a connected region, using, for each connected region, the regionprops function in Matlab: STATSi=regionprops(LJi'Central'), the 'Central' attribute is the Centroid of the connected region, STATSiContains an image IERiOf each connected Region (RX)i,nu,LYi,nu) And the subscript nu has a value of 1-20.
8. A machine vision based detection method of browning process of sparkling wine according to claim 1, characterized in that the corrected image is obtained by: by image IG1Of the standard raw sample, the mean value R of the R channel, G channel and B channel of the area of the shrinkage cavity1,ave、G1,aveAnd B1,aveFor reference, the mean value of the R channel, the G channel and the B channel of the area of the shrinkage hole where the standard original sample in the images acquired by the subsequent different time sampling points is Ri,ave、Gi,aveAnd Bi,aveFor reference, three correction factors C are calculatedi,R、Ci,GAnd Ci,B
Figure FDA0002273560690000031
Wherein, Ci,R、Ci,G、Ci,BAs an image IGiOf R channel, G channel and B channelCorrection factors, i ═ 2,3, …, 6;
image IGiR channels R of all pixel pointsIG,iMultiplying by Ci,RG channel GIG,iMultiplying by Ci,GThe B channel BIG,iMultiplying by Ci,BI 2,3, …,6, obtaining new RGB three channels, and forming a corrected image IGCi
9. Machine vision based detection method for browning processes of sparkling wines according to claim 7 or 8, characterized in that the image IER is1The column coordinate of the centroid coordinate in (1) is LY1,1~LY1,4The pixel point of the connected region is set to 1, and other pixel points are set to 0 to obtain a matrix JZ1Original image IG1The values of the R channels of all the pixel points in (1) are used as a matrix RIG,1Original image IG1The values of the G channels of all the pixel points in (1) are used as a matrix GIG,1Original image IG1The values of the B channels of all the pixel points in (1) are used as a matrix BIG,1(ii) a Will matrix JZ1Dot-by-dot matrix RIG,1Obtaining a matrix DCR1Will matrix JZ1Dot-product matrix GIG,1Obtaining a matrix DCG1Will matrix JZ1Dot-by-dot matrix BIG,1Obtaining a matrix DCB1
R1,ave=sum(sum(DCR1))/sum(MJ1),
G1,ave=sum(sum(DCG1))/sum(MJ1),
B1,ave=sum(sum(DCB1))/sum(MJ1),
Of these, sum (DCR)1) Is a matrix DCR1Sum of all the element values in (1), sum (DCG)1) Is a matrix DCG1Sum of all the element values in (1), sum (DCB)1) Is a matrix DCB1Sum of all element values in, sum (MJ)1) Is an image IER1The column coordinate of the centroid coordinate in (1) is LY1,1~LY1,4Total number of pixels of connected region, MJ1=regionprops(JZ1,'Area') The 'Area' attribute is the number of pixels in each Area of the image.
10. The machine vision-based sparkling wine browning process detection method of claim 1, wherein said blue decay percent% BtThe browning process is shown as follows: y ═ Y0+kt,
Wherein Y is the absorbance at 420nm or the 5-HMF content or% Bt,Y0Is the absorbance at 420nm or the 5-HMF content or% BtT is time and k is the velocity constant.
CN201711266254.8A 2017-12-05 2017-12-05 Bubbling wine browning process detection device and method based on machine vision Active CN108022239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711266254.8A CN108022239B (en) 2017-12-05 2017-12-05 Bubbling wine browning process detection device and method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711266254.8A CN108022239B (en) 2017-12-05 2017-12-05 Bubbling wine browning process detection device and method based on machine vision

Publications (2)

Publication Number Publication Date
CN108022239A CN108022239A (en) 2018-05-11
CN108022239B true CN108022239B (en) 2020-03-10

Family

ID=62078258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711266254.8A Active CN108022239B (en) 2017-12-05 2017-12-05 Bubbling wine browning process detection device and method based on machine vision

Country Status (1)

Country Link
CN (1) CN108022239B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109211815A (en) * 2018-10-30 2019-01-15 福建省农业科学院食用菌研究所(福建省蘑菇菌种研究推广站) A kind of method for quantitatively evaluating of white mushroom cap damage brown stain
CN116183535B (en) * 2023-04-23 2023-08-29 中国科学技术大学 Method, system, equipment and medium for analyzing spectrum of macromolecular solution aging process

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101282489A (en) * 2008-04-24 2008-10-08 北京中星微电子有限公司 Light source detection apparatus and method as well as image processing method
CN101714257A (en) * 2009-12-23 2010-05-26 公安部第三研究所 Method for main color feature extraction and structuring description of images
CN105303189A (en) * 2014-07-29 2016-02-03 阿里巴巴集团控股有限公司 Method and device for detecting specific identification image in predetermined area
CN107424198A (en) * 2017-07-27 2017-12-01 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8546458B2 (en) * 2010-12-07 2013-10-01 Allergan, Inc. Process for texturing materials

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101282489A (en) * 2008-04-24 2008-10-08 北京中星微电子有限公司 Light source detection apparatus and method as well as image processing method
CN101714257A (en) * 2009-12-23 2010-05-26 公安部第三研究所 Method for main color feature extraction and structuring description of images
CN105303189A (en) * 2014-07-29 2016-02-03 阿里巴巴集团控股有限公司 Method and device for detecting specific identification image in predetermined area
CN107424198A (en) * 2017-07-27 2017-12-01 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN108022239A (en) 2018-05-11

Similar Documents

Publication Publication Date Title
Arvanitoyannis et al. Application of quality control methods for assessing wine authenticity: Use of multivariate analysis (chemometrics)
Arslan et al. Recent trends in quality control, discrimination and authentication of alcoholic beverages using nondestructive instrumental techniques
CN108445094B (en) Establishment method and application for quickly identifying wine age of yellow wine by gas-phase ion mobility spectrometry
Bokulich et al. Associations among wine grape microbiome, metabolome, and fermentation behavior suggest microbial contribution to regional wine characteristics
Berna et al. Geographical origin of Sauvignon Blanc wines predicted by mass spectrometry and metal oxide based electronic nose
Wang et al. Rapid HPLC analysis of amino acids and biogenic amines in wines during fermentation and evaluation of matrix effect
Geana et al. Classification of red wines using suitable markers coupled with multivariate statistic analysis
Shen et al. Prediction of sugars and acids in Chinese rice wine by mid-infrared spectroscopy
CN109781918B (en) Gas phase ion mobility spectrometry identification method for yellow rice wine produced by different enterprises
Moreno-García et al. Biological aging status characterization of Sherry type wines using statistical and oenological criteria
CN108022239B (en) Bubbling wine browning process detection device and method based on machine vision
Condé et al. Development of a robotic and computer vision method to assess foam quality in sparkling wines
Hutzler et al. Yeast identification and characterization
Dias et al. Methods of evaluation of fruit wines
Lloyd et al. Metabolomics approaches for resolving and harnessing chemical diversity in grapes, yeast and wine
Peng et al. Ageing status characterization of Chinese spirit using scent characteristics combined with chemometric analysis
Fonayet et al. MS-and NMR-metabolomic tools for the discrimination of wines: Applications for authenticity
García‐Estévez et al. Effect of the type of oak barrels employed during ageing on the ellagitannin profile of wines
Čuš et al. Analytical determination of Dolenjska region wines quality
Sochorova et al. Electrochemical and others techniques for the determination of malic acid and tartaric acid in must and wine
Warren-Vega et al. A critical review on the assessment of the quality and authenticity of Tequila by different analytical techniques: Recent advances and perspectives
CN116678874A (en) Method for quantitatively monitoring black tea fermentation characteristic volatile compounds
Zou et al. Traditional vinegars identification by colorimetric sensor
Zoecklein et al. Laboratory procedures
CN108845021A (en) A kind of method for quick identification of vinegar various processes mode

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant