A method for objectively evaluating wine quality characteristics based on comprehensive data

CN122901098APending Publication Date: 2026-10-13NINGXIA INST OF AGRI PROD QUALITY STANDARDS & TESTING TECH (NINGXIA AGRI PROD QUALITY MONITORING CENT)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611169170.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

由此可能造成优质葡萄酒被错误降级、存在异常的葡萄酒被错误判定为高品质,不同检测机构或不同设备之间无法复现评价结果,最终生成的评价结果也难以作为产品分级、生产调整及消费者选择的可靠依据

Benefits of technology

[0050]本发明在采集目标偏振图像数据之前,利用连续状态检测图像对待评价葡萄酒中的变化像素、动态目标运动、动态目标形态变化及液面波动进行综合分析,得到葡萄酒动态稳定度,并以葡萄酒动态稳定度作为目标偏振图像数据的采集条件。相较于现有技术在葡萄酒尚未充分静置或状态不稳定时直接进行检测的方式,本发明能够在检测前识别酒液流动、颗粒沉降、微气泡移动及液面振荡等状态变化,降低样品动态状态对后续偏振检测结果造成的随机误差,提高不同时间、不同批次及不同样品之间检测条件的一致性,增强偏振图像数据采集的稳定性、重复性和可比性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122901098A_ABST
    Figure CN122901098A_ABST
Patent Text Reader

Abstract

The application discloses a kind of wine quality feature objective evaluation methods based on comprehensive data, it is related to wine quality detection and intelligent evaluation technical field.First, the state detection image data of the wine to be evaluated is collected under the same reference polarization direction, and the dynamic stability of wine is obtained by analysis;After meeting the collection conditions, target polarization images and corresponding reference polarization images of multiple target polarization directions are collected according to the preset order, the time variation area is determined by difference analysis, and the common effective area, wine polarization feature and polarization data reliability are obtained;Further, the spectral data and physicochemical index data of the same sample are collected, and the comprehensive evaluation data is obtained by analysis;Finally, the quality of comprehensive evaluation data is analyzed, and the evaluation result of wine quality feature is obtained.The application can reduce the influence of micro-bubbles, suspended particles, wine flow and liquid surface fluctuation on polarization detection results, and improve the accuracy and reliability of wine quality evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wine quality testing and intelligent evaluation technology, specifically to an objective evaluation method for wine quality characteristics based on comprehensive data. Background Technology

[0002] Wine quality evaluation is widely used in wine production control, product grading, quality inspection, distribution supervision, and consumer recommendations. To reduce the influence of traditional manual tasting on the experience, preferences, and environmental conditions of the tasters, current technologies are beginning to utilize objective data such as ultraviolet-visible spectroscopy, multispectral images, polarization images, and physicochemical indicators to quantitatively analyze the complexity, balance, intensity, integrity, and representativeness of wine quality characteristics. This evaluation process typically involves acquiring wine images across multiple wavelengths and different polarization directions, extracting polarization features based on the differences between these polarization directions, and then fusing these polarization features with spectral data, physicochemical indicators, and other product data to obtain a wine quality score.

[0003] However, when acquiring wine images using methods such as rotating polarizers, switching polarization channels, or sequentially changing polarization directions, the images for each polarization direction are usually not obtained at exactly the same time. Wine is a fluid liquid sample; even if the surface appears static after the wine sample is poured into the testing container, dynamic phenomena may still exist inside, such as microbubbles slowly rising, suspended particles or tartrate crystals settling, pigment polymers moving, natural convection caused by temperature differences, and slight fluctuations in the liquid surface.

[0004] For example, when acquiring a 0° polarized image, a microbubble might be located at the bottom of the image; when acquiring 45° and 90° polarized images, the bubble may have risen and deformed; and when acquiring a 135° polarized image, the bubble may have burst or left the imaging area. In this case, the differences between different polarized images include both the true optical response caused by changes in polarization direction and the positional and morphological changes of bubbles, particles, liquid surfaces, and wine flow at different acquisition times. Existing evaluation methods often directly input these image differences as polarization features into subsequent models, easily misinterpreting image differences caused by time variations as the polarization response of the wine, forming pseudo-polarization features unrelated to the true quality of the wine, directly reducing the accuracy, repeatability, and comparability of wine quality evaluation results. The same wine may obtain different polarization features and quality scores due to different settling times after inversion, different polarization channel switching speeds, or different acquisition sequences of the detection equipment. Areas traversed by microbubbles may be incorrectly identified as areas of particle enrichment, abnormal microbial activity, or complex internal structures; normal aging sedimentation and tartrate particle movement may also be misjudged as changes in the wine's concentration, complexity, or integrity. Because polarization features need to be combined with spectral and physicochemical data to form a comprehensive data matrix, if time-varying information is mixed into the polarization data, subsequent normalization, feature fusion, and AI scoring processes will further amplify this error, causing the model to form stable but erroneous quality judgment rules. This may result in high-quality wines being wrongly downgraded, abnormal wines being wrongly judged as high-quality, evaluation results being unreproducible between different testing institutions or different equipment, and the final evaluation results being difficult to use as a reliable basis for product grading, production adjustments, and consumer choices. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an objective evaluation method for wine quality characteristics based on comprehensive data, which can effectively solve the problems mentioned in the background technology.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: an objective evaluation method for wine quality characteristics based on comprehensive data, comprising collecting state detection image data of the wine to be evaluated under the same reference polarization direction, performing dynamic change analysis on the state detection image data, and obtaining the dynamic stability of the wine;

[0007] After the dynamic stability of the wine meets the acquisition conditions of the target polarization image data, target polarization image data of multiple target polarization directions are acquired sequentially, and reference polarization image data are acquired between adjacent target polarization image data. Difference analysis is performed on the reference polarization image data to obtain the time-varying region.

[0008] Based on the time-varying region, the target polarization image data is corrected to obtain corrected polarization image data; common effective region analysis and polarization feature extraction are performed on the corrected polarization image data to obtain the polarization features of the wine and the reliability of the polarization data.

[0009] Spectral and physicochemical data of the wine to be evaluated are collected simultaneously. Based on the reliability of the polarization data, the polarization characteristics, spectral data, and physicochemical data of the wine are combined and analyzed to obtain comprehensive evaluation data. Quality analysis is performed on the comprehensive evaluation data to obtain the wine quality characteristic evaluation results.

[0010] Furthermore, the method for dynamically analyzing the state detection image data is as follows:

[0011] Multiple frames of state detection images of the wine to be evaluated are continuously acquired at preset time intervals and recorded as state detection image data.

[0012] The i-th frame and the (i+1)-th frame of state detection images acquired sequentially according to the acquisition time are defined as a group of adjacent state detection images, where i represents the number of the state detection images.

[0013] Grayscale correction is performed on adjacent state detection images and the corresponding pixel difference is calculated to determine the changed pixels and the area ratio of the changed pixels.

[0014] Identify dynamic targets in each frame of state detection image and perform adjacent frame matching to obtain the rate of change of the number of dynamic targets, the average speed of dynamic targets, the average size change rate of dynamic targets, and the average shape change rate of dynamic targets.

[0015] The average values ​​of the liquid surface position change and liquid surface undulation change corresponding to all adjacent state detection images are identified and calculated to obtain the overall liquid surface position change and overall liquid surface undulation change, respectively.

[0016] Furthermore, the method for obtaining the dynamic stability of wine is as follows:

[0017] Calculate the average values ​​of the rate of change of the number of dynamic targets, the average speed of the dynamic targets, the average size of the dynamic targets, and the average shape of the dynamic targets corresponding to all adjacent state detection images, and obtain the overall rate of change of the number of dynamic targets, the overall speed of the dynamic targets, the overall size of the dynamic targets, and the overall shape of the dynamic targets, respectively.

[0018] Calculate the average of the total change in liquid level position and the total change in liquid level fluctuation to obtain the liquid level fluctuation amplitude;

[0019] The dynamic stability of the wine is obtained by weighted analysis of the overall change in pixel area ratio, the overall change rate of the number of dynamic targets, the overall movement speed of dynamic targets, the overall change rate of the size of dynamic targets, the overall change rate of the shape of dynamic targets, and the fluctuation amplitude of the liquid surface. The dynamic stability of the wine is used to comprehensively characterize the dynamic stability of the wine under evaluation during the acquisition of state detection image data.

[0020] The dynamic stability of the wine is compared with a preset stability threshold. When the dynamic stability of the wine is greater than or equal to the preset stability threshold, the wine to be evaluated is determined to meet the acquisition conditions of the target polarization image data; otherwise, it is determined not to meet the acquisition conditions of the target polarization image data.

[0021] Furthermore, the method for acquiring reference polarization image data between adjacent target polarization image data is as follows:

[0022] Under the same detection band, exposure parameters and imaging position, a fixed polarization direction is selected as the reference polarization direction;

[0023] Reference polarization images are acquired before the first target polarization image, between two adjacent target polarization images, and after the last target polarization image, so that each target polarization image corresponds to the preceding reference polarization image and the following reference polarization image.

[0024] Furthermore, the method for performing difference analysis on the reference polarization image data is as follows:

[0025] Calculate the average gray value of the effective detection area of ​​wine in the front reference polarization image and the back reference polarization image, and perform gray-level correction on the back reference polarization image based on the front reference polarization image to obtain the corrected reference polarization image.

[0026] Calculate the reference pixel difference between corresponding pixels in the uncorrected reference polarization image and the corrected reference polarization image, and determine the time-varying pixels and time-stable pixels based on the preset reference pixel difference threshold.

[0027] Furthermore, the method for obtaining the time-varying region is as follows:

[0028] Count the number of time-changing pixels among the neighboring pixels around each time-changing pixel, and redefine the time-changing pixels that do not meet the preset neighbor number threshold as time-stable pixels.

[0029] Connect adjacent pixels with remaining time changes to form a continuous region. Pixels with time changes in a continuous region whose number of pixels is less than a preset threshold for the number of pixels in the region are redefined as time-stable pixels.

[0030] The union of the retained continuous regions is determined as the time-varying region of the corresponding target polarization image.

[0031] Furthermore, the method for correcting the target polarization image data to obtain corrected polarization image data is as follows:

[0032] For each detection band, the region consisting of the same pixel positions in all target polarization images, the front reference polarization image and the corrected reference polarization image under that detection band that belong to the effective detection area of ​​wine is determined as the basic effective area corresponding to that detection band.

[0033] Pixels located in the time-varying region within the basic effective region are identified as dynamic interference pixels and marked as invalid. Pixels not located in the time-varying region within the basic effective region are identified as time-stable pixels, thus obtaining a single corrected target polarization image and a single effective region corresponding to each target polarization image.

[0034] The common effective region is obtained by taking the intersection of all single effective regions, and an effective corrected target polarization image and an effective corrected reference polarization image are generated based on the common effective region. The corrected polarization image data is then obtained by combining them.

[0035] Furthermore, the method for obtaining the polarization characteristics of wine and the reliability of polarization data is as follows:

[0036] Calculate the average gray value of each effective target polarization image and the effective reference polarization image in the common effective region to obtain the target polarization response value and the reference polarization response value;

[0037] The polarization response values ​​are arranged in a preset order according to the polarization direction and detection band to obtain the polarization characteristics of the wine.

[0038] The reliability of polarization data is obtained by calculating the ratio of the number of common effective pixels in each detection band to the total number of basic effective pixels and averaging the ratios.

[0039] Furthermore, the method for obtaining comprehensive evaluation data through fusion analysis is as follows:

[0040] The confidence level of polarization data is compared with a preset confidence threshold. When the confidence level of polarization data is greater than or equal to the preset confidence threshold, the polarization feature of wine is determined to be a valid polarization feature of wine.

[0041] Spectral data and physicochemical index data corresponding to the same sample number and evaluation batch number were collected to obtain spectral characteristics and physicochemical index characteristics, respectively.

[0042] The effective polarization characteristics, spectral characteristics and physicochemical index characteristics of wine were standardized to obtain standardized polarization characteristics, standardized spectral characteristics and standardized physicochemical index characteristics, respectively.

[0043] Based on the reliability of polarization data, the fusion weights of standardized polarization features, standardized spectral features, and standardized physicochemical index features are determined. The corresponding standardized features are weighted using each fusion weight and then connected sequentially to obtain comprehensive evaluation data.

[0044] Furthermore, the method for performing quality analysis on the comprehensive evaluation data is as follows:

[0045] A comprehensive evaluation data and corresponding quality characteristic reference values ​​of multiple wine calibration samples are obtained. The comprehensive evaluation data is used as the model input data, and the quality characteristic reference values ​​are used as the model output data to establish a wine quality analysis model.

[0046] The comprehensive evaluation data of the wine to be evaluated is input into the wine quality analysis model to obtain the predicted values ​​of various quality characteristics;

[0047] The predicted values ​​of each quality characteristic are compared with the corresponding preset quality characteristic grading intervals to obtain the grade of each quality characteristic.

[0048] By correlating the sample number, evaluation batch number, predicted values ​​of various quality characteristics, grades of various quality characteristics, and reliability of polarization data, the wine quality characteristic evaluation results are obtained.

[0049] The present invention has the following beneficial effects:

[0050] Before acquiring target polarization image data, this invention utilizes continuous state detection images to comprehensively analyze changing pixels, dynamic target motion, dynamic target morphological changes, and liquid surface fluctuations in the wine to be evaluated, obtaining the wine's dynamic stability. This dynamic stability is then used as the acquisition condition for target polarization image data. Compared to existing technologies that directly detect the wine before it has been sufficiently settled or is in an unstable state, this invention can identify state changes such as wine flow, particle sedimentation, microbubble movement, and liquid surface oscillations before detection. This reduces the random errors caused by the sample's dynamic state to subsequent polarization detection results, improves the consistency of detection conditions across different times, batches, and samples, and enhances the stability, repeatability, and comparability of polarization image data acquisition.

[0051] This invention acquires reference polarization images with a fixed reference polarization direction between adjacent target polarization images, and identifies time-varying regions using the preceding and following reference polarization images corresponding to each target polarization image. Furthermore, it invalidates dynamically interfering pixels within these time-varying regions and determines a common effective region by intersecting the single effective regions corresponding to each target polarization direction. Compared to existing technologies that directly compare all pixels in images with different polarization directions, this invention effectively eliminates non-polarization differences caused by microbubble movement, suspended particle settling, wine flow, liquid surface fluctuations, and imaging brightness drift, ensuring that the pixel positions involved in polarization feature calculation remain consistent across different polarization directions. This improves the authenticity, accuracy, and anti-interference capability of wine polarization feature extraction, and quantifies the effectiveness of the polarization detection results through polarization data reliability.

[0052] This invention standardizes the effective polarization characteristics, spectral characteristics, and physicochemical indicators of wine, and dynamically adjusts the influence of polarization characteristics in fusion analysis based on the reliability of polarization data to form comprehensive evaluation data. Then, a wine quality analysis model is used to obtain predicted values ​​and quality grade of quality characteristics. Compared to existing technologies that rely solely on single spectral detection, single physicochemical indicator detection, or manual sensory evaluation, this invention can reflect the quality status of wine from multiple dimensions, including optical polarization response, spectral response, and physicochemical composition. It reduces the impact of abnormal single detection data on evaluation results, improves the comprehensiveness, objectivity, and reliability of the evaluation of wine color stability, clarification stability, oxidation stability, and phenolic structure, and enhances the ability to distinguish between different wine varieties, vintages, and quality grades, as well as the traceability of evaluation results. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] Please see Figure 1 As shown, this embodiment of the invention provides a technical solution: an objective evaluation method for wine quality characteristics based on comprehensive data, comprising: collecting state detection image data of the wine to be evaluated under the same reference polarization direction, performing dynamic change analysis on the state detection image data, and obtaining the dynamic stability of the wine.

[0056] The method for collecting state detection image data of the wine to be evaluated under the same reference polarization direction is as follows:

[0057] Under the same reference polarization direction, detection band, exposure parameters, and imaging position, multiple frames of state detection images of the wine to be evaluated are continuously acquired at preset time intervals and recorded as state detection image data. Fixing the reference polarization direction, detection band, exposure parameters, and imaging position ensures that differences between consecutive frames primarily stem from changes in the wine's own state, rather than changes in equipment parameters, thereby improving the accuracy of dynamic stability determination. During acquisition, the container should be kept fixed, the light source preheated and stabilized, and automatic exposure, automatic gain control, and automatic white balance should be turned off. If the camera or container shifts, pixel-level or sub-pixel-level registration should be performed based on the container boundary or fixed marker points.

[0058] The method for obtaining the dynamic stability of wine by performing dynamic change analysis on state detection image data is as follows:

[0059] The i-th and (i+1)-th consecutive state detection images acquired in chronological order are defined as a group of adjacent state detection images, where i represents the image number. Grouping two consecutive frames into adjacent image sets allows for the capture of liquid flow, particle settling, microbubble drift, and surface oscillations on a shorter timescale, avoiding the omission of intermediate changes by comparing only the first and last frames. If a total of N frames are acquired, N-1 groups of adjacent state detection images are formed, with i ranging from 1 to N-1; all images should have the same resolution and pixel coordinate system.

[0060] Calculate the average grayscale value of the effective wine detection region in the i-th frame state detection image and the (i+1)-th frame state detection image, respectively, and denot them as follows: and The effective detection area for wine refers to the region in the state detection image that actually contains the wine to be evaluated and is used for image analysis. It excludes the external area of ​​the detection container, the container wall area, areas with strong reflections at the edges, and other invalid areas not belonging to the wine itself. This area can be obtained using image processing software. Defining the effective detection area and calculating its average grayscale avoids bias caused by the container wall, background, and specular reflections participating in the correction. The average grayscale reflects the overall brightness level of the same wine area and can be used to distinguish between global brightness drift and local structural changes.

[0061] Based on the average grayscale value of the i-th frame state detection image, the grayscale values ​​of each pixel in the (i+1)-th frame state detection image are corrected. The corrected grayscale values ​​are calculated according to the following formula:

[0062] ;

[0063] in, This represents the original grayscale value of the pixel with coordinates (x, y) in the (i+1)th frame of the state detection image. This represents the grayscale value of the corresponding pixel after grayscale correction.

[0064] Through the above grayscale correction, the average grayscale value of the effective wine detection area in the (i+1)th frame state detection image is made consistent with the average grayscale value of the effective wine detection area in the i-th frame state detection image.

[0065] Calculate the pixel difference between corresponding pixels in the i-th frame state detection image and the (i+1)-th frame state detection image after grayscale correction, wherein the pixel difference is calculated according to the following formula:

[0066] ;

[0067] in, The coordinates in the adjacent state detection image are: The pixel difference between corresponding pixels. This represents the grayscale value of the corresponding pixel in the i-th frame of the state detection image.

[0068] The pixel difference is compared with a preset pixel difference threshold. When the pixel difference is greater than the preset pixel difference threshold, the corresponding pixel is identified as a changing pixel; when the pixel difference is less than or equal to the preset pixel difference threshold, the corresponding pixel is identified as a stable pixel. Threshold classification can convert continuous grayscale differences into stable pixels and changing pixels, making it easier to form statistically significant change areas. Differences less than the threshold usually come from sensor noise and quantization errors, while differences greater than the threshold are more likely to come from real dynamic changes.

[0069] The proportion of changed pixels to the total number of pixels in the effective detection area of ​​the wine is calculated to obtain the proportion of changed pixel area for each pair of adjacent state detection images. This proportion eliminates the influence of image resolution and effective area size, allowing for comparison between different samples or different fields of view. Dividing the number of changed pixels by the total number of pixels in the effective area is equivalent to estimating the spatial proportion of dynamic changes.

[0070] The average of the proportion of changed pixel area corresponding to all adjacent state detection images is calculated to obtain the overall proportion of changed pixel area in the state detection image data. The larger the overall proportion of changed pixel area, the larger the area of ​​dynamic change of the wine under evaluation during the state detection image acquisition period. Taking the average of all adjacent image groups can reduce the influence of occasional noise in a single instance and form an overall change level that reflects the entire observation period.

[0071] Dynamic targets are identified within the effective wine detection area of ​​each frame of the state detection image. These dynamic targets refer to independent image regions within the effective wine detection area that have continuous boundaries and exhibit grayscale differences from the surrounding wine, including but not limited to microbubbles, suspended particles, tartrate crystals, and pigment aggregates. Identifying dynamic targets further distinguishes the areas of change and the objects causing the change, compensating for the inadequacy of simply statistically analyzing the proportion of changed pixels in describing particle or bubble behavior. Microbubbles, particles, crystals, or sediments typically exhibit grayscale or texture differences from the surrounding wine and can be segmented into independent targets through connected component segmentation. Median or Gaussian filtering can be applied to the effective region first, followed by adaptive thresholding, background subtraction, or edge closure to obtain a binary target mask; false targets with areas smaller than the noise threshold or connected to the container boundary are removed.

[0072] The area of ​​each dynamic target is obtained by counting the number of pixels contained in each target. The centroid coordinates of each target are obtained by calculating the average x-coordinate and average y-coordinate of the pixels within each target. The equivalent diameter of the target is obtained based on the diameter of a circle with the same area. The boundary length of the target is then obtained, and the circularity is calculated based on the area and boundary length. This circularity is used as the shape parameter of the target. Area, centroid, equivalent diameter, and circularity describe dynamic targets from multiple perspectives—position, scale, and morphology—improving the reliability of cross-frame matching and distinguishing between bubbles and irregular deposits. The centroid represents the target position, the equivalent diameter unifies arbitrary shapes into comparable scales, and the circularity reflects the regularity of the boundary.

[0073] The method for calculating the circularity of dynamic targets is as follows:

[0074] ;

[0075] in, Indicates the roundness of a dynamic target. Represents the area of ​​a dynamic target. Indicates the boundary length of a dynamic target. The value of circumference represents pi, and the value of circumference ranges from 0 to 1. The closer the circumference is to 1, the closer the shape of the dynamic target is to a circle; the closer the circumference is to 0, the more irregular the shape of the dynamic target is. The circumference is used as a shape parameter of the dynamic target.

[0076] Based on the centroid coordinates, area, and equivalent diameter of each dynamic target in adjacent state detection images, dynamic targets in adjacent state detection images are matched. For any dynamic target in the i-th frame state detection image, the centroid distance, relative area difference, and relative diameter difference between the dynamic target and each dynamic target in the (i+1)-th frame state detection image are calculated.

[0077] The centroid distance refers to the straight-line distance between the centroid coordinates of two dynamic targets; the relative area difference refers to the ratio of the absolute value of the area difference between two dynamic targets to the larger of the two dynamic target areas; the relative equivalent diameter difference refers to the ratio of the absolute value of the difference of the equivalent diameters of two dynamic targets to the larger of the two dynamic target equivalent diameters.

[0078] When the centroid distance between two dynamic targets is less than or equal to a preset centroid distance threshold, the relative area difference is less than or equal to a preset area difference threshold, and the relative difference in equivalent diameter is less than or equal to a preset equivalent diameter difference threshold, the two dynamic targets are determined to meet the preset matching conditions.

[0079] When only one dynamic target in the (i+1)th frame state detection image meets the preset matching condition, the dynamic target and the corresponding dynamic target in the i-th frame state detection image are identified as the same dynamic target and recorded as the successfully matched dynamic target.

[0080] When there are two or more candidate dynamic targets in the (i+1)th frame state detection image that meet the preset matching conditions, the matching difference value of each candidate dynamic target is calculated. The matching difference value is the sum of the ratio of centroid distance to preset centroid distance threshold, the ratio of relative area difference to preset area difference threshold, and the ratio of relative equivalent diameter difference to preset equivalent diameter difference threshold. The candidate dynamic target with the smallest matching difference value is determined as the same dynamic target.

[0081] If no dynamic target satisfying the preset matching condition exists in the (i+1)th frame state detection image, the corresponding dynamic target in the i-th frame state detection image is determined to have failed to match. A matched dynamic target will not be repeatedly matched with other dynamic targets in the same adjacent state detection image, thus maintaining a one-to-one correspondence between dynamic targets in adjacent state detection images.

[0082] For each successfully matched dynamic target, the linear distance between the two centroid coordinates in the i-th frame state detection image and the (i+1)-th frame state detection image is calculated to obtain the dynamic target displacement; the ratio of the dynamic target displacement to the preset time interval is calculated to obtain the dynamic target speed.

[0083] Calculate the average motion velocity of all successfully matched dynamic targets in the i-th group of adjacent state detection images, and obtain the average motion velocity of dynamic targets corresponding to the group of adjacent state detection images.

[0084] Based on the area difference of the same dynamic target in adjacent state detection images, the ratio of the absolute value of the area difference to the larger value of the dynamic target area in the two frames is calculated to obtain the dynamic target area change rate; based on the equivalent diameter difference of the same dynamic target in adjacent state detection images, the ratio of the absolute value of the equivalent diameter difference to the larger value of the equivalent diameter in the two frames is calculated to obtain the dynamic target equivalent diameter change rate; the average of the dynamic target area change rate and the dynamic target equivalent diameter change rate is calculated to obtain the dynamic target size change rate.

[0085] Calculate the absolute value of the circularity difference of the same dynamic target in adjacent state detection images to obtain the morphological change rate of the dynamic target; calculate the average value of the size change rate and morphological change rate corresponding to all successfully matched dynamic targets in each group of adjacent state detection images to obtain the average size change rate and the average morphological change rate of the dynamic target, respectively.

[0086] Calculate the average values ​​of the rate of change of the number of dynamic targets, the average speed of the dynamic targets, the average size of the dynamic targets, and the average shape of the dynamic targets corresponding to all adjacent state detection images, and obtain the overall rate of change of the number of dynamic targets, the overall speed of the dynamic targets, the overall size of the dynamic targets, and the overall shape of the dynamic targets, respectively.

[0087] Identify the boundary line between the wine liquid and the air above it in each state detection image, and determine the boundary line as the wine surface; calculate the average value of the vertical coordinates of each pixel on the wine surface to obtain the average position of the liquid surface corresponding to each state detection image.

[0088] Calculate the absolute value of the average position difference of the liquid surface between adjacent state detection images to obtain the change in liquid surface position corresponding to each group of adjacent state detection images; calculate the difference between the maximum and minimum values ​​of the vertical coordinates of each pixel point of the wine liquid surface in a single frame state detection image to obtain the liquid surface undulation value corresponding to that frame state detection image; calculate the absolute value of the difference in liquid surface undulation values ​​corresponding to adjacent state detection images to obtain the change in liquid surface undulation corresponding to each group of adjacent state detection images.

[0089] Calculate the average of the liquid surface position change and liquid surface undulation change corresponding to all adjacent state detection images to obtain the overall liquid surface position change and overall liquid surface undulation change, respectively. Calculate the average of the overall liquid surface position change and overall liquid surface undulation change to obtain the liquid surface fluctuation amplitude. The liquid surface fluctuation amplitude is used to comprehensively characterize the degree of overall position change and liquid surface undulation change of the wine liquid surface during the entire acquisition time period corresponding to the state detection image data.

[0090] The dynamic stability of the wine is obtained by weighted analysis of the overall change in pixel area ratio, the overall change rate of the number of dynamic targets, the overall movement speed of dynamic targets, the overall change rate of the size of dynamic targets, the overall change rate of the shape of dynamic targets, and the amplitude of liquid surface fluctuation. This dynamic stability is used to comprehensively characterize the dynamic stability of the wine under evaluation during the acquisition of state detection image data.

[0091] In this embodiment, the dynamic stability of the wine can be obtained through the following analysis method, with the specific analysis conditions as follows:

[0092] ;

[0093] In the formula, Indicates the dynamic stability of wine. This indicates the proportion of the total changed pixel area. This represents the stability weighting coefficient corresponding to the preset overall change pixel area ratio. This represents the rate of change of the overall dynamic target quantity. This represents the stability weighting coefficient corresponding to the preset rate of change of the overall dynamic target quantity. Indicates the overall dynamic target movement speed. This represents the stability weighting coefficient corresponding to the preset unit overall dynamic target motion velocity. Indicates the overall dynamic target size change rate. This represents the stability weighting coefficient corresponding to the preset overall dynamic target size change rate. This represents the overall dynamic rate of change of the target's shape. This represents the stability weighting coefficient corresponding to the preset overall dynamic target shape change rate. Indicates the amplitude of liquid level fluctuation. This represents the stability weighting coefficient corresponding to the preset unit liquid level fluctuation amplitude.

[0094] In this embodiment, each stability weight coefficient is a preset value greater than or equal to zero. These coefficients are determined based on the influence of the overall change in pixel area ratio, the overall rate of change in the number of dynamic targets, the overall speed of movement of dynamic targets, the overall rate of change in the size of dynamic targets, the overall rate of change in the shape of dynamic targets, and the amplitude of liquid surface fluctuations on the stability of target polarization image acquisition. This ensures that the product of each dynamic change index and its corresponding stability weight coefficient is a dimensionless value. Each stability weight coefficient is predetermined using wine calibration samples and remains constant throughout the testing process of the same batch of wines to be evaluated. When all the aforementioned dynamic change indices are zero, the dynamic stability of the wine is 1. When any dynamic change index increases, the product of that index and its corresponding stability weight coefficient increases, and the dynamic stability of the wine decreases. Therefore, the closer the dynamic stability of the wine is to 1, the more stable the wine to be evaluated; the closer the dynamic stability of the wine is to 0, the more pronounced the dynamic changes in the wine to be evaluated.

[0095] The dynamic stability of the wine is compared with a preset stability threshold. When the dynamic stability of the wine is greater than or equal to the preset stability threshold, the wine to be evaluated is determined to meet the acquisition conditions of the target polarization image data. When the dynamic stability of the wine is less than the preset stability threshold, the wine to be evaluated is left to stand still, and the state detection image data is reacquired.

[0096] After the dynamic stability of the wine meets the acquisition conditions for the target polarization image data, target polarization image data in multiple target polarization directions are acquired sequentially, and reference polarization image data are acquired between adjacent target polarization image data. Difference analysis is performed on the reference polarization image data to obtain the time-varying region.

[0097] Under the same detection band, exposure parameters, and imaging position as the state detection image data, a fixed polarization direction is selected as the reference polarization direction, and other polarization directions to be acquired are determined as the target polarization directions.

[0098] A first reference polarization image is acquired before the first target polarization image. A reference polarization image is acquired between each of two adjacent target polarization images, and a final reference polarization image is acquired after the last target polarization image. This results in reference polarization image data and target polarization image data arranged chronologically by acquisition time. The reference polarization image data characterizes the wine images to be evaluated obtained before and after acquiring each target polarization image, under a fixed reference polarization direction, and is used to identify dynamic interference caused by time variations during target polarization image acquisition. The target polarization image data characterizes the wine images to be evaluated acquired under multiple target polarization directions and is used to extract the differences in polarization response of the wine under different polarization directions.

[0099] The acquisition order of the reference polarization image data and the target polarization image data is as follows:

[0100] The process involves acquiring a reference polarization image, the first target polarization image, a reference polarization image, the second target polarization image, and another reference polarization image, and so on, until the last target polarization image and subsequent reference polarization images are acquired.

[0101] For the j-th target polarization image, the reference polarization image acquired before the j-th target polarization image is determined as the front reference polarization image, and the reference polarization image acquired after the j-th target polarization image is determined as the back reference polarization image, so that each target polarization image corresponds to a set of front reference polarization images and back reference polarization images.

[0102] Calculate the average gray value of the effective detection area of ​​wine in the front and back reference polarization images, and denote them as follows: and Where j represents the number of the target polarization image; the average gray value of the effective detection area of ​​wine in the previous reference polarization image. Calculate the grayscale correction coefficient as the calibration benchmark. The grayscale correction coefficient is calculated according to the following formula:

[0103] ;in, Greater than zero.

[0104] Multiply the original gray value of each pixel in the subsequent reference polarization image by the gray value correction coefficient to obtain the gray value of each pixel after gray value correction. The calculation formula is as follows:

[0105] ;

[0106] in, This represents the original grayscale value of the pixel at coordinates (x, y) in the back-reference polarization image. This represents the grayscale value of the corresponding pixel after grayscale correction.

[0107] The corrected reference polarization image is composed of all pixels that have undergone grayscale correction. After the grayscale correction, the average grayscale value of the effective wine detection area in the corrected reference polarization image is consistent with the average grayscale value of the effective wine detection area in the previous reference polarization image, thereby reducing the overall grayscale difference caused by changes in light source brightness or imaging response during the acquisition of the previous and subsequent reference polarization images. The corrected reference polarization image is used to characterize the reference polarization image obtained after processing the subsequent reference polarization image and performing overall grayscale correction based on the average grayscale value of the previous reference polarization image.

[0108] The pixel difference between corresponding pixels in the uncorrected and corrected reference polarization images is calculated to obtain the reference pixel difference data corresponding to the j-th target polarization image. The reference pixel difference is calculated according to the following formula:

[0109] ;

[0110] in, This represents the reference pixel difference corresponding to the j-th target polarization image; This represents the gray value of the pixel at coordinates (x, y) in the front reference polarization image. This represents the grayscale value of the pixel at coordinates (x, y) in the corrected reference polarization image.

[0111] The reference pixel difference is compared with a preset reference pixel difference threshold; when the reference pixel difference is greater than the preset reference pixel difference threshold, the corresponding pixel is determined as a time-varying pixel; when the reference pixel difference is less than or equal to the preset reference pixel difference threshold, the corresponding pixel is determined as a time-stable pixel.

[0112] Each pixel identified as a time-varying pixel in the j-th target polarization image is marked according to its original pixel coordinates in the image. The number of time-varying pixels in the neighboring pixels around each time-varying pixel is counted. When the number of time-varying pixels around a certain time-varying pixel is less than a preset neighbor number threshold, the time-varying pixel is re-identified as a time-stable pixel to remove isolated time-varying pixels formed by image noise or occasional grayscale changes.

[0113] After the removal process, adjacent time-varying pixels in the horizontal, vertical, or diagonal direction are connected into a continuous region, and the number of time-varying pixels contained in each continuous region is counted. When the number of time-varying pixels contained in a certain continuous region is less than the preset threshold for the number of pixels in a region, the time-varying pixels in that continuous region are re-identified as time-stable pixels.

[0114] The union of all retained continuous regions is determined as the time-varying region corresponding to the j-th target polarization image. The time-varying region represents the area in the effective detection region of the wine that undergoes grayscale changes before and after the acquisition of the j-th target polarization image; when there is no continuous region satisfying a preset threshold for the number of pixels in the region, the time-varying region corresponding to the j-th target polarization image is determined as an empty region.

[0115] Following the above method, difference analysis was performed on the pre-reference polarization image and post-reference polarization image corresponding to each target polarization image to obtain the time-varying region corresponding to each target polarization image. Each time-varying region was then associated with its corresponding target polarization image using the same pixel coordinates to obtain the time-varying region data. The time-varying region characterizes the pixel region within the effective detection area of ​​the wine that experiences continuous grayscale changes due to microbubble movement, suspended particle settling, wine flow, or surface fluctuations before and after the acquisition of the j-th target polarization image.

[0116] The time-varying region data is used in subsequent processing to determine the pixel regions in each target polarization image that are affected by microbubble movement, suspended particle settling, wine flow, or liquid surface fluctuations.

[0117] Based on the time-varying region, the target polarization image data is corrected to obtain corrected polarization image data; common effective region analysis and polarization feature extraction are performed on the corrected polarization image data to obtain the polarization characteristics of the wine and the reliability of the polarization data.

[0118] For each detection band, the region consisting of identical pixel positions belonging to the effective wine detection area in all target polarization images, the pre-reference polarization image, and the corrected reference polarization image under that detection band is defined as the basic effective region corresponding to that detection band. This basic effective region is used to define the pixel range for subsequent correction processing, common effective region analysis, and polarization feature extraction under that detection band. The basic effective region characterizes the region consisting of identical pixel positions belonging to the effective wine detection area in all target polarization images, the pre-reference polarization image, and the corrected reference polarization image under the same detection band.

[0119] For the j-th target polarization image, the time-varying region corresponding to the target polarization image obtained from the aforementioned difference analysis is acquired, and the pixel position of the time-varying region is compared with the basic effective region corresponding to the detection band.

[0120] Pixels located within the time-varying region within the basic effective region are identified as dynamic interference pixels corresponding to the j-th target polarization image, and pixels located outside the time-varying region within the basic effective region are identified as time-stable pixels corresponding to the j-th target polarization image.

[0121] When the time-varying region corresponding to the j-th target polarization image is an empty region, all pixels within the basic effective region are determined as the time-stable pixels corresponding to the target polarization image.

[0122] For the dynamically interfering pixels in the j-th target polarization image, an invalidation marker is set, preventing them from participating in subsequent polarization feature calculations. The original grayscale values ​​of time-stable pixels in the j-th target polarization image are retained, resulting in a single-image corrected target polarization image corresponding to the j-th target polarization image. Dynamically interfering pixels are used to characterize pixels located within the corresponding time-varying region of the basic effective region; these pixels do not participate in the calculation of the polarization features. The single-image corrected target polarization image is used to characterize the target polarization image obtained after invalidating the dynamically interfering pixels in the target polarization image and retaining the original grayscale values ​​of time-stable pixels.

[0123] The region containing all time-stable pixels in the j-th single-image corrected target polarization image that have not been marked with invalidation is defined as the single-image effective region corresponding to the j-th target polarization image. The single-image effective region characterizes the region containing all time-stable pixels in the single-image corrected target polarization image that have not been marked with invalidation.

[0124] Using the above method, the target polarization images of each target polarization direction under the same detection band are corrected by utilizing the time change region corresponding to each target polarization image, thereby obtaining a single corrected target polarization image and a single effective region corresponding to each target polarization direction under the detection band.

[0125] The correction process refers to marking and eliminating dynamic interference pixels based on the time-varying region, without interpolating, replacing, or compensating the grayscale values ​​of the dynamic interference pixels, so as to avoid using artificially generated grayscale values ​​for polarization feature calculation.

[0126] After obtaining all single-image effective regions under the same detection band, an intersection analysis is performed on each single-image effective region. For any pixel location within the basic effective region, if the pixel location exists in all single-image effective regions simultaneously, it is determined as a common effective pixel location; if the pixel location is marked as invalid in any single-image corrected target polarization image, it is not determined as a common effective pixel location. The common effective pixel location is used to characterize the pixel location that exists in all single-image effective regions under the same detection band.

[0127] The common effective region is composed of all common effective pixel positions within the same detection band. Any pixel position within this common effective region is not marked as a dynamically interfering pixel position in the time-varying regions corresponding to the target polarization images within that detection band. The common effective region characterizes pixel regions within the same detection band that are unaffected by time variations during the acquisition of all target polarization images and can be used collectively for grayscale comparison in different polarization directions.

[0128] Based on the common effective region, the individual corrected target polarization images under the same detection band are unified, retaining only the pixels located within the common effective region and their original grayscale values ​​in each individual corrected target polarization image, thus obtaining the effective corrected target polarization image corresponding to each target polarization direction. The effective corrected target polarization image is used to characterize the target polarization image obtained by retaining only the pixels located within the common effective region and their original grayscale values ​​in the individual corrected target polarization images.

[0129] Following a preset order based on the target polarization direction, all valid corrected target polarization images within the same detection band are combined to obtain the target direction corrected polarization image data corresponding to that detection band. The target direction corrected polarization image data is used to characterize all valid corrected target polarization images combined according to a preset order based on the target polarization direction within the same detection band.

[0130] After obtaining the common effective region corresponding to the detection band, the aforementioned reference polarization image data is processed uniformly using this common effective region.

[0131] For the pre-reference polarization image and the corrected reference polarization image corresponding to the j-th target polarization image, extract the gray values ​​with the same pixel coordinates located within the common effective region in both reference polarization images, and calculate the average of the two gray values ​​at the same pixel coordinates to obtain the reference direction intermediate gray value corresponding to the j-th target polarization image. The reference direction intermediate gray value is used to characterize the average gray level of the same pixel position in the common effective region of the pre-reference polarization image and the corrected reference polarization image corresponding to the j-th target polarization image.

[0132] For each pixel location within a common effective region, the average of the intermediate gray values ​​in the reference direction corresponding to all target polarization images under that detection band is calculated to obtain the reference direction corrected gray value corresponding to that pixel location. The reference direction corrected gray value is used to characterize the average of the intermediate gray values ​​in the reference direction corresponding to all target polarization images under the same detection band at the same pixel location.

[0133] The effective corrected reference polarization image for this detection band is composed of the reference direction corrected gray values ​​corresponding to all pixel positions within a common effective region. The effective corrected reference polarization image is used to characterize the reference polarization direction image composed of the reference direction corrected gray values ​​corresponding to all pixel positions within the common effective region.

[0134] The effective correction reference polarization image is combined with the aforementioned target direction correction polarization image data to obtain the correction polarization image data corresponding to the detection band. The correction polarization image data includes an effective correction reference polarization image corresponding to a reference polarization direction and multiple effective correction target polarization images corresponding to target polarization directions, and each polarization image has the same common effective region and corresponding pixel coordinates.

[0135] After obtaining the corrected polarization image data corresponding to the detection band, the average grayscale value of all pixels within the common effective region of each effective corrected target polarization image is calculated to obtain the target polarization response value corresponding to each target polarization direction. The corrected polarization image data characterizes the combination of the effective corrected reference polarization image and each effective corrected target polarization image with the same common effective region under the same detection band. The target polarization response value characterizes the average grayscale response of the effective corrected target polarization image corresponding to the target polarization direction within the common effective region under the same detection band.

[0136] The average gray value of all pixels within the common effective region of the effectively corrected reference polarization image is calculated to obtain the reference polarization response value corresponding to the reference polarization direction. The reference polarization response value characterizes the average gray value response of the effectively corrected reference polarization image within the common effective region under the same detection band.

[0137] The reference polarization response values ​​and target polarization response values ​​obtained under the same detection band are arranged in ascending order according to the angle of the corresponding polarization direction to obtain the band polarization feature corresponding to that detection band. The band polarization feature is used to characterize the polarization response sequence formed by arranging the reference polarization response values ​​and target polarization response values ​​under the same detection band according to the angle of the polarization direction.

[0138] Using the above method, the basic effective region, common effective region, corrected polarization image data and band polarization characteristics of each detection band are obtained sequentially by utilizing the time variation region data corresponding to each detection band.

[0139] The polarization characteristics of the wine under evaluation are obtained by arranging the polarization features corresponding to each detection band in ascending order of wavelength. These polarization characteristics characterize the differences in polarization response of the wine under evaluation in each detection band and polarization direction, and are derived from the arrangement of the polarization features corresponding to each detection band according to the wavelength of the detection band.

[0140] When one reference polarization direction and three target polarization directions are set for each detection band, each detection band obtains one reference polarization response value and three target polarization response values, resulting in a total of four polarization response values.

[0141] In one specific embodiment, when ten detection bands are set, the forty polarization response values ​​corresponding to the ten detection bands are arranged sequentially according to the preset order of the detection band wavelength and polarization direction to obtain forty-dimensional wine polarization characteristics.

[0142] After obtaining the common effective region corresponding to each detection band, the number of common effective pixels contained in the common effective region corresponding to each detection band is counted, and the total number of basic effective pixels contained in the basic effective region corresponding to that detection band is counted.

[0143] The proportion of common effective pixels to the total number of basic effective pixels is calculated to obtain the effective region proportion for that detection band. The effective region proportion characterizes the ratio of common effective regions to the basic effective region within the same detection band.

[0144] When the total number of basic effective pixels corresponding to the b-th detection band is The total number of effective pixels is At that time, the proportion of the effective area corresponding to this detection band for:

[0145] ;

[0146] Where b represents the detection band number, The value range is from 0 to 1.

[0147] Following the above method, the effective region proportions for each detection band are calculated, and the average of all effective region proportions is calculated to obtain the polarization data reliability. The polarization data reliability characterizes the total proportion of stable pixels that can be used for comparison of different polarization directions across all detection bands, and is used to determine the degree to which the polarization characteristics of wine are affected by dynamic interference.

[0148] The reliability of the polarization data ranges from 0 to 1. The higher the reliability of the polarization data, the more stable pixels can be used together for comparison of different polarization directions under each detection band, and the lower the degree to which the extracted wine polarization features are affected by microbubble movement, suspended particle sedimentation, wine flow or surface fluctuation. The lower the reliability of the polarization data, the more pixels are identified as dynamic interference pixels, and the fewer stable pixels can be used together for polarization feature calculation.

[0149] The reliability of the polarization data is compared with a preset reliability threshold. When the reliability of the polarization data is greater than or equal to the preset reliability threshold, the obtained wine polarization feature is determined to meet the usage conditions, and the wine polarization feature is identified as a valid wine polarization feature for subsequent comprehensive evaluation data fusion analysis. A valid wine polarization feature is used to characterize wine polarization features that, when the reliability of the polarization data is greater than or equal to the preset reliability threshold, are determined to meet the usage conditions for subsequent fusion analysis.

[0150] When the reliability of polarization data is less than the preset reliability threshold, it is determined that the target polarization image data and reference polarization image data acquired in this study do not meet the usage conditions, and the target polarization image data and reference polarization image data are re-acquired; a difference analysis is performed on the re-acquired reference polarization image data to obtain the time change region corresponding to each target polarization image; then, based on the re-obtained time change region, the single effective region, common effective region, corrected polarization image data, wine polarization characteristics, and polarization data reliability are re-determined in sequence.

[0151] Spectral and physicochemical data of the wine to be evaluated are collected simultaneously. Based on the reliability of the polarization data, the polarization characteristics, spectral data, and physicochemical data of the wine are combined and analyzed to obtain comprehensive evaluation data. Quality analysis is performed on the comprehensive evaluation data to obtain the wine quality characteristic evaluation results.

[0152] Once the reliability of the polarization data is greater than or equal to a preset reliability threshold, and the aforementioned wine polarization characteristics are determined to be valid wine polarization characteristics, a unique sample number and evaluation batch number are assigned to the wine to be evaluated. The sample number is generated based on the sample source number and sampling order of the wine to be evaluated, and the evaluation batch number is generated based on the evaluation date and the evaluation order of that day; all test data of the same wine to be evaluated in the same evaluation process use the same sample number and evaluation batch number.

[0153] Separate wine samples for spectral detection and physicochemical index detection from the wine to be evaluated, and ensure that the effective wine polarization characteristics, spectral detection samples, and physicochemical index detection samples correspond to the same sample number and evaluation batch number, so as to ensure that the three types of data used in subsequent fusion analysis come from the same wine sample to be evaluated.

[0154] The synchronous acquisition refers to the acquisition of polarization image data, spectral data, and physicochemical index data of the same wine sample to be evaluated within a preset evaluation time range, without limiting the acquisition of the three types of data at the same time. The preset evaluation time range is pre-set based on the time required to complete polarization image detection, spectral detection, and physicochemical index detection, ensuring that the temperature, sealing condition, and storage environment of the wine to be evaluated remain unchanged within the preset evaluation time range.

[0155] The wine used for spectral detection is subjected to spectral analysis. Within a preset spectral wavelength range, raw spectral response values ​​are collected at preset wavelength intervals for each wavelength position. The raw spectral response values ​​characterize the intensity of the emitted light signal received by the spectral detection device at the corresponding wavelength position after the detection light passes through the wine used for spectral detection.

[0156] Before acquiring the raw spectral response values ​​of the wine to be evaluated, dark background spectral response values ​​under no-incident light conditions are acquired, as well as reference spectral response values ​​when the wine to be evaluated is not placed on the surface. The dark background spectral response values ​​characterize the background response generated by the spectral detection equipment at the corresponding wavelength position under no-incident light conditions. The reference spectral response values ​​characterize the detection light response received by the spectral detection equipment at the corresponding wavelength position when the wine to be evaluated is not placed on the surface.

[0157] Based on the dark background spectral response and the reference spectral response, the original spectral response values ​​corresponding to each wavelength position are corrected. The wavelength is... The corrected spectral response value at that time is calculated according to the following formula:

[0158] ;

[0159] in, Indicates wavelength as The corrected spectral response value at that time This indicates that the wine to be evaluated is at a wavelength of The original spectral response value at that time, Indicates the spectral response value against the dark background. Represents the reference spectral response value, and Greater than zero.

[0160] The wine sample was repeatedly tested a preset number of times using the same detection parameters. The average value of the corrected spectral response at the same wavelength position in each test was calculated to obtain the average corrected spectral response value at each wavelength position. The corrected spectral response value is used to characterize the spectral response obtained after eliminating the dark background response from the original spectral response value and performing proportional correction using the reference spectral response.

[0161] The average corrected spectral response values ​​corresponding to each wavelength position are arranged in ascending order of wavelength to obtain the spectral characteristics of the wine to be evaluated, denoted as:

[0162] ;

[0163] in, Indicates the number of preset spectral wavelength positions. Indicates the first The average corrected spectral response value corresponding to each wavelength position.

[0164] When the difference between the reference spectral response value and the dark background spectral response value at a certain wavelength position is less than or equal to the preset effective spectral difference threshold at that wavelength position, the spectral data at that wavelength position is determined to be invalid, and the original spectral response value, dark background spectral response value, and reference spectral response value at that wavelength position are reacquired.

[0165] The physicochemical properties of the wine are tested to obtain predetermined values ​​for each property. These physicochemical properties include at least one of the following: pH value, total acidity, volatile acidity, alcohol content, residual sugar, total phenols, color, and turbidity.

[0166] In one specific implementation, pH was measured using a pH meter calibrated with standard buffer solution; total acidity was determined using acid-base titration; volatile acidity was determined using post-distillation titration; alcohol content was determined using distillation density method; residual sugar was determined using liquid chromatography; total phenols were determined using the Folin-Ciocalteu colorimetric method; color was determined using spectrophotometry; and turbidity was determined using a turbidity meter. All physicochemical indicators were measured according to the reagent dosage, detection temperature, detection time, and instrument parameters specified in the corresponding detection method.

[0167] When establishing quality analysis models and evaluating wines, the same physicochemical indicators, the same testing methods, and the same order of arrangement are used.

[0168] The obtained physicochemical index values ​​are arranged in the preset order of physicochemical indexes to obtain the physicochemical index characteristics of the wine to be evaluated, denoted as:

[0169] ;

[0170] in, Indicates the number of physicochemical indicators. Indicates the first The test values ​​corresponding to the physicochemical indicators.

[0171] The effective wine polarization characteristics and polarization data reliability obtained from the aforementioned common effective region analysis are denoted as:

[0172] ;

[0173] in, This indicates the number of polarization response values ​​included in the effective wine polarization feature. Indicates the first Polarization response value.

[0174] In one specific embodiment, when ten detection bands are set, and each detection band includes one reference polarization direction and three target polarization directions, M equals 40.

[0175] Thus, the effective wine polarization characteristics P, spectral characteristics S, physicochemical index characteristics H, and polarization data reliability Q are obtained for the same wine sample to be evaluated, where Q is the average of the effective region proportions corresponding to all the aforementioned detection bands.

[0176] After obtaining the effective polarization characteristics, spectral characteristics, and physicochemical index characteristics of the wine, the three types of characteristics are standardized using pre-established calibration data. The spectral characteristics are used to characterize the average corrected spectral response distribution of the wine to be evaluated at different wavelength positions within a preset spectral wavelength range.

[0177] The calibration data was obtained from multiple wine calibration samples using the same data acquisition and processing methods as the wine to be evaluated. Each wine calibration sample covered a preset range of wine varieties, vintages, and quality grades, and corresponding effective wine polarization characteristics, spectral characteristics, and physicochemical index characteristics were obtained. The calibration data was composed of the three types of characteristics corresponding to all wine calibration samples arranged in the same characteristic order.

[0178] Based on all wine calibration samples, the calibration mean and calibration standard deviation for each polarization response value, spectral response value, and physicochemical index value are predetermined. The calibration mean is the arithmetic mean of the same characteristic value in all wine calibration samples; the calibration standard deviation is the dispersion of the same characteristic value in all wine calibration samples relative to the calibration mean.

[0179] For any eigenvalue to be standardized Its standardized eigenvalues Calculate according to the following formula:

[0180] ;

[0181] in, Indicates the first The calibration average value of the feature in the wine calibration sample. Indicates the first The calibration standard deviation of the feature in the wine calibration samples, and Greater than zero.

[0182] When the calibration standard deviation corresponding to a certain feature is equal to zero, it means that the feature does not change among the wine calibration samples. When establishing the quality analysis model, the feature is deleted and the feature corresponding to the wine to be evaluated is not included in the fusion analysis.

[0183] Following the standardization method described above, the effective wine polarization characteristic P, spectral characteristic S, and physicochemical index characteristic H are standardized respectively to obtain the standardized polarization characteristic. Standardized spectral characteristics and standardized physicochemical characteristics .

[0184] Pre-set polarization feature basic weights Spectral feature basic weights Basic weights of physical and chemical indicators ,in: ;and , and All are greater than zero.

[0185] The basic weights of polarization characteristics, spectral characteristics, and physicochemical index characteristics are predetermined based on the model validation results of the wine calibration samples and remain unchanged during the evaluation process of the wine to be evaluated.

[0186] Based on the aforementioned polarization data reliability Q, the basic weights of polarization features are corrected, and the weights of the three types of features are normalized to obtain the polarization feature fusion weights. Spectral feature fusion weights Weighting of physical and chemical indicators The calculation method is as follows:

[0187] ;

[0188] ;

[0189] ;

[0190] in: .

[0191] The higher the confidence level Q of the polarization data, the greater the weight of polarization feature fusion. The larger the value, the smaller the reliability Q of the polarization data, and the lower the weight of polarization feature fusion. The smaller the value, the more the influence of polarization features on the final evaluation result is adjusted according to the size of the common effective region in the polarization image data.

[0192] Standardized polarization characteristics The standardized polarization response values ​​in the data are respectively associated with the polarization feature fusion weights. Multiplying them yields the weighted polarization characteristics.

[0193] Standardized spectral features The standardized spectral response values ​​in the data are respectively associated with the spectral feature fusion weights. Multiplying them yields the weighted spectral characteristics.

[0194] Standardized physicochemical characteristics The standardized physicochemical index values ​​are respectively weighted with the physicochemical index characteristics. Multiplying them together yields the weighted physicochemical index characteristics.

[0195] Following the order of weighted polarization characteristics, weighted spectral characteristics, and weighted physicochemical index characteristics, the three types of weighted characteristics are sequentially connected to obtain the comprehensive evaluation data corresponding to the wine to be evaluated:

[0196] ;

[0197] Where X represents the comprehensive evaluation data.

[0198] The sequential connection refers to arranging the three types of weighted features in a preset order to form a feature sequence, rather than directly adding polarization features, spectral features, and physicochemical index features of different dimensions.

[0199] A wine quality analysis model is established in advance. The process of establishing a wine quality analysis model is as follows:

[0200] Multiple wine calibration samples covering a preset quality range were collected, and for each wine calibration sample, the dynamic stability, time variation range, polarization data reliability, effective wine polarization characteristics, spectral characteristics, and physicochemical index characteristics were obtained sequentially using the same method as the wine to be evaluated.

[0201] Only wine calibration samples with polarization data confidence levels greater than or equal to a preset confidence threshold are used to establish wine quality analysis models.

[0202] The effective wine polarization characteristics, spectral characteristics, and physicochemical index characteristics of each wine calibration sample were standardized, confidence weighted, and feature-linked to obtain the comprehensive evaluation data corresponding to each wine calibration sample.

[0203] Quality characteristic reference values ​​for each wine calibration sample were obtained using a pre-defined standard testing method. These quality characteristic reference values ​​include color stability reference values, clarification stability reference values, oxidation stability reference values, and phenolic structure reference values. Specifically, the color stability reference value was obtained by measuring the color parameters of the wine calibration sample before and after a pre-defined storage treatment and calculating the change in color parameters; the clarification stability reference value was obtained by measuring the change in turbidity of the wine calibration sample before and after a pre-defined standing or accelerated treatment; the oxidation stability reference value was obtained by measuring the change in color, dissolved oxygen, or redox index of the wine calibration sample before and after a pre-defined oxidation treatment; and the phenolic structure reference value was obtained by measuring the content and proportion of different types of phenolic substances. For any quality characteristic, the same testing conditions and calculation rules were used to obtain the corresponding quality characteristic reference values ​​for all wine calibration samples. The color stability reference value characterizes the degree to which the color parameters of the wine calibration sample remain stable after the pre-defined storage treatment. The clarification stability reference value characterizes the degree to which the turbidity of the wine calibration sample remains stable after the pre-defined standing or accelerated treatment. The oxidation stability reference value characterizes the degree to which the color, dissolved oxygen, or redox index of the wine calibration sample remains stable after the pre-defined oxidation treatment. The phenolic structure reference value is used to characterize the content of different types of phenolic substances in wine calibration samples and the proportional relationship between different types of phenolic substances.

[0204] The quality feature reference value is distinguished from the physicochemical index detection value used as model input, so as to avoid using the same physicochemical index as both model input data and corresponding model output data at the same time.

[0205] By using the comprehensive evaluation data corresponding to each wine calibration sample as the model input data and the corresponding quality characteristic reference values ​​as the model output data, a correspondence between the comprehensive evaluation data and the quality characteristic reference values ​​is established, thus obtaining the wine quality analysis model.

[0206] The training method for the wine quality analysis model is as follows:

[0207] A wine quality training dataset is constructed, comprising comprehensive evaluation data and quality characteristic reference values ​​corresponding to multiple wine calibration samples. Following the same data acquisition and processing methods as the wines to be evaluated, the dynamic stability, temporal variation range, polarization data reliability, effective wine polarization characteristics, spectral characteristics, and physicochemical index characteristics of each wine calibration sample are obtained sequentially. Only wine calibration samples with polarization data reliability greater than or equal to a preset reliability threshold are retained. The retained effective wine polarization characteristics, spectral characteristics, and physicochemical index characteristics are then standardized, reliability weighted, and feature-connected as described above to obtain the comprehensive evaluation data for each wine calibration sample. This comprehensive evaluation data is used to characterize the multi-source feature sequence of wine formed by connecting weighted polarization characteristics, weighted spectral characteristics, and weighted physicochemical index characteristics in a preset order, and serves as the input data for the wine quality analysis model.

[0208] At least one of the following reference values ​​was obtained for each wine calibration sample using a pre-defined standard testing method: color stability reference value, clarification stability reference value, oxidation stability reference value, and phenolic structure reference value. The comprehensive evaluation data corresponding to the same wine calibration sample was used as input data, and the corresponding quality characteristic reference value was used as output data. These data were then linked according to the same sample number to form wine quality training samples. The wine quality training dataset was divided into training, validation, and test sets at a ratio of 70%, 15%, and 15%, respectively, ensuring that each dataset contained wine quality training samples corresponding to different quality characteristic grading intervals.

[0209] The wine quality analysis model uses an input layer, a first hidden layer, a second hidden layer, and an output layer connected in sequence. The number of nodes in the input layer is equal to the number of features contained in the comprehensive evaluation data. The first hidden layer has 64 nodes, and the second hidden layer has 32 nodes. Both hidden layers use a linear rectified function. The number of nodes in the output layer is equal to the number of quality features to be predicted. Each output node outputs a predicted value for one quality feature.

[0210] Supervised training of the wine quality analysis model was conducted using a training set. Comprehensive evaluation data was input into the model in a predetermined order: weighted polarization characteristics, weighted spectral characteristics, and weighted physicochemical indicators. Forward propagation yielded predicted values ​​for each quality characteristic. Mean squared error was used to calculate the training loss between the predicted and reference values ​​of the quality characteristics. Backpropagation and the Adam optimization method were then used to update the connection parameters and node bias parameters of the wine quality analysis model. Each training batch contained 32 sets of wine quality training samples, with an initial learning rate of 0.001 and a maximum training epoch of 500 epochs. After each epoch, a validation loss was calculated using a validation set. When the validation loss decreased, the parameters of the current wine quality analysis model were saved. Training stopped when the validation loss did not decrease for 20 consecutive epochs, and the parameters saved with the minimum validation loss were selected as candidate parameters.

[0211] The test set is processed using a wine quality analysis model with candidate parameters. The mean absolute error between the predicted value of each quality feature and the corresponding reference value is calculated. When the mean absolute error for each quality feature is less than or equal to 10% of the range of the reference value for that quality feature, the wine quality analysis model is considered to have completed training. The candidate parameters are then determined as the final parameters, resulting in a fully trained wine quality analysis model. The trained wine quality analysis model takes the comprehensive evaluation data corresponding to the wine to be evaluated as input, receives each feature according to the feature arrangement order adopted in the training phase, and outputs the predicted values ​​of each quality feature corresponding to the wine to be evaluated.

[0212] The comprehensive evaluation data X corresponding to the wine to be evaluated is input into a pre-established wine quality analysis model to obtain predicted values ​​for various quality characteristics of the wine to be evaluated. These predicted quality characteristic values ​​characterize the predicted results of color stability, clarification stability, oxidation stability, or phenolic structure calculated by the wine quality analysis model based on the comprehensive evaluation data of the wine to be evaluated.

[0213] The predicted values ​​of each quality characteristic are compared with their corresponding preset quality characteristic grading intervals to determine the quality characteristic level corresponding to each predicted value. The quality characteristic level is used to characterize the quality characteristic grading interval to which the predicted quality characteristic value belongs.

[0214] The preset quality characteristic grading intervals are determined based on the quality characteristic reference values ​​of the wine calibration samples and preset evaluation standards, and remain unchanged during the quality evaluation process of the wine to be evaluated. The quality characteristic reference values ​​of the wine calibration samples are arranged in ascending order of value, and the quality characteristic grading intervals are obtained according to preset quantiles.

[0215] The sample number, batch number, predicted values ​​of various quality characteristics, grade of various quality characteristics, effective wine polarization characteristics, reliability of polarization data, spectral characteristics, physicochemical index characteristics, and comprehensive evaluation data of the wine to be evaluated are associated with the same sample number to obtain the wine quality characteristic evaluation results.

[0216] The wine quality characteristic evaluation results include predicted values ​​of various quality characteristics, grades of various quality characteristics, and reliability of polarization data, so as to simultaneously characterize the quality characteristics of the wine to be evaluated and the reliability of the polarization image data used in this evaluation.

[0217] In this embodiment, all the aforementioned preset values ​​are predetermined before the wine to be evaluated is tested. Specifically, the preset time interval, preset evaluation time range, preset spectral wavelength range, preset wavelength interval, and preset number of repeated tests are determined based on the acquisition performance of the imaging and spectral detection equipment, the expected rate of change of the dynamic target to be detected, the time required for the three types of detection, and the required detection accuracy. The preset pixel difference threshold, preset reference pixel difference threshold, preset adjacent pixel number threshold, preset region pixel number threshold, preset centroid distance threshold, preset area difference threshold, preset equivalent diameter difference threshold, and preset effective spectral difference threshold are determined by repeatedly acquiring data from multiple stable and known wine calibration samples, statistically analyzing the distribution of corresponding noise, segmentation error, positional error, and spectral response error, and based on the preset... The confidence level, quantiles, or validation set misclassification rate are determined based on the principle of minimizing the error. The weighting coefficients for stability, polarization features, spectral features, and physicochemical indicators are determined based on the model validation results of the wine calibration samples, with the goal of minimizing the prediction error of quality characteristics. The preset stability and confidence thresholds are determined based on the corresponding numerical ranges of the calibration samples that meet the accuracy requirements for subsequent polarization feature extraction. The preset physicochemical indicators, their order, quality range, quality characteristic grading intervals, storage and processing conditions, static or accelerated processing conditions, oxidation processing conditions, and standard testing methods are determined based on the applicable wine testing standards, evaluation objectives, and the distribution of calibration samples. Once determined, each preset value remains unchanged within the same evaluation batch and throughout the establishment and use of the wine quality analysis model.

[0218] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0219] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.

Claims

1. A method for objectively evaluating the quality characteristics of wine based on comprehensive data, characterized in that, include: Collect state detection image data of the wine to be evaluated under the same reference polarization direction, perform dynamic change analysis on the state detection image data, and obtain the dynamic stability of the wine; After the dynamic stability of the wine meets the acquisition conditions of the target polarization image data, target polarization image data of multiple target polarization directions are acquired sequentially, and reference polarization image data are acquired between adjacent target polarization image data. Difference analysis is performed on the reference polarization image data to obtain the time-varying region. Based on the time-varying region, the target polarization image data is corrected to obtain corrected polarization image data; common effective region analysis and polarization feature extraction are performed on the corrected polarization image data to obtain the polarization features of the wine and the reliability of the polarization data. Spectral and physicochemical data of the wine to be evaluated are collected simultaneously. Based on the reliability of the polarization data, the polarization characteristics, spectral data, and physicochemical data of the wine are combined and analyzed to obtain comprehensive evaluation data. Quality analysis is performed on the comprehensive evaluation data to obtain the wine quality characteristic evaluation results.

2. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 1, characterized in that, The method for dynamically analyzing the state detection image data is as follows: Multiple frames of state detection images of the wine to be evaluated are continuously acquired at preset time intervals and recorded as state detection image data. The i-th frame and the (i+1)-th frame of state detection images acquired sequentially according to the acquisition time are defined as a group of adjacent state detection images, where i represents the number of the state detection images. Grayscale correction is performed on adjacent state detection images and the corresponding pixel difference is calculated to determine the changed pixels and the area ratio of the changed pixels. Identify dynamic targets in each frame of state detection image and perform adjacent frame matching to obtain the rate of change of the number of dynamic targets, the average speed of dynamic targets, the average size change rate of dynamic targets, and the average shape change rate of dynamic targets. The average values ​​of the liquid surface position change and liquid surface undulation change corresponding to all adjacent state detection images are identified and calculated to obtain the overall liquid surface position change and overall liquid surface undulation change, respectively.

3. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 2, characterized in that: The method for obtaining the dynamic stability of wine is as follows: Calculate the average values ​​of the rate of change of the number of dynamic targets, the average speed of the dynamic targets, the average size of the dynamic targets, and the average shape of the dynamic targets corresponding to all adjacent state detection images, and obtain the overall rate of change of the number of dynamic targets, the overall speed of the dynamic targets, the overall size of the dynamic targets, and the overall shape of the dynamic targets, respectively. Calculate the average of the total change in liquid level position and the total change in liquid level fluctuation to obtain the liquid level fluctuation amplitude; The dynamic stability of the wine is obtained by weighted analysis of the overall change in pixel area ratio, the overall change rate of the number of dynamic targets, the overall movement speed of dynamic targets, the overall change rate of the size of dynamic targets, the overall change rate of the shape of dynamic targets, and the fluctuation amplitude of the liquid surface. The dynamic stability of the wine is used to comprehensively characterize the dynamic stability of the wine under evaluation during the acquisition of state detection image data. The dynamic stability of the wine is compared with a preset stability threshold; when the dynamic stability of the wine is greater than or equal to the preset stability threshold, the wine to be evaluated is determined to meet the acquisition conditions of the target polarization image data. Otherwise, it is determined that the acquisition conditions for target polarization image data are not met.

4. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 1, characterized in that: The method for acquiring reference polarization image data between adjacent target polarization image data is as follows: Under the same detection band, exposure parameters and imaging position, a fixed polarization direction is selected as the reference polarization direction; Reference polarization images are acquired before the first target polarization image, between two adjacent target polarization images, and after the last target polarization image, so that each target polarization image corresponds to the preceding reference polarization image and the following reference polarization image.

5. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 4, characterized in that: The method for performing difference analysis on the reference polarization image data is as follows: Calculate the average gray value of the effective detection area of ​​wine in the front reference polarization image and the back reference polarization image, and perform gray-level correction on the back reference polarization image based on the front reference polarization image to obtain the corrected reference polarization image. Calculate the reference pixel difference between corresponding pixels in the uncorrected reference polarization image and the corrected reference polarization image, and determine the time-varying pixels and time-stable pixels based on the preset reference pixel difference threshold.

6. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 5, characterized in that: The method for obtaining the time-varying region is as follows: Count the number of time-changing pixels among the neighboring pixels around each time-changing pixel, and redefine the time-changing pixels that do not meet the preset neighbor number threshold as time-stable pixels. Connect adjacent pixels with remaining time changes to form a continuous region. Pixels with time changes in a continuous region whose number of pixels is less than a preset threshold for the number of pixels in the region are redefined as time-stable pixels. The union of the retained continuous regions is determined as the time-varying region of the corresponding target polarization image.

7. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 1, characterized in that: The method for correcting the target polarization image data to obtain corrected polarization image data is as follows: For each detection band, the region consisting of the same pixel positions in all target polarization images, the front reference polarization image and the corrected reference polarization image under that detection band that belong to the effective detection area of ​​wine is determined as the basic effective area corresponding to that detection band. Pixels located in the time-varying region within the basic effective region are identified as dynamic interference pixels and marked as invalid. Pixels not located in the time-varying region within the basic effective region are identified as time-stable pixels, thus obtaining a single corrected target polarization image and a single effective region corresponding to each target polarization image. The common effective region is obtained by taking the intersection of all single effective regions, and an effective corrected target polarization image and an effective corrected reference polarization image are generated based on the common effective region. The corrected polarization image data is then obtained by combining them.

8. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 7, characterized in that: The method for obtaining the polarization characteristics of wine and the reliability of polarization data is as follows: Calculate the average gray value of each effective target polarization image and the effective reference polarization image in the common effective region to obtain the target polarization response value and the reference polarization response value; The polarization response values ​​are arranged in a preset order according to the polarization direction and detection band to obtain the polarization characteristics of the wine. The reliability of polarization data is obtained by calculating the ratio of the number of common effective pixels in each detection band to the total number of basic effective pixels and averaging the ratios.

9. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 1, characterized in that: The method for obtaining comprehensive evaluation data through fusion analysis is as follows: The confidence level of polarization data is compared with a preset confidence threshold. When the confidence level of polarization data is greater than or equal to the preset confidence threshold, the polarization feature of wine is determined to be a valid polarization feature of wine. Spectral data and physicochemical index data corresponding to the same sample number and evaluation batch number were collected to obtain spectral characteristics and physicochemical index characteristics, respectively. The effective polarization characteristics, spectral characteristics and physicochemical index characteristics of wine were standardized to obtain standardized polarization characteristics, standardized spectral characteristics and standardized physicochemical index characteristics, respectively. Based on the reliability of polarization data, the fusion weights of standardized polarization features, standardized spectral features, and standardized physicochemical index features are determined. The corresponding standardized features are weighted using each fusion weight and then connected sequentially to obtain comprehensive evaluation data.

10. The method for objectively evaluating the quality characteristics of wine based on comprehensive data according to claim 1, characterized in that: The method for quality analysis of the comprehensive evaluation data is as follows: A comprehensive evaluation data and corresponding quality characteristic reference values ​​of multiple wine calibration samples are obtained. The comprehensive evaluation data is used as the model input data, and the quality characteristic reference values ​​are used as the model output data to establish a wine quality analysis model. The comprehensive evaluation data of the wine to be evaluated is input into the wine quality analysis model to obtain the predicted values ​​of various quality characteristics; The predicted values ​​of each quality characteristic are compared with the corresponding preset quality characteristic grading intervals to obtain the grade of each quality characteristic. By correlating the sample number, evaluation batch number, predicted values ​​of various quality characteristics, grades of various quality characteristics, and reliability of polarization data, the wine quality characteristic evaluation results are obtained.