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 PDFInfo
- 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
- sample
- browning
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30128—Food 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
本发明提出了一种基于机器视觉的起泡葡萄酒褐变过程检测装置及方法,用以解决现有检测过程复杂,成本高,适用性不强的问题;利用智能手机的相机采集放置在采集箱底部的漫射光源面板上的样品,获得起泡葡萄酒的数字图像,通过机器视觉和图像处理技术对数字图像进行灰度化、二值化、腐蚀等处理,通过对图像RGB三个通道进行分析,将蓝色通道衰减百分比作为起泡葡萄酒的质量标记,其与420nm处的吸光度和5‑羟甲基‑2‑糠醛的含量高度相关。本发明仅需获取不同褐变阶段的起泡葡萄酒样本的透射图像,可同时进行多个品牌起泡葡萄酒样本的分析,避免复杂的样品处理,可进行多样品分析,速度快,成本低,无需昂贵的专业仪器及其它化学试剂。
The invention proposes a device and method for detecting the browning process of sparkling wine based on machine vision, which is used to solve the problems of complex detection process, high cost and poor applicability in the prior art; The sample on the diffuse light source panel at the bottom, the digital image of sparkling wine is obtained, and the digital image is processed by grayscale, binarization, corrosion, etc. through machine vision and image processing technology, and the three channels of the image RGB are analyzed. , the blue channel decay percentage was used as a quality marker for sparkling wine, which was highly correlated with the absorbance at 420 nm and the content of 5-hydroxymethyl-2-furfural. The invention only needs to acquire the transmission images of sparkling wine samples at different browning stages, and can analyze multiple brands of sparkling wine samples at the same time, avoid complex sample processing, and can perform multi-sample analysis, with high speed, low cost, and no need for Expensive professional instruments and other chemical reagents.
Description
技术领域technical field
本发明涉及起泡葡萄酒褐变和图像处理的技术领域,尤其涉及一种基于机器视觉的起泡葡萄酒褐变过程检测装置及方法。The invention relates to the technical field of sparkling wine browning and image processing, in particular to a device and method for detecting the browning process of sparkling wine based on machine vision.
背景技术Background technique
现阶段,世界各地几乎都在生产起泡葡萄酒,消费者对起泡酒的好感和需求也在不断增长。起泡酒的原理是在酿好的酒中加入糖和酵母在封闭的容器中进行第二次酒精发酵,发酵过程产生的二氧化碳被限制在瓶中成为酒中气泡的来源(Serra-Cayuela A,Jourdes M,Riu-Aumatell M,et al.Kinetics of browning,phenolics,and 5-hydroxymethylfurfural in commercial sparkling wines.[J].Journal ofAgricultural&Food Chemistry,2014,62(5):1159-1166)。添加的酵母将添加的糖转化为酒精和二氧化碳,使得气泡产生翻腾,这是起泡葡萄酒的最重要的特征之一。At this stage, sparkling wines are being produced almost everywhere in the world, and consumers’ favor and demand for sparkling wines is also growing. The principle of sparkling wine is to add sugar and yeast to the brewed wine for a second alcoholic fermentation in a closed container, and the carbon dioxide produced during the fermentation process is confined in the bottle and becomes the source of bubbles in the wine (Serra-Cayuela A, Jourdes M, Riu-Aumatell M, et al. Kinetics of browning, phenolics, and 5-hydroxymethylfurfural in commercial sparkling wines. [J]. Journal of Agricultural & Food Chemistry, 2014, 62(5):1159-1166). The added yeast converts the added sugars into alcohol and carbon dioxide, causing the bubbles to churning, one of the most important characteristics of sparkling wine.
起泡葡萄酒消费量增长迅速,根据国际葡萄酒组织的统计,近年来起泡葡萄酒生产增长了40%,起泡酒葡萄酒占全球葡萄酒产量的8%。中国和美国成为推动这一增长的主力军。Sparkling wine consumption is growing rapidly, according to the International Wine Organization, sparkling wine production has grown by 40% in recent years, and sparkling wine accounts for 8% of global wine production. China and the United States have become the main force driving this growth.
西班牙卡瓦和法国香槟是最著名的起泡葡萄酒品牌。卡瓦是由传统方法生产的受原产地命名制度保护的高品质起泡酒。卡瓦酒所使用的葡萄经过严格挑选,在榨汁过程中必须十分小心,这样才能在理想的成熟度获取最佳的葡萄汁。而后将葡萄汁倒入不锈钢桶进行低温发酵,静置后再行品尝以确定其品质,并有选择地进行调配。进行完最后的调配后,将酒装入瓶中,并在酒柜中至少放置9个月,但通常这一存放期会更长。在此期间,葡萄酒将在瓶中产生二次发酵,形成了葡萄酒的复杂感官特性如香气、颜色和发泡性能,成为起泡酒,并产生酵母沉淀。当陈化期结束后,可将酵母菌小心取出,向瓶口注满同一批葡萄酒,用软木塞封口,并加上封条。此外,根据瓶中陈酿的持续时间,有两种不同的类别:至少15个月的Reserva,至少30个月的Gran Reserva(Serra-Cayuela A,Aguilera-Curiel M A,Riu-Aumatell M,et al.Browning during biological aging and commercial storage ofCava sparkling wine and the use of 5-HMF as a quality marker[J].Food ResearchInternational,2013,53(1):226-231)。除了提高葡萄质量,陈酿时间也会影响生产成本,陈酿葡萄酒的最终价格高于新葡萄酒。Spanish Cava and French Champagne are the most famous sparkling wine brands. Cava is a high-quality sparkling wine produced by traditional methods and protected by the Designation of Origin system. The grapes used in Cava are carefully selected and great care must be taken during the juicing process in order to obtain the best grape juice at the desired ripeness. The grape juice is then poured into stainless steel barrels for low-temperature fermentation, and then tasted to determine its quality and selectively blended. After the final blending, the wine is bottled and left in the wine cabinet for at least 9 months, but usually longer. During this period, 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 deposits. When the aging period is over, the yeasts can be carefully removed, filled with the same batch of wine, cork and seal. In addition, there are two different categories based on the duration of ageing in the bottle: Reserva of at least 15 months and Gran Reserva of at least 30 months (Serra-Cayuela A, Aguilera-Curiel M A, Riu-Aumatell M, et al. Browning during biological aging and commercial storage of Cava sparkling wine and the use of 5-HMF as a quality marker [J]. Food Research International, 2013, 53(1):226-231). In addition to improving grape quality, aging time also affects production costs, with the final price of aged wines higher than new wines.
在物理化学和感官特性方面,葡萄酒是一种动态产品,因此在生物陈酿和储存过程中会发生复杂的化学变化。这些化学变化可能引起感官特征的变化,特别是香气、风味和颜色(王玉峰.葡萄酒香气影响因素的研究[D].济南:山东轻工业学院,2010)。In terms of physicochemical and organoleptic properties, wine is a dynamic product and as such undergoes complex chemical changes during biological aging and storage. These chemical changes may cause changes in sensory characteristics, especially aroma, flavor and color (Wang Yufeng. Research on the factors affecting wine aroma [D]. Jinan: Shandong Institute of Light Industry, 2010).
褐变是涉及糖、脂类、氨基酸和酚的氧化过程(Li H,Guo A,Wang H.Mechanismsof oxidative browning of wine[J].Food chemistry,2008,108(1):1-13.),褐变降低了葡萄酒的感官质量(颜色、风味和香味的变化以及涩味的增加),因此在加工和储存过程中必须控制褐变。一旦瓶子被密封,褐变就不能再调控了。因此,酿酒厂必须找到能够指示起泡酒褐变的标记及参数,并通过技术手段检测起泡葡萄酒的褐变。实际生产中很有必要开发监测褐变程度的快速可靠的方法,以及定义指示起泡葡萄酒品质的参数。Browning is an oxidative process involving sugars, lipids, amino acids and phenols (Li H, Guo A, Wang H. Mechanisms of oxidative browning of wine [J]. Food chemistry, 2008, 108(1): 1-13.), Browning reduces the organoleptic quality of wine (changes in color, flavor and aroma, and increases in astringency), so it must be controlled during processing and storage. Once the bottle is sealed, the browning can no longer be regulated. Therefore, wineries must find markers and parameters that can indicate the browning of sparkling wines, and use technical means to detect the browning of sparkling wines. In practice, it is necessary to develop fast and reliable methods for monitoring the degree of browning and to define parameters that indicate the quality of sparkling wines.
现有的研究已经基于不同的质量标记和测量技术,提出了几种用于量化和表征起泡葡萄酒褐变过程的方法。如紫外可见吸收光谱法(Ultraviolet-visible spectroscopy,简称UV-VIS)和高效液相色谱法(High Performance Liquid Chromatography,简称HPLC)(Serra-Cayuela A,Aguilera-Curiel M A,Riu-Aumatell M,et al.Browning duringbiological aging and commercial storage of Cava sparkling wine and the use of5-HMF as a quality marker[J].Food Research International,2013,53(1):226-231.)。Existing studies have proposed several methods for quantifying and characterizing the browning process in sparkling wines, based on different quality markers and measurement techniques. Such as UV-visible spectroscopy (Ultraviolet-visible spectroscopy, referred to as UV-VIS) and high performance liquid chromatography (High Performance Liquid Chromatography, referred to as HPLC) (Serra-Cayuela A, Aguilera-Curiel M A, Riu-Aumatell M, et al. .Browning duringbiological aging and commercial storage of Cava sparkling wine and the use of 5-HMF as a quality marker[J].Food Research International,2013,53(1):226-231.).
420nm波长处的吸光度(A420)被用作白葡萄酒的褐变监测的参数(Kallithraka S,Salacha M I,Tzourou I.Changes in phenolic composition and antioxidantactivity of white wine during bottle storage:Accelerated browning test versusbottle storage[J].Food Chemistry,2009,113(2):500-505.),A420值的增加与褐变过程直接相关(Ibarz A,Pagan J,Garza S.Kinetic models of non-enzymatic browning inapple puree.[J].Journal of the Science of Food&Agriculture,2000,80(8):1162-1168.)。然而,在以前的研究中,作为卡瓦起泡葡萄酒的质量标记的A420参数被证明具有低灵敏度和低特异性,之后改用5-羟甲基-2-糠醛(5-HMF)含量作为更有效的标记(Serra-Cayuela A,Aguilera-Curiel M A,Riu-Aumatell M,et al.Browning during biologicalaging and commercial storage of Cava sparkling wine and the use of 5-HMF as aquality marker[J].Food Research International,2013,53(1):226-231.),但是对该化合物在实验室进行色谱分析需要消耗大量的时间和试剂,花销昂贵。Absorbance at 420 nm wavelength (A 420 ) was used as a parameter for browning monitoring of white wine (Kallithraka S, Salacha MI, Tzourou I. Changes in phenolic composition and antioxidant activity of white wine during bottle storage: Accelerated browning test versus bottle storage [J [ J]. Journal of the Science of Food & Agriculture, 2000, 80(8):1162-1168.). However, in a previous study, the A 420 parameter, which is a quality marker for cava sparkling wine, was shown to have low sensitivity and low specificity, after which the 5-hydroxymethyl-2-furfural (5-HMF) content was used instead as More efficient markers (Serra-Cayuela A, Aguilera-Curiel MA, Riu-Aumatell M, et al. Browning during biologicalaging and commercial storage of Cava sparkling wine and the use of 5-HMF as aquality marker [J]. Food Research International , 2013, 53(1): 226-231.), but the chromatographic analysis of this compound in the laboratory requires a lot of time and reagents, which is expensive.
在现有的研究方法中,荧光激发-发射光谱结合平行因子分析法成功地用于监测四种起泡葡萄酒的褐变过程的研究,已被作为通过监测A420或者5-HMF含量实现褐变检测的快速替代方法。为了研究更好的替代方案,研究人员提出了一种基于比色技术的新方法,用于监测加速褐变试验中的卡瓦起泡葡萄酒中的褐变过程。使用由国际照明委员会(CIE)定义的Lab色彩模式或Richard.S.Hunter所创立的Lab色彩模式测量褐变程度(Raquel P FG,Joao Barroca M.Evaluation of the Browning Kinetics for Bananas and PearsSubmitted to Convective Drying[J].Current Biochemical Engineering,2014,1:165-172.),但是这些方法需要使用专用色度计或分光光度计。Among the existing research methods, fluorescence excitation-emission spectroscopy combined with parallel factor analysis was successfully used to monitor the browning process of four sparkling wines. A quick alternative to detection. To investigate a better alternative, the researchers proposed a new method based on colorimetric techniques for monitoring the browning process in cava sparkling wines in an accelerated browning test. The degree of browning was measured using the Lab color model defined by the International Commission on Illumination (CIE) or the Lab color model created by Richard. S. Hunter (Raquel P FG, Joao Barroca M. Evaluation of the Browning Kinetics for Bananas and Pears Submitted to Convective Drying [J]. Current Biochemical Engineering, 2014, 1: 165-172.), but these methods require the use of a dedicated colorimeter or spectrophotometer.
近年来,随着智能手机的传感器性能提升,基于智能手机的应用研究也在增多。智能手机相对实验室专业的仪器和设备,具有成本低、携带方便、可现场采集与分析、结果易于分享等优点。In recent years, with the improvement of the sensor performance of smart phones, the application research based on smart phones is also increasing. Compared with professional laboratory instruments and equipment, smartphones have the advantages of low cost, easy portability, on-site collection and analysis, and easy sharing of results.
发明内容SUMMARY OF THE INVENTION
针对现有起泡葡萄酒的褐变检测需要使用专用色度计或分光光度计,检测过程复杂,适用性不强的技术问题,本发明提出一种基于机器视觉的起泡葡萄酒褐变过程检测装置及方法,利用机器视觉和图像处理技术进行起泡葡萄酒褐变过程的检测,仅需获取不同褐变阶段的起泡葡萄酒样本的透射图像,就可以同时进行多个品牌的起泡葡萄酒样本的分析,装置价格便宜,无需昂贵的专业仪器及其它化学试剂。Aiming at the technical problems that the browning detection of the existing sparkling wine requires the use of a special colorimeter or a spectrophotometer, the detection process is complicated, and the applicability is not strong, the present invention proposes a machine vision-based detection device for the browning process of sparkling wine And the method, using machine vision and image processing technology to detect the browning process of sparkling wine, only need to obtain transmission images of sparkling wine samples at different browning stages, and can simultaneously analyze multiple brands of sparkling wine samples , the device is cheap, without expensive professional equipment and other chemical reagents.
为了达到上述目的,本发明的技术方案是这样实现的:一种基于机器视觉的起泡葡萄酒褐变过程检测装置及方法,其步骤如下:In order to achieve the above object, the technical scheme of the present invention is achieved in this way: a machine vision-based sparkling wine browning process detection device and method, the steps are as follows:
步骤一:搭建实验装置,制备样品;Step 1: Build an experimental device and prepare samples;
步骤二:利用智能手机的相机获取样品图像,将获得的RGB图像IGi进行灰度化和二值化处理,得到二值化图像BINi,i=1,2,…,6;Step 2: use the camera of the smartphone to obtain the sample image, and perform grayscale and binarization processing on the obtained RGB image IG i to obtain the binarized image BIN i , i=1,2,...,6;
步骤三:将图像BINi中的像素全部取反,得到图像IRi;运用结构元素对IRi进行腐蚀,得到图像IERi,获得装有样品的孔的收缩区域;Step 3: Invert all the pixels in the image BIN i to obtain the image IR i ; use structural elements to corrode the IR i to obtain the image IER i , and obtain the shrinkage area of the hole containing the sample;
步骤四:将图像IERi进行连通区域标记,根据连通区域标记识别每种类型的样本;Step 4: Mark the connected area of the image IER i , and identify each type of sample according to the connected area mark;
步骤五:以图像IG1的标准的原始样品的收缩样品孔的区域的R通道、G通道和B通道的均值为基准计算校正因子,并对图像IGi各通道进行颜色校正,得到校正图像IGCi,i=2,…6;Step 5: Calculate the correction factor based on the mean value of the R channel, G channel and B channel of the shrinkage sample hole area of the standard original sample of the image IG 1 , and perform color correction on each channel of the image IG i to obtain the corrected image IGC i , i=2,...6;
步骤六:计算校正后的图像IGCi的各个品牌样品的收缩孔的区域的R、G、B通道的均值,选取B通道作为褐变的参数;Step 6: Calculate the mean value of the R, G, B channels in the area of the shrinkage hole of each brand sample of the corrected image IGC i , and select the B channel as the parameter of browning;
步骤七:计算B通道颜色不变量和蓝色衰变百分比,蓝色衰变百分比与时间具有线性关系,蓝色衰变百分比与起泡葡萄酒的褐变过程相符,作为褐变检测的质量标记。Step 7: Calculate the B channel color invariant and the blue decay percentage. The blue decay percentage has a linear relationship with time, and the blue decay percentage is consistent with the browning process of sparkling wine as a quality marker for browning detection.
所述样品为Brut、Brut Reserva、Brut Gran Reserva和Semiseco四种畅销品牌的卡瓦起泡葡萄酒,四种葡萄酒具有不同的含糖量和生产年份;取10mL分别装入4个20mL的琥珀色小瓶中,并在N2气流下脱气;将这4个装有不同品牌起泡酒的琥珀色小瓶放置在黑暗的环境中,且保存环境温度为8℃;将这4个瓶中的不同品牌的起泡酒作为后续10天的实验的标准样品,并将这4个装有标准样品的琥珀色小瓶命名为Bottle1、Bottle2、Bottle3、Bottle4;再将四个品牌的起泡葡萄酒各取10mL分别装入4个20mL的琥珀色小瓶中,并在N2气流下脱气;将这4个装有不同品牌起泡酒的琥珀色小瓶放置在完全黑暗的环境,然后放置在烘箱中,设定65±1℃的恒温,进行加速褐变试验;将这4个装有加速褐变样品的琥珀色小瓶命名为Bottle5、Bottle6、Bottle7、Bottle8;在经过0、2、4、6、8和10天的采样时间点采集样品信息,采集的时间间隔为48小时;在每个采样时间点,(1)首先提取Brut、BrutReserva、Brut Gran Reserva和Semiseco的标准样品各1份,从上到下依次放置在96孔板的中部的孔中,竖直排成1列,然后命名为第1列;(2)然后提取Brut、Brut Reserva、Brut GranReserva和Semiseco的加速褐变的样品各4份,然后每个品牌放1列,依次放入96孔板的第2~5列。The samples are Cava sparkling wines of four best-selling brands of Brut, Brut Reserva, Brut Gran Reserva and Semiseco, four wines with different sugar content and production years; 10mL were filled into four 20mL amber vials and degassed under N2 flow; place the 4 amber vials containing different brands of sparkling wine in a dark environment and keep the ambient temperature at 8°C; place the different brands of the 4 bottles The sparkling wine was used as the standard sample for the subsequent 10-day experiment, and the 4 amber vials containing the standard samples were named Bottle1, Bottle2, Bottle3, Bottle4; and then 10mL of each of the four brands of sparkling wine were taken respectively. Filled into 4 20mL amber vials and degassed under a stream of N2 ; place these 4 amber vials with different brands of sparkling wine in complete darkness, then place in an oven, set The accelerated browning test was carried out at a constant temperature of 65±1°C; the 4 amber vials containing the accelerated browning samples were named Bottle5, Bottle6, Bottle7, Bottle8; after 0, 2, 4, 6, 8 and 10 The sample information was collected at the sampling time point of each day, and the collection time interval was 48 hours; at each sampling time point, (1) firstly extract one standard sample of Brut, BrutReserva, Brut Gran Reserva and Semiseco, in order from top to bottom Placed in the middle well of the 96-well plate, arranged in a vertical column, and then named the first column; (2) Then extract 4 samples of accelerated browning of Brut, Brut Reserva, Brut GranReserva and Semiseco, and then Put 1 column for each brand, and put them in the 2nd to 5th columns of the 96-well plate in turn.
所述实验装置包括采集箱和光源,光源设置在采集箱的下方,采集箱下部设有用于盛放样品的孔板,采集箱顶部设有采集孔,采集孔位于孔板的正上方。The experimental device includes a collection box and a light source, the light source is arranged below the collection box, the lower part of the collection box is provided with an orifice plate for holding samples, the top of the collection box is provided with a collection hole, and the collection hole is located directly above the orifice plate.
所述采集箱由黑色泡沫芯板制成,采集箱内部覆盖有哑光黑色天鹅绒纸;采集箱为高度80cm的长方体结构,对角线和中心垂直光路之间的差异小于5%;所述光源为强度可控的漫反射光源;孔板为96孔板,孔板由进口光学透明纯聚苯乙稀制造,经伽玛射线灭菌处理。The collection box is made of black foam core board, and the inside of the collection box is covered with matte black velvet paper; the collection box is a cuboid structure with a height of 80cm, and the difference between the diagonal and the center vertical light path is less than 5%; the light source It is a diffuse reflection light source with controllable intensity; the orifice plate is a 96-well plate, which is made of imported optically transparent pure polystyrene and sterilized by gamma rays.
获取样品图像的方法为:使用0.3ml微量移液管将卡瓦起泡葡萄酒样品排列在孔板的中部,将孔板放置光源的面板上,将采集箱罩在孔板上,采集孔位于孔板的正中间的上方,将智能手机放置在采集箱顶部的采集孔上,使用智能手机的内置相机以最高的分辨率获得图像,并保存为JPEG;标准的原始样品排列在孔板中,获取所有样品到同一个图像中。The method of acquiring the sample image is as follows: use a 0.3ml micropipette to arrange the cava sparkling wine sample in the middle of the well plate, place the well plate on the panel of the light source, cover the collection box on the well plate, and the collection hole is located in the well plate. Above the center of the plate, place the smartphone on the collection hole at the top of the collection box, and use the smartphone's built-in camera to acquire images at the highest resolution and save as JPEG; the standard raw samples are arranged in the well plate and acquired All samples into the same image.
将获得的RGB图像进行灰度化和二值化处理的方法为:The method of graying and binarizing the obtained RGB image is as follows:
将智能手机获得的RGB图像IGi中每个像素的R、G、B三个分量的平均值作为图像的灰度值,即Grayi(x,y)=(RIG,i(x,y)+GIG,i(x,y)+BIG,i(x,y))/3,得到灰度图像Grayi;The average value of the three components of R, G, and B of each pixel in the RGB image IG i obtained by the smartphone is taken as the gray value of the image, that is, Gray i (x,y)=(R IG,i (x,y )+G IG,i (x,y)+B IG,i (x,y))/3 to obtain a grayscale image Gray i ;
对灰度图像Grayi使用Otsu算法计算得到最佳阈值T,最佳阈值T是使得σ最大的灰度值gt:设灰度图像的灰度级是L,则灰度范围为[0,L-1],利用Ostu方法计算灰度图像的最佳阈值为:σ=Max[w0(gt)×(u0(gt)-u)^2+w1(gt)×(u1(gt)-u)^2)],其中,w0为前景比例,u0为前景灰度均值,w1为背景比例,u1为背景灰度均值,u为整幅灰度图像的均值。For the grayscale image Gray i, use the Otsu algorithm to calculate the optimal threshold T. The optimal threshold T is the grayscale value gt that maximizes σ: if the grayscale of the grayscale image is L, the grayscale range is [0, L -1], using the Ostu method to calculate the optimal threshold for grayscale images: σ=Max[w 0 (gt)×(u 0 (gt)-u)^2+w 1 (gt)×(u 1 (gt )-u)^2)], where w 0 is the foreground ratio, u 0 is the average foreground gray level, w 1 is the background proportion, u 1 is the background gray average, and u is the average of the entire gray image.
T为分割图像的最佳阈值,根据最佳阈值T将灰度图像分割为2个部分,得到二值化图像BINi(x,y):T is the best threshold for dividing the image. According to the best threshold T, the grayscale image is divided into two parts, and the binarized image BIN i (x, y) is obtained:
其中,Grayi(x,y)为灰度图像中(x,y)处的像素的值;Among them, Gray i (x, y) is the value of the pixel at (x, y) in the grayscale image;
将二值化图像BINi进取反(像素值为1的变为0,像素值为0的变为1)得到二值化图像IRi;采用Matlab中的imerode函数对二值化图像IRi进行腐蚀操作:IERi=imerode(IRi,D1),其中,IERi表示二值化图像IRi被直径为8的圆形结构元素D1腐蚀后所得到的图像,i=1,2,3,···,6;D1=strel('disk',4),disk表示圆形形状。Invert the binarized image BIN i (the pixel value of 1 becomes 0, and the pixel value of 0 becomes 1) to obtain the binarized image IR i ; use the imerode function in Matlab to perform the binarized image IR i . Erosion operation: IER i =imerode(IR i , D 1 ), where IER i represents the image obtained after the binarized image IR i is eroded by the circular structuring element D 1 with a diameter of 8, i=1,2, 3, . . . , 6; D 1 =strel('disk', 4), where disk represents a circular shape.
将图像IERi进行连通区域标记的方法为:采用Matlab中连通区域标记函数bwlabel:[LJi,LNUMi]=bwlabel(IERi,8),其中,LNUMi表示图像IERi中连通区域的数量,LJi表示与图像IERi大小相同的矩阵,矩阵LJi包含了标记图像IERi中每个连通区域的类别标签,这些标签的值为1,2,…,LNUMi,8表示是按8邻域寻找连通区域;The method for labeling the connected regions of the image IER i is: using the connected region labeling function bwlabel in Matlab: [LJ i , LNUM i ]=bwlabel(IER i , 8), where LNUM i represents the number of connected regions in the image IER i , LJ i represents a matrix of the same size as the image IER i , the matrix LJ i contains the class labels of each connected region in the labeled image IER i , the values of these labels are 1, 2, ..., LNUM i , 8 means that the Neighborhood to find connected regions;
所述识别每种类型的样本的位置的方法为:连通区域标记将每一个收缩的样本区域作为一个连通区域,针对每个连通区域,采用Matlab中的regionprops函数:STATSi=regionprops(LJi,'Centroid'),'Centroid'属性就是连通区域的质心,STATSi包含了图像IERi中的每个连通区域(的形心坐标(RXi,nu,LYi,nu),其中,下标nu的值为1~20。The method for identifying the position of each type of sample is: the connected region marks each contracted sample region as a connected region, and for each connected region, the regionprops function in Matlab is adopted: STATS i =regionprops(LJ i , 'Centroid'), the 'Centroid' attribute is the centroid of the connected region, STATS i contains the centroid coordinates (RX i,nu ,LY i,nu ) of each connected region (in the image IER i ), where the subscript nu The value of 1 to 20.
校正图像的获取方法为:以图像IG1的标准的原始样品的收缩样品孔的区域的R通道、G通道和B通道的均值R1,ave、G1,ave和B1,ave为基准,后续不同时间采样点所采集的图像中的标准的原始样品所在的收缩样品孔的区域的R通道、G通道和B通道的均值为Ri,ave、Gi,ave和Bi,ave为参考,计算三个校正因子Ci,R、Ci,G和Ci,B:The acquisition method of the corrected image is: based on the mean values R 1,ave , G 1,ave and B 1,ave of the R channel, G channel and B channel of the area of the shrinkage sample hole of the standard original sample of the image IG 1 as the benchmark, The mean values of R channel, G channel and B channel in the area of the shrinkage sample hole where the standard original sample is located in the images collected at different time sampling points are R i, ave , G i , ave and B i, ave is a reference , calculate the three correction factors C i,R , C i,G and C i,B :
其中,Ci,R、Ci,G、Ci,B为图像IGi的R通道、G通道和B通道的校正因子,i=2,3,…,6;Wherein, C i,R , C i,G , C i,B are the correction factors of the R channel, G channel and B channel of the image IG i , i=2,3,...,6;
将图像IGi的所有像素点的R通道RIG,i乘以Ci,R、G通道GIG,i乘以Ci,G,B通道BIG,i乘以Ci,B,i=2,3,…,6,得到新的RGB三个通道,组成的图像为校正图像IGCi。Multiply the R channel R IG,i of all pixels of the image IG i by C i,R , the G channel G IG,i by C i,G , the B channel B IG,i by C i,B , i= 2, 3, ..., 6, three new RGB channels are obtained, and the composed image is the corrected image IGC i .
将图像IER1中的形心坐标的列坐标为LY1,1~LY1,4的连通区域的像素点置1,其它像素点置0,得到矩阵JZ1,将原始图像IG1中的所有像素点的R通道的值作为矩阵RIG,1,将原始图像IG1中的所有像素点的G通道的值作为矩阵GIG,1,将原始图像IG1中的所有像素点的B通道的值作为矩阵BIG,1;将矩阵JZ1点乘矩阵RIG,1得到矩阵DCR1,将矩阵JZ1点乘矩阵GIG,1得到矩阵DCG1,将矩阵JZ1点乘矩阵BIG,1得到矩阵DCB1;Set the pixel points of the connected area where the column coordinates of the centroid coordinates in the image IER 1 are LY 1,1 to LY 1,4 are set to 1, and the other pixel points are set to 0, to obtain a matrix JZ 1 , and set all the pixels in the original image IG 1 to 1. The value of the R channel of the pixel is taken as the matrix R IG,1 , the value of the G channel of all the pixels in the original image IG 1 is taken as the matrix G IG,1 , and the B channel of all the pixels in the original image IG 1 is taken as the matrix G IG,1 . The value is taken as the matrix B IG,1 ; the matrix JZ 1 is dot-multiplied by the matrix R IG,1 to obtain the matrix DCR 1 , the matrix JZ 1 is dot-multiplied by the matrix G IG,1 to obtain the matrix DCG 1 , and the matrix JZ 1 is dot-multiplied by the matrix B IG, 1 to get the matrix DCB 1 ;
R1,ave=sum(sum(DCR1))/sum(MJ1),R 1, ave = sum(sum(DCR 1 ))/sum(MJ 1 ),
G1,ave=sum(sum(DCG1))/sum(MJ1),G 1, ave = sum(sum(DCG 1 ))/sum(MJ 1 ),
B1,ave=sum(sum(DCB1))/sum(MJ1),B 1, ave = sum(sum(DCB 1 ))/sum(MJ 1 ),
其中,sum(sum(DCR1))是矩阵DCR1中所有元素值的总和,sum(sum(DCG1))是矩阵DCG1中所有元素值的总和,sum(sum(DCB1))是矩阵DCB1中所有元素值的总和,sum(MJ1)是图像IER1中的形心坐标的列坐标为LY1,1~LY1,4的连通区域的像素总数,MJ1=regionprops(JZ1,'Area'),'Area'属性就是图像各个区域中的像素个数。where sum(sum(DCR 1 )) is the sum of all element values in matrix DCR 1 , sum(sum(DCG 1 )) is the sum of all element values in matrix DCG 1 , and sum(sum(DCB 1 )) is the matrix The sum of all element values in DCB 1 , sum(MJ 1 ) is the total number of pixels in the connected regions whose column coordinates are LY 1,1 to LY 1,4 in the image IER 1 , and MJ 1 =regionprops(JZ 1 ,'Area'), the 'Area' property is the number of pixels in each area of the image.
将样品图像IGCi的B通道转换为相应颜色不变量:bi=BIGC,i,ave/(RIGC,i,ave+GIGC,i,ave+BIGC,i,ave),计算蓝色衰变百分比%Bt: Convert the B channel of the sample image IGC i to the corresponding color invariant: b i =B IGC,i,ave /(R IGC,i,ave +G IGC,i,ave +B IGC,i,ave ), calculate the blue Percent Color Decay % Bt :
其中,bt0是t=0时的B通道不变量,bt是时间t的B通道的颜色不变量;蓝色衰变百分比%Bt表示褐变过程为:Y=Y0+kt,where b t0 is the B channel invariant at t=0, b t is the color invariant of the B channel at time t; the percentage of blue decay % B t represents the browning process as: Y=Y 0 +kt,
其中,Y是420nm处的吸光度或5-HMF含量或%Bt,Y0是420nm处的吸光度或5-HMF含量或%Bt的初始值,t是时间,k是速度常数。where Y is the absorbance at 420 nm or 5-HMF content or %Bt, Y0 is the initial value of absorbance at 420 nm or 5-HMF content or % Bt , t is time, and k is the rate constant.
本发明的有益效果:将起泡葡萄酒样本放置在96孔板的中间位置的孔中,孔板放置在采集箱底部的漫射光源面板上,采用智能手机作为图像采集设备,从采集箱顶部的采集孔中获得起泡葡萄酒的数字图像,进行数字图像处理与分析,在RGB颜色空间中检测起泡葡萄酒的褐变,确定起泡葡萄酒的褐变程度;与两种广泛使用的研究420nm的吸光度和获得5-HMF含量的方法进行比较,蓝色通道衰减百分比与常用的褐变指数高度相关,是起泡酒褐变的新标记。本发明仅需获取不同褐变阶段的起泡葡萄酒样本的透射图像,就可以同时进行多个品牌的起泡葡萄酒褐变样本的分析,避免了复杂的样品处理,并且可以同步进行多样品分析,速度快,装置价格低,无需昂贵的专业仪器及其它化学试剂。The beneficial effects of the present invention are as follows: the sparkling wine sample is placed in the hole in the middle of the 96-well plate, the orifice plate is placed on the diffused light source panel at the bottom of the collection box, and a smart phone is used as the image collection device. Digital images of sparkling wines were obtained in the acquisition wells, digital image processing and analysis were performed to detect the browning of sparkling wines in the RGB color space, and the degree of browning of sparkling wines was determined; with two widely used studies of absorbance at 420 nm Compared with the method to obtain 5-HMF content, the blue channel decay percentage is highly correlated with the commonly used browning index, which is a new marker of browning in sparkling wine. The invention only needs to acquire transmission images of sparkling wine samples of different browning stages, and can simultaneously analyze the browning samples of sparkling wine of multiple brands, avoids complex sample processing, and can simultaneously perform multi-sample analysis, The speed is fast, the price of the device is low, and there is no need for expensive professional instruments and other chemical reagents.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为本发明的流程图。FIG. 1 is a flow chart of the present invention.
图2为本发明图像捕获装置的机构示意图。FIG. 2 is a schematic diagram of the mechanism of the image capturing device of the present invention.
图3为本发明样品的排列顺序。Fig. 3 is the arrangement sequence of the samples of the present invention.
图4为本发明样本的灰度图像。Figure 4 is a grayscale image of a sample of the present invention.
图5为本发明样本的二值化图像。FIG. 5 is a binarized image of a sample of the present invention.
图6为本发明腐蚀后的图像。Figure 6 is an image of the present invention after etching.
图7为加速褐变引起各品牌样本区域的R、G、B通道的均值变化示意图。Figure 7 is a schematic diagram of the mean value changes of R, G, and B channels of each brand sample area caused by accelerated browning.
图8为各品牌样本B通道衰减与加热时间的百分比图像。Figure 8 is an image of the percentage of decay and heating time in channel B for each brand of sample.
图9为各品牌样本420nm处的吸光度与蓝色通道衰减百分比的关系图像。Figure 9 is a graph showing the relationship between the absorbance at 420 nm and the attenuation percentage of the blue channel for each brand sample.
图10为各品牌样本5-HMF含量与蓝色通道衰变百分比的关系图。Figure 10 is a graph showing the relationship between the content of 5-HMF and the decay percentage of the blue channel in each brand sample.
图11为几种算法的定性比较。Figure 11 is a qualitative comparison of several algorithms.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
如图1所示,一种基于机器视觉的起泡葡萄酒褐变过程检测装置及方法,其步骤如下:As shown in Figure 1, a device and method for detecting the browning process of sparkling wine based on machine vision, the steps are as follows:
步骤一:搭建实验装置,制备样品。Step 1: Build the experimental device and prepare the samples.
使用四种畅销品牌的卡瓦起泡葡萄酒作为研究对象,包括Brut、Brut Reserva、Brut Gran Reserva和Semiseco,四种葡萄酒具有不同的含糖量和生产年份。初始采样时,每种类型的卡瓦葡萄酒的品质参数如表1所示。使用国际葡萄与葡萄酒组织的标准方法测量每种样品的含量糖、酒精含量、pH、游离和总二氧化硫。其中,酒精含量符合卡瓦酒酒瓶上标示的值。The study used four best-selling brands of cava sparkling wine, including Brut, Brut Reserva, Brut Gran Reserva and Semiseco, with different sugar levels and production years. At initial sampling, the quality parameters of each type of cava wine are shown in Table 1. Sugar, alcohol content, pH, free and total sulfur dioxide were measured for each sample using the standard methods of the International Organization of Vine and Wine. Among them, the alcohol content corresponds to the value indicated on the cava bottle.
表1 4种品牌Cava起泡葡萄酒的品质参数Table 1 Quality parameters of 4 brands of Cava sparkling wine
将四个品牌的起泡葡萄酒各取10mL分别装入4个20mL的琥珀色小瓶中,并在N2气流下脱气。之后将这4个装有不同品牌起泡酒的琥珀色小瓶放置在黑暗的环境中,且保存环境温度为8℃,在该环境下放置10天的时间,其褐变可以忽略不计。将这4个瓶中的不同品牌的起泡酒作为后续实验的标准样品,并将这4个装有标准样品的琥珀色小瓶命名为Bottle1、Bottle2、Bottle3、Bottle4。Four 20-mL amber vials were filled with 10 mL of each of the four brands of sparkling wine and degassed under a stream of N2 . The 4 amber vials containing different brands of sparkling wine were then placed in a dark environment at a temperature of 8°C where browning was negligible for 10 days. The different brands of sparkling wine in these 4 bottles were used as standard samples for subsequent experiments, and the 4 amber vials containing the standard samples were named Bottle1, Bottle2, Bottle3, Bottle4.
紧接着,再将四个品牌的起泡葡萄酒各取10mL分别装入4个20mL的琥珀色小瓶中,并在N2气流下脱气。将这4个装有不同品牌起泡酒的琥珀色小瓶放置在完全黑暗的环境,然后放置在烘箱中,设定65±1℃的恒温,进行加速褐变试验。并将这4个装有加速褐变样品的琥珀色小瓶命名为Bottle5、Bottle6、Bottle7、Bottle8。Immediately thereafter, 10 mL of each of the four brands of sparkling wine were filled into four 20 mL amber vials and degassed under a stream of N2 . The 4 amber vials containing different brands of sparkling wine were placed in complete darkness and then placed in an oven with a constant temperature of 65±1°C for accelerated browning tests. The 4 amber vials containing accelerated browning samples were named Bottle5, Bottle6, Bottle7, Bottle8.
在第0、2、4、6、8和10天(6个采样时间点)采集样品信息,采集的时间间隔为48小时。在每个采样时间点,(1)首先提取Brut、Brut Reserva、Brut Gran Reserva和Semiseco的标准样品各1份,从上到下依次放置在96孔板的中部的孔中,竖直排成1列,然后命名为第1列;(2)然后提取Brut、Brut Reserva、Brut Gran Reserva和Semiseco的加速褐变的样品各4份,然后每个品牌放1列,依次放入96孔板的第2~5列,如图3所示。因此,共分析了120个样品(6个采样时间点×4个Cava品牌×5份(4份加速褐变样品及1份标准样品))。Sample information was collected on
实验装置如图2所示,包括采集箱2和光源4,光源4设置在采集箱2的下方,采集箱2下部设有用于盛放样品的96孔板3,采集箱2顶部设有采集孔1,采集孔1位于孔板3的正上方。采集箱1由黑色泡沫芯板制成,内部覆盖有哑光黑色天鹅绒纸,以消除内部光线反射。采集箱1为高80cm的长方体,使得对角线和中心垂直光路之间的差异小于5%,以便减小由于光线经过不同路径而引起的差异。光源4为强度可控的漫反射光源。孔板3为96孔板,由进口光学透明纯聚苯乙稀制造,经伽玛射线灭菌处理。The experimental device is shown in Figure 2, including a
步骤二:利用智能手机的相机获取样品图像,将获得的RGB图像进行灰度化和二值化处理。Step 2: Use the camera of the smartphone to obtain the sample image, and perform grayscale and binarization processing on the obtained RGB image.
使用微量移液管(0.3ml)将卡瓦起泡葡萄酒样品排列在孔板3的中部的孔中,每孔加0.15ml样品,将孔板3放置在光源4的面板上,将采集箱2罩在孔板3上,采集孔1位于孔板3的正上方。将智能手机放置在采集箱顶部的采集孔1上,使用智能手机的内置相机以最高的分辨率获得图像(3888×5152=20030976像素),并保存为JPEG格式。每次采集时,获取孔板中的所有样品到同一个图像中,以避免由于照明源的波动或智能手机晃动造成的影响。为了提高效率,并能够在不同的样品图像之间进行比较,每次采集图像时都会在孔板的第1列放置标准的原始样品,取自每个采用时间点的Bottle1、Bottle2、Bottle3、Bottle4。Use a micropipette (0.3ml) to arrange the cava sparkling wine samples in the holes in the middle of the
在96孔板的中心位置放置样品,从左到右依次排列,第1列为标准的原始样品(每种起泡葡萄酒1份,分别来自Bottle1、Bottle2、Bottle3和Bottle4,共4份),第2列为Brut样品4份(来自Bottle5),第3列为Brut Reserva样品4份(来自Bottle6),第4列为Brut GranReserva样品4份(来自Bottle7),第5列为Semiseco样品4份(来自Bottle8),如图3所示。Place the samples in the center of the 96-well plate and arrange them in order from left to right. The first column is the standard original sample (1 for each sparkling wine, respectively from Bottle1, Bottle2, Bottle3 and Bottle4, a total of 4 samples), the
首先获取包含加速褐变的起泡葡萄酒样品与标准起泡葡萄酒的样品的图像,在后续的采样时间点采集包含褐变样本和标准样品的图像。通过在6个采样时间点获取6个图像,在第1次,获取孔板中的标准样品和经过0天加速褐变的样品的图像IG1;在第2次,获取孔板中的标准样品和经过2天加速褐变的样品的图像IG2;在第3次,获取孔板中的标准样品和经过4天加速褐变的样品的图像IG3;在第4次,获取孔板中的标准样品和经过6天加速褐变的样品的图像IG4;在第5次,获取孔板中的标准样品和经过8天加速褐变的样品的图像IG5;在第6次,获取孔板中的标准样品和经过10天加速褐变的样品的图像IG6。每次采样时间点获取图像前,都要从Bottle1~Bottle8取出样品放入孔板中的相应位置,如图3所示。采集样品的图像时,在相机的预览视窗中尽量保证装有样品的每列处于竖直状态,使得获取的图像接近图3中的样品放置的理想位置,以便于后续的图像处理。Images of samples containing accelerated browning sparkling wine samples and standard sparkling wines were acquired first, and images containing browning samples and standard samples were acquired at subsequent sampling time points. By acquiring 6 images at 6 sampling time points, in the 1st time, the standard sample in the well plate and the image IG1 of the sample with accelerated browning after 0 days are acquired; in the 2nd time, the standard sample in the well plate is acquired and images IG 2 of the samples with accelerated browning over 2 days; on the 3rd, images of the standard sample in the well plate and images IG 3 of the samples with accelerated browning over 4 days; Image IG4 of standard sample and samples with accelerated browning over 6 days; at 5th time, image IG5 of standard sample in well plate and sample with accelerated browning over 8 days; at 6th time, acquire well plate Images of standard samples in IG6 and samples with accelerated browning over 10 days. Before acquiring images at each sampling time point, samples should be taken from Bottle1 to Bottle8 and placed in the corresponding position of the well plate, as shown in Figure 3. When collecting the image of the sample, try to ensure that each column containing the sample is in a vertical state in the preview window of the camera, so that the obtained image is close to the ideal position of the sample in Figure 3, so as to facilitate subsequent image processing.
使用白板研究照明和测量的均匀性,将白板放置在漫反射光源上,并采用智能手机的内置相机以最高的分辨率获得图像IB(3888×5152=20030976像素),将图像IB平均分为322×243=78246块(各个块表示为BKnum1,num2,num1的值为1~322,num2的值为1~243),每块的大小为16×16=256像素。统计BKnum1,num2的RGB三通道的均值BKnum1,num2,ave。The uniformity of illumination and measurement was studied using a whiteboard, which was placed on a diffuse light source, and the image IB was obtained at the highest resolution (3888×5152=20030976 pixels) using the smartphone’s built-in camera, and the image IB was equally divided into 322 ×243=78246 blocks (each block is represented as BK num1, num2 , the value of num1 is 1˜322, and the value of num2 is 1˜243), and the size of each block is 16×16=256 pixels. Statistics BK num1, num2 RGB three-channel mean BK num1, num2, ave .
其中,RIB(x,y)、GIB(x,y)和BIB(x,y)分别表示图像IB中在像素点(x,y)处的R通道的值、G通道的值和B通道的值。x的取值范围为0~3887,y的取值范围为0~5151。Among them, R IB (x, y), G IB (x, y) and B IB (x, y) represent the value of R channel, the value of G channel and the value of R channel at pixel point (x, y) in image IB, respectively. The value of the B channel. The value range of x is 0 to 3887, and the value range of y is 0 to 5151.
统计BKnum1,num2,ave中的最大值MAXbk及最小值MINbk,经过计算,最大差异(MAXbk-MINbk)/MAXbk小于1%,表明外部照明的影响较小,满足本发明对照明的均匀性的要求。本发明使用孔板中心位置的图像数据,以此来尽量减小误差。Statistics of the maximum value MAX bk and the minimum value MIN bk in BK num1, num2 and ave , after calculation, the maximum difference (MAX bk -MIN bk )/MAX bk is less than 1%, indicating that the influence of external lighting is small, which satisfies the present invention Requirements for uniformity of lighting. The present invention uses the image data of the center position of the orifice plate to minimize errors.
将智能手机获得的RGB图像IGi(i的值为1~6)转换为灰度图像Grayi,采用平均值法,即提取RGB三通道的平均值作为灰度值:Convert the RGB image IG i (the value of i is 1 to 6) obtained by the smartphone into a grayscale image Gray i , and use the average value method, that is, extract the average value of the three RGB channels as the gray value:
Grayi(x,y)=(RIG,i(x,y)+GIG,i(x,y)+BIG,i(x,y))/3Gray i (x,y)=( RIG,i (x,y)+ GIG,i (x,y)+ BIG,i (x,y))/3
其中,RIG,i(x,y)、GIG,i(x,y)、BIG,i(x,y)分别为图像IGi中的像素点(x,y)处的R、G、B通道的值;Grayi(x,y)表示灰度图像在像素点(x,y)处的灰度值,如图4所示。Among them, R IG,i (x,y), G IG,i (x,y), B IG,i (x,y) are R, G at the pixel point (x, y) in the image IG i , respectively , the value of the B channel; Gray i (x, y) represents the gray value of the gray image at the pixel point (x, y), as shown in Figure 4.
需要确定阈值才能对灰度图像Grayi进行二值化处理,最大类间方差法(Ostu)计算简单、稳定有效,是实际应用中经常采用的确定阈值的方法。Ostu算法被认为是图像分割中阈值选取的较佳算法,该算法不受图像亮度和对比度的影响,因此在数字图像处理上得到了广泛的应用。Ostu算法是按图像的灰度特性,将图像分成背景和前景两部分。背景和前景之间的类间方差越大,说明构成图像的两部分的差别越大,当部分前景错分为背景或部分背景错分为前景都会导致两部分差别变小,因此,使类间方差最大的分割意味着错分概率最小。The threshold value needs to be determined to binarize the gray image Gray i . The maximum inter-class variance method (Ostu) is simple, stable and effective in calculation, and is often used in practical applications to determine the threshold value. Ostu algorithm is considered to be the best algorithm for threshold selection in image segmentation. The algorithm is not affected by image brightness and contrast, so it has been widely used in digital image processing. The Ostu algorithm divides the image into two parts: background and foreground according to the grayscale characteristics of the image. The greater the inter-class variance between the background and the foreground, the greater the difference between the two parts of the image. When part of the foreground is mistakenly classified as the background or part of the background is mistakenly classified as the foreground, the difference between the two parts will become smaller. The split with the largest variance means the smallest probability of misclassification.
设灰度图像的灰度级是L,则灰度范围为[0,L-1],利用Ostu算法计算灰度图像的最佳阈值为:Assuming that the gray level of the grayscale image is L, the grayscale range is [0, L-1], and the optimal threshold for calculating the grayscale image using the Ostu algorithm is:
σ=Max[w0(gt)×(u0(gt)-u)^2+w1(gt)×(u1(gt)-u)^2)]σ=Max[w 0 (gt)×(u 0 (gt)-u)^2+w 1 (gt)×(u 1 (gt)-u)^2)]
其中,w0为前景比例,u0为前景灰度均值,w1为背景比例,u1为背景灰度均值,u为整幅灰度图像的均值,使得σ最大的灰度值gt就是分割图像的最佳阈值T。Among them, w 0 is the foreground ratio, u 0 is the average foreground gray value, w 1 is the background ratio, u 1 is the background gray average value, and u is the average value of the entire gray image, so that the gray value gt with the largest σ is the segmentation The optimal threshold T for the image.
对灰度图像Grayi(x,y)使用上面的准则找到最佳阈值T,将图像分割为2个部分,得到二值化图像BINi(x,y)。Use the above criteria to find the optimal threshold T for the grayscale image Gray i (x, y), divide the image into 2 parts, and obtain the binarized image BIN i (x, y).
其中,Grayi(x,y)为灰度图像Grayi中(x,y)处的像素的值,i的取值为1~6(共采集6次图像,每次获得1个图像),二值化后的图像BINi(x,y)如图5所示。Among them, Gray i (x, y) is the value of the pixel at (x, y) in the grayscale image Gray i , and the value of i is 1 to 6 (a total of 6 images are collected, and one image is obtained each time), The binarized image BIN i (x, y) is shown in Figure 5.
步骤三:将图像BINi中的像素全部取反,得到二值化图像IRi;运用结构元素对图像IRi进行腐蚀得到图像IERi,获得装有样品的孔的收缩区域,防止装有样品的孔的边缘对样品的图像处理造成干扰。Step 3: Invert all the pixels in the image BIN i to obtain a binarized image IR i ; use structural elements to corrode the image IR i to obtain the image IER i , obtain the shrinkage area of the hole containing the sample, and prevent the sample from being installed. The edges of the wells interfere with the image processing of the sample.
D1表示直径为4的圆形结构元素,其创建函数为:D 1 represents a circular structuring element with a diameter of 4, and its creation function is:
D1=strel('disk',4)D 1 =strel('disk',4)
其含义为创建一个半径为4(即直径为8)的圆形结构元素,disk表示圆形形状。strel函数的功能是构造结构元素(Structuring element),所谓结构元素,可以看做是一张小图像,它通常用于图像的形态学运算(如膨胀、腐蚀、开运算和闭运算等)。Its meaning is to create a circular structuring element with a radius of 4 (that is, a diameter of 8), and disk represents a circular shape. The function of the strel function is to construct a structuring element. The so-called structuring element can be regarded as a small image, which is usually used for image morphological operations (such as dilation, erosion, opening and closing operations, etc.).
将图像BINi中的像素全部取反,得到图像IRi。即图像BINi中原来的像素点的值为0,则变为1;原来的像素点的值为1,则变为0。Invert all the pixels in the image BIN i to get the image IR i . That is, if the value of the original pixel in the image BIN i is 0, it becomes 1; if the value of the original pixel is 1, it becomes 0.
采用Matlab中的imerode函数将二值化图像IRi进行形态学处理中的腐蚀操作,具体的操作方法为:Use the imerode function in Matlab to perform the corrosion operation in the morphological processing on the binarized image IR i . The specific operation method is as follows:
IERi=imerode(IRi,D1)IER i =imerode(IR i ,D 1 )
其中,IERi表示二值化图像IRi被直径为8的圆形结构元素D1腐蚀后所得到的图像,i=1,2,···,6。如图6所示。利用圆形结构元素D1对二值化图像IRi进行形态学的腐蚀处理,去除了图像中未盛放样品的空孔的边界,同时也去除盛放样品的孔的边界,得到样品中心区域的图像,即样品的孔的收缩区域,防止装有样品的孔的边缘对样品的图像处理造成干扰。图像中装有样品的孔的区域中,通过采用形态学的腐蚀方法将图像中的样本区域进行了腐蚀(达到了收缩样本区域的目的),只采用孔内部的像素,去除了孔的边界的影响。Among them, IER i represents the image obtained after the binarized image IR i is eroded by the circular structuring element D 1 with a diameter of 8, i=1, 2, ···, 6. As shown in Figure 6. The circular structuring element D 1 is used to morphologically corrode the binarized image IR i to remove the boundaries of the empty holes in the image that do not hold the sample, and also remove the boundary of the holes that hold the sample, so as to obtain the central area of the sample. The image of the sample, the constricted area of the well of the sample, prevents the edge of the well containing the sample from interfering with the image processing of the sample. In the area of the hole containing the sample in the image, the sample area in the image is eroded by using the morphological corrosion method (to achieve the purpose of shrinking the sample area), only the pixels inside the hole are used, and the boundary of the hole is removed. influences.
步骤四:将图像IERi进行连通区域标记,根据连通区域标记识别每种类型的样本的位置。Step 4: Mark the image IER i with connected regions, and identify the location of each type of sample according to the connected region markers.
图像IERi进行连通区域标记,用于对装有不同样本的孔的图像进行处理。如果E与F连通,F与G连通,则E与G连通。在视觉上看来,彼此连通的点形成了一个区域,而不连通的点形成了不同的区域。这样一个所有的彼此连通点构成的集合称为一个连通区域。二值化图像分析最重要的方法就是连通区域标记,它通过对二值化图像中白色像素(目标)的标记让每个单独的连通区域形成一个被标识的块,进一步地可以获取这些块的面积、轮廓、外接矩形、质心和不变矩等几何参数。Image IER i for connected region labeling for processing images of wells containing different samples. If E is connected to F and F is connected to G, then E is connected to G. Visually, points that are connected to each other form one area, and points that are not connected to each other form a different area. Such a set of all connected points is called a connected region. The most important method of binarized image analysis is connected region marking, which makes each individual connected region form a marked block by marking the white pixels (targets) in the binarized image. Geometric parameters such as area, contour, circumscribed rectangle, centroid, and invariant moments.
本发明采用Matlab中连通区域标记函数bwlabel:[LJi,LNUMi]=bwlabel(IERi,8),其中LNUMi表示图像IERi中连通区域的数量,由于每个图像中都有20个样品,所以LNUMi=20。LJi表示和IERi为大小相同的矩阵,LJi矩阵包含了标记图像IERi中每个连通区域的类别标签,这些标签的值为1,2,…,LNUMi,公式中的8表示是按8邻域寻找连通区域。The present invention adopts the connected region labeling function bwlabel in Matlab: [LJ i , LNUM i ]=bwlabel(IER i , 8), wherein LNUM i represents the number of connected regions in the image IER i , since there are 20 samples in each image , so LNUM i =20. LJ i represents a matrix of the same size as IER i . The LJ i matrix contains the class labels of each connected region in the labeled image IER i . The values of these labels are 1, 2, ..., LNUM i , and 8 in the formula means yes Find connected regions by 8 neighborhoods.
函数bwlabel的算法是一次遍历图像,并记下每一行(或列)中连续的团和标记的等价对,然后通过等价对对原来的图像进行重新标记。这个算法是目前效率较高的一个,算法中用到了稀疏矩阵与Dulmage-Mendelsohn分解算法用来消除等价对。The algorithm of the function bwlabel is to traverse the image once, and note the equivalent pairs of consecutive cliques and labels in each row (or column), and then relabel the original image by the equivalent pairs. This algorithm is one of the most efficient at present. The sparse matrix and Dulmage-Mendelsohn decomposition algorithm are used in the algorithm to eliminate equivalent pairs.
将图像IERi进行连通区域标记,实现每一个收缩的样本区域作为一个连通区域,针对每个连通区域,采用Matlab中regionprops函数:STATSi=regionprops(LJi,'Centroid'),'Centroid'属性就是该区域的质心(即连通区域的形心)。The image IER i is marked as a connected region, and each contracted sample region is regarded as a connected region. For each connected region, the regionprops function in Matlab is used: STATS i =regionprops(LJ i ,'Centroid'), 'Centroid' property is the centroid of the region (ie, the centroid of the connected region).
根据regionprops函数计算得到的STATSi包含了图像IERi中的每个连通区域(即每个样本区域)的形心坐标(RXi,nu,LYi,nu),其中nu的值为1~20。这些连通区域的形心按照列坐标从小到大排列为LYi,1~LYi,20,其中列坐标最小的LYi,1~LYi,4这4个样本区域,即为样本图像中的标准样品区域(该列共有四个样品,从上到下依次为Brut标准样品、BrutReserva标准样品、Brut Gran Reserva标准样品、Semiseco标准样品);列坐标为LYi,5~LYi,8这4个样本区域,即为样本图像中的Brut样品区域;列坐标为LYi,9~LYi,12这4个样本区域,即为样本图像中的Brut Reserva样品区域;列坐标为LYi,13~LYi,16这4个样本区域,即为样本图像中的Brut Gran Reserva样品区域;列坐标为LYi,17~LYi,20这4个样本区域,即为样本图像中的Semiseco样品区域。The STATS i calculated according to the regionprops function contains the centroid coordinates (RX i,nu ,LY i,nu ) of each connected region (that is, each sample region) in the image IER i , where the value of nu is 1 to 20 . The centroids of these connected regions are arranged as LY i,1 to LY i,20 according to the column coordinates from small to large, and the four sample regions of LY i,1 to LY i,4 with the smallest column coordinates are the sample regions in the sample image. Standard sample area (there are four samples in this column, from top to bottom are Brut standard sample, BrutReserva standard sample, Brut Gran Reserva standard sample, Semiseco standard sample); the column coordinates are LY i,5 ~ LY i,8 The four sample areas are the Brut sample areas in the sample image; the column coordinates are LY i,9 to LY i,12 , the four sample areas are the Brut Reserva sample areas in the sample image; the column coordinates are LY i,13 The four sample areas of ~LY i,16 are the Brut Gran Reserva sample areas in the sample image; the column coordinates are the four sample areas of LY i,17 ~LY i,20 , which are the Semiseco sample areas in the sample image .
步骤五:以图像IG1的标准的原始样品的收缩样品孔的区域的R通道、G通道和B通道的均值为基准计算校正因子,并对图像IGi各通道进行颜色校正,得到校正图像IGCi,i=2,…6。Step 5: Calculate the correction factor based on the mean value of the R channel, G channel and B channel of the shrinkage sample hole area of the standard original sample of the image IG 1 , and perform color correction on each channel of the image IG i to obtain the corrected image IGC i , i=2,...6.
将图像IER1中的形心坐标的列坐标为LY1,1~LY1,4的连通区域的像素点置1,其它像素点置0,得到矩阵JZ1,然后将原始图像IG1中的所有像素点的R通道的值作为矩阵RIG,1,将原始图像IG1中的所有像素点的G通道的值作为矩阵GIG,1,将原始图像IG1中的所有像素点的B通道的值作为矩阵BIG,1。将JZ1点乘RIG,1得到DCR1,将JZ1点乘GIG,1得到DCG1,将JZ1点乘BIG,1得到DCB1。The column coordinates of the centroid coordinates in the image IER 1 are set to 1 for the pixels of the connected area of LY 1,1 to LY 1,4 , and the other pixels are set to 0 to obtain a matrix JZ 1 , and then set the pixels in the original image IG 1 to 1. The values of the R channels of all pixels are taken as the matrix R IG,1 , the values of the G channels of all the pixels in the original image IG 1 are taken as the matrix G IG,1 , and the B channels of all the pixels in the original image IG 1 are taken as the matrix G IG,1 . The values as matrix B IG,1 . Multiply JZ 1 by R IG,1 to get DCR 1 , multiply JZ 1 by G IG,1 to get DCG 1 , and multiply JZ 1 by B IG,1 to get DCB 1 .
采用matlab中的regionprops函数:MJ1=regionprops(JZ1,'Area'),计算图像IG1的标准样品的收缩孔的区域的R通道的均值。该函数包含的'Area'属性就是图像各个区域中像素总个数。Using the regionprops function in matlab: MJ 1 =regionprops(JZ 1 ,'Area'), calculate the mean value of the R channel of the area of the shrinkage hole of the standard sample of the image IG 1 . The 'Area' property contained in this function is the total number of pixels in each area of the image.
R1,ave=sum(sum(DCR1))/sum(MJ1),R 1, ave = sum(sum(DCR 1 ))/sum(MJ 1 ),
G1,ave=sum(sum(DCG1))/sum(MJ1),G 1, ave = sum(sum(DCG 1 ))/sum(MJ 1 ),
B1,ave=sum(sum(DCB1))/sum(MJ1),B 1, ave = sum(sum(DCB 1 ))/sum(MJ 1 ),
其中,sum(sum(DCR1))是矩阵DCR1中所有元素值的总和,sum(sum(DCG1))是矩阵DCG1中所有元素值的总和,sum(sum(DCB1))是矩阵DCB1中所有元素值的总和,sum(MJ1)是图像IER1中的形心坐标的列坐标为LY1,1~LY1,4的连通区域的像素总数。同理,计算得到G1,ave和B1,ave。where sum(sum(DCR 1 )) is the sum of all element values in matrix DCR 1 , sum(sum(DCG 1 )) is the sum of all element values in matrix DCG 1 , and sum(sum(DCB 1 )) is the matrix The sum of all element values in DCB 1 , sum(MJ 1 ) is the total number of pixels in the connected region whose column coordinates are LY 1,1 to LY 1,4 in the image IER 1 . Similarly, G 1,ave and B 1,ave are obtained by calculation.
同理,计算得到图像IGi的标准样品的收缩样品孔的区域的R通道、G通道和B通道的均值Ri,ave、Gi,ave和Bi,ave,其中i=2,3,…,6。In the same way, the average values Ri ,ave , Gi ,ave and B i,ave of the R channel, G channel and B channel in the area of the shrinkage sample hole of the standard sample of the image IG i are calculated, where i=2,3, …, 6.
然后进行颜色校正。以图像IG1的标准的原始样品的收缩样品孔的区域的R通道、G通道和B通道的均值R1,ave、G1,ave和B1,ave为基准,后续不同时间采样点所采集的图像IGi(i=2,3,…,6)中的标准的原始样品所在的孔的区域的R通道、G通道和B通道的均值为Ri,ave、Gi,ave和Bi,ave为参考(其中i=2,3,…,6),计算三个校正因子Ci,R、Ci,G和Ci,B(其中i=2,3,…,6)。Then do color correction. Based on the average values R 1,ave , G 1,ave and B 1,ave of the R channel, G channel and B channel of the shrinkage sample hole area of the standard original sample of the image IG 1 The mean values of R channel, G channel and B channel in the area of the well where the standard original sample is located in the image IG i (i=2,3,...,6) are R i , ave , Gi , ave and B i , ave is the reference (where i=2,3,...,6), three correction factors C i,R , C i,G and C i,B (where i=2,3,...,6) are calculated.
其中,Ci,R、Ci,G、Ci,B为图像IGi的R通道、G通道和B通道的校正因子。Among them, C i,R , C i,G , C i,B are the correction factors of the R channel, the G channel and the B channel of the image IG i .
将图像IGi的所有像素点的R通道RIG,i乘以Ci,R、G通道GIG,i乘以Ci,G,B通道BIG,i乘以Ci,B,得到新的RGB三个通道,组成的图像命名为校正图像IGCi,其中i=2,3,…,6。Multiply the R channel R IG,i of all pixels of the image IG i by C i,R , G channel G IG , i by C i,G , B channel B IG,i by C i,B , to get a new The three channels of RGB, the composed image is named as the corrected image IGC i , where i=2, 3, . . . , 6.
步骤六:计算校正后的图像IGCi的各个品牌样品的收缩孔的区域的R、G、B通道的均值,选取B通道作为褐变的参数。Step 6: Calculate the mean value of R, G, and B channels of the shrinkage hole area of each brand sample of the corrected image IGC i , and select the B channel as the browning parameter.
采用之前的方法,得到校正图像IGCi(i=1,2,…,6)的各品牌加速褐变样本的收缩区域的R、G、B三通道的均值RIGC,i,ave、GIGC,i,ave、BIGC,i,ave,并画图,如图7所示。图7显示了伴随加热时间,样品区域的R、G和B通道值的演变。可以看出,加速变化主要反映在B通道,而R和G值基本保持恒定。随着加热时间的增加,这表现为更深的黄色,即向更浅的棕色变化。Brut和GRes样品的B通道的变化具有明显的线性依赖性,而在Res和SS中,48小时后的褐变开始,此后蓝色通道值和时间之间再次呈线性依赖关系。原始的起泡葡萄酒样品显示出其颜色的轻微差异,如Brut和Brut Reserva(Res)样品彼此更相似。而Semiseco(SS)和BrutGran Reserva(GRes)显示较大的差异,样本之间的最大差异在于蓝色通道。Using the previous method, the mean values R IGC,i,ave , G IGC of the three channels of R, G, and B in the shrinkage area of each brand of accelerated browning samples of the corrected image IGC i (i=1,2,...,6) were obtained ,i,ave , B IGC,i,ave , and draw a picture, as shown in Figure 7. Figure 7 shows the evolution of R, G and B channel values for the sample area with heating time. It can be seen that the acceleration changes are mainly reflected in the B channel, while the R and G values remain basically constant. This manifested as a darker yellow, ie a change to a lighter brown, as the heating time increased. The changes in the B channel of Brut and GRes samples showed a clear linear dependence, while in Res and SS, the browning started after 48 h, after which there was a linear dependence again between the blue channel value and 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. While Semiseco (SS) and BrutGran Reserva (GRes) show larger differences, the largest difference between samples is in the blue channel.
步骤七:计算B通道颜色不变量和蓝色衰变百分比;蓝色衰变百分比与时间具有线性关系,与起泡葡萄酒的褐变过程相符。Step 7: Calculate the B channel color invariant and blue decay percentage; the blue decay percentage has a linear relationship with time, which is consistent with the browning process of sparkling wine.
除了使用了RIGC,i,ave、GIGC,i,ave、BIGC,i,ave值的变化进行分析,还采用了R、G、B颜色不变量对褐变进行研究。将样品图像IGCi的B通道转换为相应颜色不变量(bi=BIGC,i,ave/(RIGC,i,ave+GIGC,i,ave+BIGC,i,ave)),以量化和比较褐变。B通道颜色不变量类似于吸光度,可以计算蓝色衰变百分比(%Bt)。此时的bi对应于bt。In addition to using the changes in R IGC,i,ave , G IGC,i,ave , B IGC,i,ave values for analysis, browning was studied using R, G, and B color invariants. Convert the B channel of the sample image IGC i to the corresponding color invariant (b i =B IGC,i,ave /(R IGC,i,ave +G IGC,i,ave +B IGC,i,ave )), with Quantify and compare browning. The B channel color invariant is similar to absorbance, and the percent blue decay (% Bt ) can be calculated. b i at this time corresponds to b t .
其中,bt0是t=0时的B通道不变量,bt是时间t的B通道的颜色不变量。图8显示了所研究的样品的%Bt随时间的变化,可以看出,褐变反映在%Bt随时间线性增加。where b t0 is the B channel invariant at t=0, and b t is the color invariant of the B channel at time t. Figure 8 shows the change in % Bt over time for the samples studied, and it can be seen that browning is reflected in a linear increase in % Bt over time.
对于Brut,R2为0.99。For Brut, R2 was 0.99.
对于Brut Reserva,R2为0.93。For Brut Reserva, R2 was 0.93.
对于Semiseco,R2为0.93。For Semiseco, R2 was 0.93.
对于Brut Gran Reserva,R2为0.96。For Brut Gran Reserva, R2 was 0.96 .
其中,xday为时间单位(天)。where x day is the time unit (day).
在岛津紫外分光光度计(UV-3600,德国杜伊斯堡)中使用10mm路径长度的石英比色杯和双蒸水作为参考,测量4种品牌的Cava起泡葡萄酒在420nm处的吸光度。在420nm(A420)的吸光度值乘以1000倍,表示为毫吸光度单位(milli-absorbance units,简称mAU)。根据国际葡萄与葡萄酒组织的方法在每个样品中测定5-HMF,使用具有四级L-7100泵、L-7455二极管阵列检测器及LaChrom色谱柱的日立液相色谱仪(Hitachi)进行4种品牌的Cava起泡葡萄酒的液相色谱分析。本发明中的图像采集设备是华为荣耀7智能手机,具有5.2英寸触摸显示屏,分辨率为1920像素×1080像素,2000万像素摄像头(5152×3888像素图像),支持PDAF相位检测快速对焦,F2.0光圈。on a Shimadzu UV spectrophotometer ( UV-3600, Duisburg, Germany) using a 10 mm path length quartz cuvette and double distilled water as a reference to measure the absorbance at 420 nm of 4 brands of Cava sparkling wine. The absorbance value at 420 nm (A 420 ) was multiplied by a factor of 1000 and expressed as milli-absorbance units (mAU for short). 5-HMF was determined in each sample according to the method of the International Organization of Vine and Wine, using a Hitachi liquid chromatograph (Hitachi) with a quadruple L-7100 pump, L-7455 diode array detector and LaChrom column for 4 Liquid chromatography analysis of branded Cava sparkling wine. The image acquisition device in the present invention is a
为了评估本发明检测效果,将%Bt与其它常规褐变监测参数(如A420和5-HMF含量)进行比较,图9显示了在420nm(A420)处测量的吸光度和%Bt之间的相关性。In order to evaluate the detection effect of the present invention, the % Bt was compared with other conventional browning monitoring parameters such as A420 and 5-HMF content, Figure 9 shows the difference between the absorbance measured at 420nm ( A420 ) and the % Bt correlation between.
进行线性回归分析以确定这些褐变指标之间的关系:Linear regression analysis was performed to determine the relationship between these browning indicators:
对于Brut,R2为0.98。For Brut, R2 was 0.98.
对于Brut Reserva,R2为0.98。For Brut Reserva, R2 was 0.98.
对于Semiseco,R2为0.99。For Semiseco, R2 was 0.99.
对于Brut Gran Reserva,R2为0.96。For Brut Gran Reserva, R2 was 0.96 .
其中,x为样品在420nm(A420)处的吸光度,y为%Bt。where x is the absorbance of the sample at 420 nm (A 420 ) and y is %B t .
结果表明,%Bt与A420所表示的褐变指数呈现相似的趋势。应注意两种不同方法之间具有高度的相关性。考虑到420nm对应于蓝色和紫色之间的边界中的颜色,吸收带将给样品带黄色至橙色/棕色,相应地,这些变化将反映在图像的B通道中。同样显著的是,不同样品之间存在一致性,它们的斜率非常相似,特别是Brut、Res和SS样品。The results showed that the browning index expressed by %B t and A420 showed a similar trend. It should be noted that there is a high correlation between the two different methods. Considering that 420 nm corresponds to a color in the border between blue and violet, the absorption band will give the sample a yellowish to orange/brown tinge, and accordingly these changes will be reflected in the B channel of the image. It is also remarkable that there is agreement between the different samples with very similar slopes, especially the Brut, Res and SS samples.
另一方面,图10显示了%Bt和5-HMF含量之间的相关性。进行线性回归分析以确定这些褐变指标之间的关系:On the other hand, Figure 10 shows the correlation between % Bt and 5-HMF content. Linear regression analysis was performed to determine the relationship between these browning indicators:
对于Brut,R2为0.93。For Brut, R2 was 0.93.
对于Brut Reserva,R2为0.97。For Brut Reserva, R2 was 0.97.
对于Semiseco,R2为0.99。For Semiseco, R2 was 0.99.
对于Brut Gran Reserva,R2为0.91。For Brut Gran Reserva, R2 was 0.91.
其中,x为样品的5-HMF含量,y为%Bt。where x is the 5-HMF content of the sample and y is the % Bt .
可以看出,它们之间存在很高的相关性,特别是Brut,Res和SS样本。应该注意的是,5-HMF不是唯一指示葡萄酒褐变的化合物,因此斜率值的差异可归因于其它化合物的存在也影响葡萄酒的颜色。It can be seen that there is a high correlation among them, especially the Brut, Res and SS samples. It should be noted that 5-HMF is not the only compound indicative of wine browning, so the difference in slope values can be attributed to the presence of other compounds that also affect wine color.
关于%Bt、5-HMF含量和A420获得的结果显示了褐变过程的特点,其可以通过以下等式描述:The results obtained with respect to % Bt , 5-HMF content and A 420 characterize the browning process, which can be described by the following equation:
Y=Y0+kt (8)Y=Y 0 +kt (8)
其中,Y是420nm处的吸光度(mAU)或5-HMF含量或%Bt,t是时间(以天为单位),k是速度常数(表示为A420的mAU/day,5-HMF的mg/L/天,对于Bt的蓝色通道每天的百分比衰减)。where Y is the absorbance at 420 nm (mAU) or 5-HMF content or %B t , t is the time (in days), k is the rate constant (expressed as mAu/day of A 420 , mg of 5-HMF /L/day, percent decay per day for the blue channel of Bt ).
零级动力学(zero-order elimination kineics)是指药物在体内以恒定的速率消除,即不论血浆药物浓度高低,单位时间内消除的药物量不变。产生零级动力学过程的主要原因是药物代谢酶、药物转运体以及药物与血浆蛋白结合的饱和过程,零级动力学过程有主动转运的特点。零级动力学是从自然力体系中建立起来,如电磁力,生物力学,引力。零级动力学的内涵丰富,自然天成,启示深远,应用广泛。本发明采用零级动力学的相关理论,进行起泡葡萄酒褐变的研究。零级动力学的公式与上式相同(此时,k为零级速率常数,Y0为初始血药浓度,Y为t时的血药浓度)。对于每个样品的零级动力学计算的速度常数和监测方法如表2所示。可以看出,使用%Bt作为对照变量也观察到零级动力学(表2和图8)。此外,尽管评估的褐变速率常数的值根据不同的使用方法而不同,但结果之间的关系确实遵循相同的趋势。Zero-order elimination kinetics refers to the elimination of drugs in the body at a constant rate, that is, the amount of drug eliminated per unit time remains unchanged regardless of the plasma drug concentration. The main reason for the zero-order kinetic process is the saturation process of drug metabolizing enzymes, drug transporters, and drug binding to plasma proteins. The zero-order kinetic process has the characteristics of active transport. Zero-order dynamics are built up from the system of natural forces, such as electromagnetism, biomechanics, and gravity. Zero-order dynamics has rich connotations, is natural, has far-reaching inspiration and is widely used. The invention adopts the relevant theory of zero-order kinetics to conduct research on the browning of sparkling wine. The formula of zero-order kinetics is the same as the above formula (at this time, k is the zero-order rate constant, Y 0 is the initial blood drug concentration, and Y is the blood drug concentration at t). The calculated rate constants and monitoring methods for the zero-order kinetics of each sample are shown in Table 2. As can be seen, zero order kinetics were also observed using % Bt as a control variable (Table 2 and Figure 8). Furthermore, although the values of the browning rate constants evaluated varied according to the different methods of use, the relationship between the results did follow the same trend.
表2零级动力学参数(A420、5-HMF、%Bt)Table 2 Zero-order kinetic parameters (A 420 , 5-HMF, %B t )
随着时间增加,起泡葡萄酒在不断发酵(从Brut Gran Reserva到Brut Reserva),褐变速度常数随着糖含量的增加而增加(从Brut到Semiseco)。显示糖含量恒定的速度增加,如预期的那样,5-HMF形成与初始糖含量高度相关,因为5-HMF形成速率是糖依赖性的(Camara J S,Alves M A,Marques J C.Changes in volatile composition of Madeirawines during their oxidative ageing[J].Analytica Chimica Acta,2006,563(1):188-197.)。因此,最少受褐变过程影响的起泡葡萄酒似乎是最高质量的葡萄酒(Brut GranReserva,Brut Reserva)。图11以图形方式总结了获得的结果,可以看出,本发明使褐变过程得以表征,并且与已知方法完全一致。Sparkling wines ferment over time (from Brut Gran Reserva to Brut Reserva), and the browning rate constant increases with increasing sugar content (from Brut to Semiseco). showed a constant rate increase in sugar content, and as expected, 5-HMF formation was highly correlated with initial sugar content because the rate of 5-HMF formation was sugar dependent (Camara J S, Alves M A, Marques J C. Changes in volatile composition of Madeirawines during their oxidative ageing[J].Analytica Chimica Acta,2006,563(1):188-197.). Therefore, the sparkling wines that are least affected by the browning process appear to be the highest quality wines (Brut GranReserva, Brut Reserva). Figure 11 summarizes the results obtained graphically and it can be seen that the present invention enables the characterization of the browning process and is in complete agreement with known methods.
本发明提出了一种用于监测起泡葡萄酒的褐变过程的比色法,该方法速度快、耗费低。以智能手机的相机为采集装置,并且用于对卡瓦葡萄酒的透射图像进行分析,避免了复杂的样品处理,并且可以进行单步多样品分析。本发明提出了一种新的控制参数,随时间的推移,蓝色通道百分比衰减,这使得褐变动力学得以研究和表征。即R、G通道在褐变过程中几乎保持不变,褐变过程具有时间依赖性,随时间增长而主要影响B通道。本发明提出将蓝色通道衰减百分比%Bt作为起泡葡萄酒的质量标记,该值与420nm处的吸光度和5-羟甲基-2-糠醛的含量高度相关,420nm处的吸光度和5-羟甲基-2-糠醛的含量是葡萄酒褐变的常用的质量标记,获得的结果与已有的研究方法完全一致。因此,新参数与糠醛化合物的存在高度相关,反映在与A420的相关性以及在较小程度上与5-HMF浓度相关,因为这仅是褐变过程中涉及的着色化合物之一。本发明的结果表明%Bt是一个很好的褐变描述符,仅需获取不同褐变阶段的起泡葡萄酒样本的透射图像,就可以同时进行多个品牌的起泡葡萄酒样本的分析,装置价格便宜,无需昂贵的专业仪器及其它化学试剂。The present invention proposes a colorimetric method for monitoring the browning process of sparkling wine, which is fast and low-cost. The camera of the smartphone is used as the acquisition device, and it is used to analyze the transmission image of the cava wine, which avoids complicated sample processing, and can perform single-step multi-sample analysis. The present invention proposes a new control parameter, the percent decay of the blue channel over time, which enables the study and characterization of browning kinetics. That is, the R and G channels remained almost unchanged during the browning process, and the browning process was time-dependent, and mainly affected the B channel as time increased. The present invention proposes to use the blue channel decay percentage %Bt as a quality marker for sparkling wine, and this value is highly correlated with the absorbance at 420nm and the content of 5-hydroxymethyl-2-furfural, the absorbance at 420nm and 5-hydroxymethyl The content of base-2-furfural is a common quality marker for wine browning, and the obtained results are completely consistent with the existing research methods. Thus, the new parameter is highly correlated with the presence of furfural compounds, reflected in the correlation with A420 and, to a lesser extent, 5-HMF concentration, as this is only one of the coloring compounds involved in the browning process. The results of the present invention show that %Bt is a good browning descriptor, and it is only necessary to obtain transmission images of sparkling wine samples at different browning stages to simultaneously analyze multiple brands of sparkling wine samples. Cheap, without expensive professional equipment and other chemical reagents.
本发明所提出的方法可以作为常规方法的替代方案,并且可以用作起泡葡萄酒的关键质量控制指标。本发明所提出的方法已经证明了其有用性,因此基于本方法的进一步研究将是非常有意义的。The method proposed in the present invention 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 in the present invention has proved its usefulness, so further research based on this method will be very meaningful.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the present invention. within the scope of protection.
Claims (10)
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 (3)
| 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 |
| CN112734688B (en) * | 2020-12-11 | 2025-03-14 | 江苏大学 | Potato browning detection method based on machine vision |
| CN116183535B (en) * | 2023-04-23 | 2023-08-29 | 中国科学技术大学 | Method, system, equipment and medium for analyzing spectrum of macromolecular solution aging process |
Citations (4)
| 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 storage medium |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8546458B2 (en) * | 2010-12-07 | 2013-10-01 | Allergan, Inc. | Process for texturing materials |
-
2017
- 2017-12-05 CN CN201711266254.8A patent/CN108022239B/en active Active
Patent Citations (4)
| 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 storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108022239A (en) | 2018-05-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Cuadros-Inostroza et al. | Discrimination of wine attributes by metabolome analysis | |
| Liu et al. | The fungal microbiome is an important component of vineyard ecosystems and correlates with regional distinctiveness of wine | |
| Arvanitoyannis et al. | Application of quality control methods for assessing wine authenticity: Use of multivariate analysis (chemometrics) | |
| Nikolantonaki et al. | Impact of glutathione on wines oxidative stability: A combined sensory and metabolomic study | |
| CN108445094B (en) | Establishment method and application for quickly identifying wine age of yellow wine by gas-phase ion mobility spectrometry | |
| Vianna et al. | Monitoring ester formation in grape juice fermentations using solid phase microextraction coupled with gas chromatography− mass spectrometry | |
| CN108022239B (en) | Bubbling wine browning process detection device and method based on machine vision | |
| Revilla et al. | Addition of pectolytic enzymes: an enological practice which improves the chromaticity and stability of red wines | |
| CN105181912B (en) | A method for detecting the freshness of rice during storage | |
| Ruiz-Moreno et al. | The influence of pre-fermentative maceration and ageing factors on ester profile and marker determination of Pedro Ximenez sparkling wines | |
| Moreno-García et al. | Biological aging status characterization of Sherry type wines using statistical and oenological criteria | |
| Catharino et al. | Characterization of must and wine of six varieties of grapes by direct infusion electrospray ionization mass spectrometry | |
| Jakabová et al. | Chemical composition of white wines produced from different grape varieties and wine regions in Slovakia | |
| Rodrigues et al. | Discrimination of sparkling wines samples according to the country of origin by ICP-OES coupled with multivariate analysis | |
| An et al. | Analysis of flavor-related compounds in fermented persimmon beverages stored at different temperatures | |
| CN103674856B (en) | Rapid detection method of organophosphorus pesticide residues by microchannel based on scanning and colorimetric analysis | |
| Pérez-Bernal et al. | The smartphone as an economical and reliable tool for monitoring the browning process in sparkling wine | |
| Stávek et al. | Effect of storage conditions on various parameters of colour and the anthocyanin profile of rosé wines | |
| US20250093319A1 (en) | Detecting wine characteristics from wine samples | |
| CN105717227A (en) | Judgment method for flavor quality of concentrated apple juice and application thereof | |
| Ratkovich et al. | The spirit of cachaça production: An umbrella review of processes, flavour, contaminants and quality improvement | |
| Sochorova et al. | Electrochemical and others techniques for the determination of malic acid and tartaric acid in must and wine | |
| Lebleux et al. | Must protection, sulfites versus bioprotection: A metabolomic study | |
| Hernández-Carapia et al. | Effect of maturation with American oak chips on the volatile and sensory profile of a cabernet sauvignon rosé wine and its comparison with commercial wines | |
| Wu et al. | Discrimination of Chinese rice wines of different geographical origins by UV–vis spectroscopy and chemometrics |
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 | ||
| CP03 | Change of name, title or address |
Address after: 450002 No. 5 Dongfeng Road, Jinshui District, Henan, Zhengzhou Patentee after: Zhengzhou University of light industry Country or region after: China Address before: 450002 No. 5 Dongfeng Road, Jinshui District, Henan, Zhengzhou Patentee before: ZHENGZHOU University OF LIGHT INDUSTRY Country or region before: China |
|
| CP03 | Change of name, title or address |