Online detection system for optical features of liquid oil based on computer vision
By combining multi-angle polarization imaging and shear perturbation using computer vision, the problem of detecting fibrous foreign matter and assessing thixotropy in oils and fats has been solved. This has enabled accurate detection and quantitative assessment of fibrous foreign matter, characterized the thixotropic recovery process of oils and fats, and provided a quantitative basis for oil and fat quality assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUIFU SESAME OIL
- Filing Date
- 2026-04-07
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies cannot accurately identify fibrous foreign matter in oils and fats and quantitatively assess its impact on the thixotropic recovery process. Traditional fiber detection methods have low sensitivity and cannot extract orientation and length information. Thixotropic measurement methods cannot identify local recovery behavior and cannot establish a quantitative correlation between fiber spatial distribution and local thixotropic recovery.
An online detection system for optical features of liquid grease based on computer vision was adopted. Stokes parameters and polarization angle images were obtained through multi-angle polarization imaging. An anisotropic Gaussian filter bank was used to detect fibrous foreign objects. Shear perturbation was applied to trigger structural damage and track the viscosity recovery process. A viscosity recovery time map sequence was generated. Recovery parameters were fitted by dividing the fiber-adjacent and fiber-free regions and calculating the influence of fibers on thixotropic recovery.
It enables precise detection and spatial localization of slender fibrous foreign bodies, characterizes the spatiotemporal evolution of thixotropic recovery, establishes a quantitative correlation between the spatial distribution of fibers and local rheological properties, and provides an accurate assessment of the rheological properties of oils by fibrous foreign bodies.
Smart Images

Figure CN121994716B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil quality testing technology, and more specifically, to an online detection system for optical features of liquid oils based on computer vision. Background Technology
[0002] Sesame oil can combine with other components (such as nanocellulose, sterols, etc.) to form oil gels. For example, studies have shown that adding edible nanocellulose can transform walnut oil into solid "vegetable butter," and a similar method can be applied to sesame oil, forming a stable network structure by encapsulating oil droplets.
[0003] In the production process of structured oils containing fibrous foreign matter, such foreign matter includes shed fibers from filter materials and debris from packaging materials. The structured oils include thixotropic oils such as shortening containing crystalline networks and blended oils containing colloids. Fibers, acting as heterogeneous nuclei embedded in the crystalline or colloidal networks of the oil, exhibit a high aspect ratio and elongated shape, causing their long axis to often align with the oil flow direction, displaying a distinct directional distribution. Furthermore, their depolarization effect is anisotropic along both the long and short axes of the fiber. When oils undergo shear failure and need to restore their thixotropic structure, the presence of fibers may accelerate or hinder the structural reconstruction process in localized areas.
[0004] Existing technologies employ separate fiber detection methods and separate thixotropic measurement methods for oil quality assessment. The separate fiber detection method typically uses a conventional blob detection algorithm to detect foreign matter in the oil. The separate thixotropic measurement method evaluates the thixotropic properties of the oil by measuring the global viscosity recovery parameter after applying shear perturbation.
[0005] Existing technologies have the following drawbacks: standalone fiber detection methods can only locate fibrous foreign objects but cannot assess their impact on the rheological properties of oils; traditional blob detection algorithms assume the target is an isotropic circular spot, have low sensitivity to long and thin fibers, and cannot extract orientation and length information; standalone thixotropic measurement methods output global recovery parameters but cannot identify abnormal recovery behavior in the vicinity of fibers, nor can they distinguish whether the oil is in a low-viscosity state after structural damage or a high-viscosity state after recovery; when the two technologies are executed separately, a quantitative correlation between the spatial distribution of fibers and local thixotropic recovery cannot be established, resulting in an inability to accurately assess the actual impact of fibrous foreign objects on the rheological properties of thixotropic oils. Summary of the Invention
[0006] This invention provides an online detection system for optical features of liquid oils based on computer vision, which solves the technical problem in related technologies that cannot accurately identify fibrous foreign matter in oils and quantitatively assess its impact on the thixotropic recovery process.
[0007] This invention discloses an online detection method for optical features of liquid grease based on computer vision, comprising the following steps: sequentially illuminating the detection area of flowing grease at multiple polarization angles, simultaneously acquiring multiple sets of corresponding polarization images to obtain multi-angle polarization image data; calculating the Stokes parameters at each pixel position based on the multi-angle polarization image data to generate a degree of polarization image and a polarization angle image; applying an anisotropic Gaussian filter bank containing multiple slender kernel functions in different directions to the degree of polarization image to extract the linear response intensity in each direction, and confirming the candidate region of fibrous foreign matter through consistency judgment by combining the polarization angle value at the corresponding position in the polarization angle image; performing skeletonization processing on the candidate region of fibrous foreign matter to extract the center line, generating a fiber spatial distribution mask and fiber geometric feature data; applying a shear perturbation pulse upstream of the detection area of flowing grease to trigger the destruction process of the grease structure; and analyzing the shear perturbation pulse data. Starting at the initial moment, a structured light pattern is projected onto the flow oil detection area, and a sequence of deformed images is continuously acquired at fixed time intervals. The temporal velocity field data of the recovery process is obtained through phase demodulation. A standard intensity probe pulse perturbation is applied to each time point in the temporal velocity field data of the recovery process, and the velocity response characteristics at each spatial location are measured and the instantaneous viscosity value is calculated to generate a viscosity recovery time map sequence. Based on the fiber spatial distribution mask, the viscosity recovery time map sequence is divided into fiber-adjacent regions and fiber-free regions. The viscosity recovery curves of the fiber-adjacent regions and fiber-free regions are fitted with the exponential recovery model, respectively, and the recovery time constant and recovery degree parameters of the fiber-adjacent regions and fiber-free regions are extracted. The ratio of the recovery time constant of the fiber-adjacent region to the recovery time constant of the fiber-free region and the spatial distribution difference statistics are calculated to generate a spatial coupling quantitative assessment result of the influence of fibers on thixotropic recovery.
[0008] Furthermore, the plurality of polarization angles are four polarization angles: 0°, 45°, 90°, and 135°; the Stokes parameters include the total light intensity parameter, the difference parameter between the horizontal and vertical polarization components, and the difference parameter between the 45° and 135° polarization components; the degree of polarization is calculated based on the ratio of the square root of the sum of the squares of the differences between the horizontal and vertical polarization components and the squares of the differences between the 45° and 135° polarization components to the total light intensity parameter; the polarization angle is calculated based on half the arctangent of the ratio of the difference parameter between the 45° and 135° polarization components to the difference parameter between the horizontal and vertical polarization components.
[0009] Furthermore, the anisotropic Gaussian filter bank comprises M elongated kernel functions in different directions. The elongated kernel function in the k-th direction is defined as a two-dimensional Gaussian function extending along a direction angle, wherein the direction angles are uniformly distributed at intervals of 180° divided by M. The elongated kernel function has a standard deviation along the major axis and a standard deviation along the minor axis in the local coordinate system, with the standard deviation along the major axis being greater than the standard deviation along the minor axis. Convolution operations are performed on each pixel position in the polarization degree image using all M elongated kernel functions to obtain the filter response intensity values in the M directions.
[0010] Furthermore, the consistency judgment process is as follows: for each pixel position in the polarization degree image, the direction angle that generates the maximum filtering response is determined, and the angle difference between the direction angle and the corresponding polarization angle value in the polarization angle image is calculated. When the angle difference is less than the consistency threshold and the maximum filtering response intensity is greater than the response intensity threshold, the pixel position is determined to be a candidate region for fibrous foreign matter. The response intensity threshold is determined based on the mean response intensity of the fiberless background region in the polarization degree image plus three times the standard deviation.
[0011] Furthermore, the skeletonization process employs a morphological thinning algorithm, which removes non-centerline pixels from the candidate region of fibrous foreign matter through iterative erosion while maintaining the connectivity of the fibers. The fiber geometric feature data includes the centerline coordinate sequence, length, average width, and orientation angle of each fiber segment, where the fiber length is the cumulative arc length of the centerline coordinate sequence, the average width is the average width of the candidate region of fibrous foreign matter in the direction perpendicular to the centerline, and the orientation angle is the weighted average of the tangent direction angles of the centerline at each position.
[0012] Furthermore, the shearing disturbance pulse is generated by a shearing actuator located upstream of the flowing grease detection area. The shearing actuator applies a shearing action to the flowing grease at a preset shearing rate during the pulse duration. The phase demodulation adopts the Fourier transform method, performs a two-dimensional Fourier transform on the deformed image, extracts the spectral component corresponding to the fundamental frequency of the structured light in the frequency domain, filters and performs an inverse Fourier transform on the spectral component to obtain a complex demodulated signal, and obtains the phase value by calculating the argument of the demodulated signal.
[0013] Furthermore, the phase change between adjacent time points is converted into a displacement, which is equal to the phase change divided by 2π and then multiplied by the spatial period of the structured light pattern; the flow velocity value at each spatial location is equal to the displacement divided by the acquisition time interval; when the phase change exceeds the range of negative π to positive π, a phase unrolling algorithm is used to eliminate phase ambiguity.
[0014] Furthermore, the shear stress of the standard strength detection pulse disturbance is 5% to 10% of the shear stress of the shear disturbance pulse; the calculation process of the instantaneous viscosity value is as follows: record the flow velocity values before and after applying the standard strength detection pulse disturbance, calculate the flow velocity response amplitude, divide the flow velocity response amplitude by the flow channel characteristic size to obtain the shear rate, and divide the shear stress corresponding to the standard strength detection pulse disturbance by the shear rate to obtain the instantaneous viscosity value.
[0015] Further, the fiber-adjacent region is defined as the region extending outward from the fiber centerline within a predetermined distance in the fiber spatial distribution mask, the predetermined distance being 2 to 10 times the average fiber width; the exponential recovery model represents the viscosity value as an exponential function equal to the equilibrium viscosity value minus the difference between the equilibrium viscosity value and the initial viscosity value multiplied by the ratio of negative time to recovery time constant; the recovery degree parameter is defined as the difference between the equilibrium viscosity value and the initial viscosity value divided by the difference between the reference viscosity value and the initial viscosity value; the spatial distribution difference statistics include the ratio of the spatial variation coefficient of the recovery time constant between the fiber-adjacent region and the fiber-free region, the spatial mean difference of the recovery degree parameter, and the correlation coefficient between the fiber orientation angle and the local recovery time constant distribution.
[0016] This invention discloses an online detection system for optical features of liquid oil based on computer vision, comprising: a multi-angle polarization image acquisition module, used to sequentially illuminate the detection area of flowing oil at multiple polarization angles, simultaneously acquire multiple sets of corresponding polarization images, and obtain multi-angle polarization image data; a polarization feature image generation module, used to calculate the Stokes parameter at each pixel position based on the multi-angle polarization image data, and generate a polarization degree image and a polarization angle image; a fibrous foreign matter detection module, used to apply an anisotropic Gaussian filter bank to the polarization degree image to extract the linear response intensity in each direction, and combine the polarization angle image to confirm the candidate region of fibrous foreign matter through consistency judgment, and perform skeletonization processing to generate a fiber spatial distribution mask and fiber geometric feature data; and a shear perturbation application module, used to apply a shear perturbation pulse upstream of the detection area of flowing oil to trigger the oil structure The system comprises the following modules: a time-series velocity field acquisition module, used to project structured light patterns onto the detection area of flowing grease and continuously acquire deformation image sequences, obtaining time-series velocity field data of the recovery process through phase demodulation; a viscosity recovery time map generation module, used to apply standard intensity probe pulse perturbation to each time point in the time-series velocity field data of the recovery process, measure the velocity response characteristics and calculate the instantaneous viscosity value, generating a viscosity recovery time map sequence; a recovery parameter extraction module, used to divide the viscosity recovery time map sequence into fiber-adjacent regions and fiber-free regions based on a fiber spatial distribution mask, and apply an exponential recovery model to fit and extract the recovery time constant and recovery degree parameters; and a coupling evaluation result generation module, used to calculate the ratio of the recovery time constant of the fiber-adjacent region and the spatial distribution difference statistics of the fiber-free region, generating a spatial coupling quantitative evaluation result of the influence of fibers on thixotropic recovery.
[0017] This invention achieves precise detection and spatial localization of slender fibrous foreign objects through multi-angle polarization imaging combined with anisotropic Gaussian filter banks and consistency judgment. It achieves spatiotemporal evolution characterization of thixotropic recovery by triggering structural destruction through shear perturbation pulses and tracking the viscosity recovery process in a spatially resolved manner. It achieves quantitative correlation between fiber spatial distribution and local thixotropic recovery by region division based on fiber spatial distribution mask and extraction of recovery parameters. This invention solves the technical problem that existing technologies cannot establish a quantitative correlation between fibrous foreign objects and the rheological properties of oils and achieves the technical effect of simultaneously detecting fibrous foreign objects and quantitatively evaluating their impact on the local rheological properties of thixotropic oils. Attached Figure Description
[0018] Figure 1 This is a flowchart of an online detection method for optical features of liquid oil based on computer vision, provided in an embodiment of the present invention. Detailed Implementation
[0019] In the production process of structured oils containing fibrous foreign matter, such foreign matter includes shed fibers from filter materials and debris from packaging materials. The structured oils include thixotropic oils such as shortening containing crystalline networks and blended oils containing colloids. Fibers, acting as heterogeneous nuclei embedded in the crystalline or colloidal networks of the oil, exhibit a high aspect ratio and elongated shape, causing their long axis to often align with the oil flow direction, displaying a distinct directional distribution. Furthermore, their depolarization effect is anisotropic along both the long and short axes of the fiber. When oils undergo shear failure and need to restore their thixotropic structure, the presence of fibers may accelerate or hinder the structural reconstruction process in localized areas.
[0020] Existing technologies suffer from the following technical problems: Individual fiber detection methods can only locate fibrous foreign objects but cannot assess their impact on the rheological properties of oils; traditional blob detection algorithms assume the target is an isotropic circular spot, exhibiting low sensitivity for slender fibers and failing to extract orientation and length information. Individual thixotropic measurement methods output global recovery parameters but cannot identify abnormal recovery behavior in the vicinity of fibers, nor can they distinguish between the low-viscosity state of the oil after structural damage and the high-viscosity state after recovery. Furthermore, when the two technologies are executed separately, a quantitative correlation between fiber spatial distribution and local thixotropic recovery cannot be established.
[0021] The online detection method for optical features of liquid oil based on computer vision provided in this invention includes the following steps:
[0022] Step 1: Acquire polarization image data by acquiring multi-angle polarization images;
[0023] The flow oil detection area is sequentially irradiated at four polarization angles, and four sets of corresponding polarization images are acquired simultaneously to obtain multi-angle polarization image data.
[0024] It should be noted that the four polarization angles mentioned above are 0°, 45°, 90°, and 135°. These four polarization angles are used for subsequent calculation of the complete Stokes parameters. At each polarization angle, the polarized light source illuminates the flowing oil detection area. After scattering by the oil and any fibrous foreign matter that may be present within it, the corresponding polarized image is acquired by the imaging sensor. Each set of polarized images records the light intensity value at each pixel position under the polarization angle.
[0025] Step 2: Calculate the Stokes parameters to generate a polarization feature image;
[0026] Stokes parameters are calculated for each pixel location based on multi-angle polarization image data to generate polarization degree images and polarization angle images.
[0027] It should be noted that the Stokes parameters are calculated based on the light intensity values collected at four polarization angles. Let... The light intensities collected at polarization angles of 0°, 45°, 90°, and 135° are respectively , , , Then Stokes parameters , , Calculate using the following formula:
[0028] ;
[0029] ;
[0030] ;
[0031] in, Indicates total light intensity. This represents the difference between the horizontal and vertical polarization components. This represents the difference between the 45° and 135° polarization components.
[0032] polarization degree and polarization angle Calculate using the following formula:
[0033] ;
[0034] ;
[0035] Among them, polarization degree The value range is from 0 to 1, and the polarization angle is... The range of values is arrive The degree of polarization image reflects the degree of depolarization at each location. The fiber foreign body region exhibits a characteristic degree of polarization distribution due to its anisotropic scattering characteristics. The polarization angle image reflects the polarization direction at each location and is related to the spatial orientation of the fiber.
[0036] Step 3: Detect the spatial distribution mask of fibrous foreign matter formation;
[0037] An anisotropic Gaussian filter bank containing multiple slender kernel functions in different directions is applied to the polarization degree image to extract the linear response intensity in each direction. Combined with the polarization angle value at the corresponding position in the polarization angle image, the candidate region of fibrous foreign matter is confirmed by consistency judgment. The candidate region of fibrous foreign matter is skeletonized to extract the center line, and a fiber spatial distribution mask and fiber geometric feature data are generated.
[0038] It should be noted that the anisotropic Gaussian filter bank includes Slender kernel functions in different directions, among which Indicates the total number of directions. (The first...) Slender kernel functions in each direction Defined as along the direction angle (in , This represents a two-dimensional Gaussian function extended by a direction index. For slender kernel functions... In the local coordinate system The expression in is:
[0039] ;
[0040] in, Represents an exponential function. Along the direction angle Major axis coordinates, The minor axis coordinate is perpendicular to the major axis. The standard deviation is along the major axis. Let be the standard deviation along the minor axis, and To match the slender morphological characteristics of the fibers. Local coordinate system. With image coordinate system The conversion relationship between them is as follows:
[0041] ;
[0042] ;
[0043] in, This represents the center position of the filter kernel. For each pixel position in the polarization image... All applications Convolution operations are performed on thin kernel functions in each direction to obtain... The filter response intensity values in each direction are denoted as... ,in .
[0044] Furthermore, the above The value ranges from 10% to 30% of the expected fiber length. The value ranges from 50% to 150% of the expected fiber width to ensure that the anisotropic Gaussian filter bank has a response characteristic that is adapted to the target fiber size.
[0045] Furthermore, the above The value of is between 8 and 36, in order to strike a balance between computational complexity and directional resolution.
[0046] It should be noted that the above consistency judgment process is as follows: for each pixel position in the polarization image... First, determine the direction angle that produces the maximum filtered response at the pixel location. ,in Then calculate the polarization angle value at the corresponding position in the direction angle and polarization angle image. angular difference between When the angle difference is less than the preset consistency threshold And the maximum filter response strength Greater than the preset response strength threshold When the pixel location is determined to be a candidate region for fibrous foreign matter, the system will determine that the location is not a candidate region for fibrous foreign matter.
[0047] Furthermore, the aforementioned consistency threshold The value ranges from 15° to 30° to allow for a reasonable deviation between fiber orientation and polarization angle.
[0048] Furthermore, the aforementioned response intensity threshold The value is determined based on the statistical characteristics of the response intensity in the fiber-free background region of the polarization image. Specifically, it is the mean of the response intensity in the fiber-free background region plus three times the standard deviation, in order to effectively distinguish fiber signals.
[0049] It should be noted that the skeletonization process uses a morphological thinning algorithm, which removes non-centerline pixels from candidate regions of fibrous foreign objects through iterative erosion while maintaining the connectivity of the fibers, and extracts the centerline coordinate sequence of each fiber segment.
[0050] It should be noted that the aforementioned fiber geometric feature data includes the centerline coordinate sequence, length, average width, and orientation angle of each fiber segment. Specifically, fiber length is the cumulative arc length of the centerline coordinate sequence; average width is the average width of the fibrous foreign body candidate region in the direction perpendicular to the centerline; and orientation angle is the weighted average of the tangential angles of the centerline at various locations.
[0051] Step 4: Apply a shear perturbation pulse to trigger the destruction of the grease structure;
[0052] A high-intensity shear disturbance pulse is applied upstream of the flow grease detection area to trigger the destruction process of the grease structure.
[0053] It should be noted that the shear disturbance pulse is generated by a shear actuator located upstream of the flowing grease detection area, and the shear actuator operates for a preset pulse duration. With a preset shear rate Applying shear force to the flowing grease disrupts its crystalline network or colloidal structure, transforming it from a high-viscosity structured state to a low-viscosity disrupted state.
[0054] Furthermore, the duration of the aforementioned pulses The value ranges from 0.5 seconds to 5 seconds, and the shear rate is... The value ranges from 100 / second to 1000 / second to ensure that the grease structure is fully destroyed.
[0055] Step 5: Obtain time-series velocity field data during the recovery process;
[0056] Starting from the end of the shear disturbance, a structured light pattern is projected onto the detection area of the flowing oil and deformation image sequence is continuously acquired at fixed time intervals. The temporal velocity field data of the recovery process is obtained through phase demodulation.
[0057] It should be noted that the structured light pattern is a sinusoidal fringe pattern with a known spatial frequency. When projected onto the detection area of flowing oil, the oil flow causes deformation of the sinusoidal fringe pattern. The acquisition time interval for the deformed image sequence is... The total collection time covers the entire process of thixotropic recovery of oils.
[0058] Furthermore, the aforementioned data collection time interval The value ranges from 0.1 seconds to 2 seconds, and the total acquisition time ranges from 30 seconds to 600 seconds, in order to capture the complete temporal evolution characteristics of the recovery process.
[0059] It should be noted that phase demodulation uses the Fourier transform method to extract the phase value of each pixel position from the deformed image. Specifically, a two-dimensional Fourier transform is performed on the deformed image to extract the spectral component corresponding to the fundamental frequency of the structured light in the frequency domain. The spectral component is then filtered and subjected to an inverse Fourier transform to obtain a demodulated signal in complex form. The phase value is obtained by calculating the argument of the demodulated signal in complex form.
[0060] Furthermore, adjacent time points and Phase change between Converted to displacement over a fixed time interval The transformation relationship is as follows:
[0061] ;
[0062] in, The spatial period of the structured light pattern is given. The flow velocity at each spatial location is then calculated.
[0063] ;
[0064] Generating time-series velocity field data for the recovery process ,in For spatial coordinates, For time coordinates.
[0065] Furthermore, the aforementioned phase change amount The range of values is constrained by Within the interval, when the phase change exceeds The phase expansion algorithm is used to process the interval to eliminate phase ambiguity.
[0066] Step 6: Generate a spatially resolved viscosity recovery time map sequence;
[0067] A standard intensity probe pulse perturbation is applied to each time point in the time-series velocity field data of the recovery process. The velocity response characteristics at each spatial location are measured and the instantaneous viscosity value is calculated to generate a two-dimensional spatially resolved viscosity recovery time map sequence.
[0068] It should be noted that the standard strength probe pulse perturbation is a small perturbation with an intensity lower than that of the shear perturbation pulse. Its intensity is set so as not to disrupt the recovering structure of the grease, and it is only used to detect the viscosity state at the current moment. The shear stress of the standard strength probe pulse perturbation... It is 5% to 10% of the shear stress of the shear disturbance pulse.
[0069] It should be noted that the instantaneous viscosity value is calculated based on the flow velocity change characteristics before and after the application of the standard intensity probe pulse disturbance. For each spatial location... At the point of time Record the flow velocity value before applying the standard intensity probe pulse disturbance. and the flow velocity value after applying a standard intensity probe pulse disturbance Flow velocity response amplitude The calculation is as follows:
[0070] ;
[0071] Furthermore, the flow velocity response amplitude Convert to shear rate The transformation relationship is as follows:
[0072] ;
[0073] in, Characteristic dimensions of the flow channel. Instantaneous viscosity value. Calculated using the following relationship:
[0074] ;
[0075] in, Shear stress corresponding to standard strength probe pulse perturbation. Viscosity recovery time sequence. Record the change in viscosity over time at each spatial location.
[0076] Furthermore, the above viscosity recovery time sequence The time dimension in Covering from the end of the shear perturbation By the time the recovery is complete The complete time range, of which The value ranges from 30 seconds to 600 seconds, and this full time range ensures that the complete evolution of the oil from a low-viscosity destructive state to a high-viscosity recovery state is captured.
[0077] In this embodiment of the application, in order to reduce the interference of standard intensity probe pulse perturbation on the recovery process, the application of standard intensity probe pulse perturbation adopts a sparse time sampling strategy. In the early stage of recovery, a shorter sampling interval is used to capture the rapid change phase, and in the later stage of recovery, a longer sampling interval is used.
[0078] Step 7: Divide the region and extract the recovery parameters;
[0079] Based on the fiber spatial distribution mask, the viscosity recovery time map sequence is divided into fiber-adjacent region and fiber-free region. The viscosity recovery curves of the fiber-adjacent region and the fiber-free region are fitted with the exponential recovery model respectively, and the recovery time constant and recovery degree parameters of the fiber-adjacent region and the fiber-free region are extracted.
[0080] It should be noted that the fiber proximity region is defined as the area extending outward from the fiber centerline of the fiber spatial distribution mask at a predetermined distance. The region within the range, the fiber-free region is defined as the region outside the fiber-adjacent region within the coverage of the viscosity recovery time map sequence.
[0081] Furthermore, the aforementioned preset distance The value ranges from 2 to 10 times the average fiber width to cover the range of the fiber's influence on the restoration of the surrounding grease structure.
[0082] It should be noted that the expression for the exponential recovery model is:
[0083] ;
[0084] in, Represents an exponential function. This represents the initial viscosity value after shear failure. This is the equilibrium viscosity value after full recovery. To restore the time constant, This is the time from the end of the shear disturbance. Recovery degree parameter. Defined as:
[0085] ;
[0086] in, The reference viscosity value represents the equilibrium viscosity of the oil under the same conditions, unaffected by fibers.
[0087] It should be noted that when fitting the viscosity recovery curves of the fiber-adjacent region and the fiber-free region using the exponential recovery model, a nonlinear least squares method is employed for parameter estimation. Specifically, for a given region, ,in For pixel indexes within a certain region, Indexed by time point.
[0088] Furthermore, the objective function is to minimize the sum of squared residuals:
[0089] ;
[0090] Determine the recovery time constant for a certain region Initial viscosity value and equilibrium viscosity value ,in Represents the exponential function, the objective function of the sum of squared residuals. Time index in Traverse all sampling time points from the end of the shearing perturbation to the completion of the recovery, spatial index. By traversing all pixel positions within a certain region, a comprehensive fitting of the spatiotemporal evolution characteristics of that region can be achieved.
[0091] In this embodiment of the application, in order to obtain more refined spatial distribution information, the fiber adjacent area is further divided into multiple concentric ring regions according to the distance from the fiber centerline. The viscosity recovery curves of the multiple concentric ring regions are fitted respectively, and the recovery time constant and recovery degree parameters of the multiple concentric ring regions are extracted.
[0092] Step 8: Generate quantitative evaluation results of fiber-rheological coupling;
[0093] The ratio of the recovery time constant in the fiber-adjacent region to the recovery time constant in the fiber-free region and the spatial distribution difference statistics are calculated to generate a spatial coupling quantitative assessment result of the influence of fibers on thixotropic recovery.
[0094] It should be noted that the recovery time constant ratio Calculate using the following formula:
[0095] ;
[0096] in, The recovery time constant of the fiber's adjacent region. Let be the recovery time constant for the fiber-free region. When the presence of fibers slows down the thixotropic recovery process in a localized area, it indicates that the presence of fibers delays the thixotropic recovery process in that area. This indicates that the presence of fibers accelerates the thixotropic recovery process in the local area.
[0097] It should be noted that the spatial distribution difference statistics include the ratio of the spatial variation coefficient of the recovery time constant between the fiber-adjacent area and the non-fiber area, the difference in the spatial mean of the recovery degree parameter, and the correlation coefficient between the fiber orientation angle and the local recovery time constant distribution based on the fiber geometric feature data.
[0098] Furthermore, the ratio of spatial coefficients of variation The calculation is as follows:
[0099] ;
[0100] in, The coefficient of variation of the recovery time constant in the fiber's vicinity. The coefficient of variation is the recovery time constant in the fiber-free region. The coefficient of variation is defined as the ratio of the standard deviation to the mean.
[0101] Furthermore, the spatial mean difference of the recovery parameter The calculation is as follows:
[0102] ;
[0103] in, This represents the spatial mean of the recovery parameter within the fiber's vicinity. This represents the spatial mean of the recovery parameter within the fiber-free region.
[0104] Furthermore, the correlation coefficient between fiber orientation angle and local recovery time constant distribution was calculated using the Pearson correlation coefficient.
[0105] In this embodiment of the application, in order to evaluate the differential impact of different fiber characteristics on thixotropic recovery, the fibers are also classified based on fiber geometric feature data. The fibers are divided into multiple fiber categories according to different ranges of fiber length, width and orientation angle. The statistical values of recovery parameters of the adjacent areas corresponding to the multiple fiber categories are calculated respectively, and the quantitative evaluation results of fiber-rheological coupling of the classification are generated.
[0106] According to this embodiment, complete Stokes parameters are obtained through multi-angle polarization imaging. By combining the information from the degree of polarization image and the angle of polarization image, and combining the directional response characteristics of anisotropic Gaussian filter banks to slender targets, and confirming the results by judging the consistency between the filter response direction and the polarization angle, it is possible to specifically detect fibrous foreign objects with directional depolarization effects. This overcomes the problem that traditional blob detection algorithms assume the target to be an isotropic circular spot and are insensitive to slender fibers.
[0107] According to this embodiment, the structure of the oil is destroyed by actively applying shear perturbation pulses, and then the viscosity recovery process at each location is continuously tracked in a spatially resolved manner to generate a viscosity recovery time map sequence. Therefore, it can characterize the temporal dynamics and spatial distribution characteristics of the thixotropic recovery of oil, overcome the problem that instantaneous viscosity measurement only outputs the state at a single moment and cannot characterize the recovery process, and also overcome the problem that global measurement cannot identify abnormal recovery behavior in local areas.
[0108] According to this embodiment, by dividing the fiber spatial distribution mask and viscosity recovery time map sequence into corresponding regions, the recovery time constant and recovery degree parameters of the fiber-adjacent region and the fiber-free region are extracted respectively, and the ratio and difference statistics between the two types of regions are calculated. Therefore, a quantitative correlation between fiber spatial distribution and local thixotropic recovery is established, overcoming the problem that fiber-rheological correlation cannot be established when fiber detection and thixotropic measurement are performed separately. This provides a complete quantitative basis for the quality assessment of thixotropic oils containing fiber foreign matter.
[0109] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. An online detection method for optical features of liquid oils based on computer vision, characterized in that, Includes the following steps: The flow oil detection area is sequentially irradiated at multiple polarization angles, and multiple sets of corresponding polarization images are acquired simultaneously to obtain multi-angle polarization image data. Stokes parameters for each pixel location are calculated based on multi-angle polarization image data to generate polarization degree images and polarization angle images; An anisotropic Gaussian filter bank containing multiple elongated kernel functions in different directions is applied to the polarization degree image to extract linear response intensities in each direction. Combined with the polarization angle values at corresponding positions in the polarization angle image, a consistency judgment is used to identify fibrous foreign object candidate regions. The consistency judgment process is as follows: for each pixel position in the polarization degree image, the direction angle generating the maximum filter response is determined. The angle difference between the direction angle and the corresponding polarization angle value in the polarization angle image is calculated. When the angle difference is less than a consistency threshold and the maximum filter response intensity is greater than a response intensity threshold, the pixel position is determined to be a fibrous foreign object candidate region. The consistency threshold ranges from 15° to 30°. The response intensity threshold is determined by adding three times the standard deviation to the mean response intensity of the fiber-free background region in the polarization degree image. The fibrous foreign object candidate regions are then subjected to skeletonization processing to extract the centerline, generating a fiber spatial distribution mask and fiber geometric feature data. A shear disturbance pulse is applied upstream of the flow grease detection area to trigger the destruction process of the grease structure. The shear disturbance pulse is generated by a shear actuator located upstream of the flow grease detection area. The shear actuator applies a shearing action to the flowing grease at a preset shear rate during the pulse duration. Starting from the end of the shear disturbance, a structured light pattern is projected onto the flow oil detection area and a sequence of deformed images is continuously acquired at fixed time intervals. The time-series flow velocity field data of the recovery process is obtained through phase demodulation. The phase demodulation adopts the Fourier transform method, performs a two-dimensional Fourier transform on the deformed image, extracts the spectral component corresponding to the fundamental frequency of the structured light in the frequency domain, filters and performs inverse Fourier transform on the spectral component to obtain a demodulated signal in complex form, and obtains the phase value by calculating the argument of the demodulated signal. A standard intensity probe pulse perturbation is applied to each time point in the time-series velocity field data of the recovery process. The velocity response characteristics at each spatial location are measured and the instantaneous viscosity value is calculated to generate a viscosity recovery time map sequence. Based on a fiber spatial distribution mask, the viscosity recovery time map sequence is divided into fiber-adjacent regions and fiber-free regions. The fiber-adjacent region is defined as the area within a preset distance extending outward from the fiber centerline in the fiber spatial distribution mask. The preset distance is 2 to 10 times the average fiber width. The viscosity recovery curves of the fiber-adjacent region and the fiber-free region are fitted with an exponential recovery model. The exponential recovery model represents a viscosity value equal to the equilibrium viscosity value minus the difference between the equilibrium viscosity value and the initial viscosity value multiplied by the ratio of negative time to recovery time constant. The nonlinear least squares method is used for parameter estimation to extract the recovery time constant and recovery degree parameter of the fiber-adjacent region and the fiber-free region. The recovery degree parameter is defined as the difference between the equilibrium viscosity value and the initial viscosity value divided by the difference between the reference viscosity value and the initial viscosity value. The ratio of the recovery time constant of the fiber-adjacent region to the recovery time constant of the fiber-free region and the spatial distribution difference statistics are calculated. The spatial distribution difference statistics include the ratio of the spatial variation coefficient of the recovery time constant between the fiber-adjacent region and the fiber-free region, the spatial mean difference of the recovery degree parameter, and the correlation coefficient between the fiber orientation angle and the local recovery time constant distribution. The spatial coupling quantitative assessment results of the fiber's influence on thixotropic recovery are generated.
2. The online detection method for optical features of liquid oil based on computer vision according to claim 1, characterized in that, The multiple polarization angles are 0°, 45°, 90°, and 135°. The Stokes parameters include the total light intensity parameter, the difference parameter between the horizontal and vertical polarization components, and the difference parameter between the 45° and 135° polarization components. The degree of polarization is calculated based on the ratio of the square root of the sum of the squares of the differences between the horizontal and vertical polarization components and the squares of the differences between the 45° and 135° polarization components to the total light intensity parameter. The polarization angle is calculated as half the arctangent of the ratio of the difference between the 45° and 135° polarization components to the difference between the horizontal and vertical polarization components.
3. The online detection method for optical features of liquid oil based on computer vision according to claim 1, characterized in that, The anisotropic Gaussian filter bank comprises M elongated kernel functions in different directions. The elongated kernel function in the k-th direction is defined as a two-dimensional Gaussian function extending along a direction angle, which is uniformly distributed at intervals of 180° divided by M. The elongated kernel function has a standard deviation along the major axis and a standard deviation along the minor axis in the local coordinate system, with the standard deviation along the major axis being greater than the standard deviation along the minor axis. Convolution operations are performed on each pixel position in the polarization image using all M elongated kernel functions to obtain the filter response intensity values in the M directions.
4. The online detection method for optical features of liquid oil based on computer vision according to claim 1, characterized in that, The skeletonization process employs a morphological thinning algorithm, which iteratively erodes to remove non-centerline pixels from the candidate region of fibrous foreign objects while maintaining fiber connectivity. The fiber geometric feature data includes the centerline coordinate sequence, length, average width, and orientation angle of each fiber segment. The fiber length is the cumulative arc length of the centerline coordinate sequence, the average width is the average width of the candidate region of fibrous foreign objects in the direction perpendicular to the centerline, and the orientation angle is the weighted average of the tangent direction angles of the centerline at each position.
5. The online detection method for optical features of liquid oil based on computer vision according to claim 1, characterized in that, The phase change between adjacent time points is converted into a displacement, which is equal to the phase change divided by 2π and then multiplied by the spatial period of the structured light pattern; the flow velocity at each spatial location is equal to the displacement divided by the acquisition time interval; when the phase change exceeds the range of negative π to positive π, a phase unfolding algorithm is used to eliminate phase ambiguity.
6. The online detection method for optical features of liquid oil based on computer vision according to claim 1, characterized in that, The shear stress of the standard strength probe pulse disturbance is 5% to 10% of the shear stress of the shear disturbance pulse; the calculation process of the instantaneous viscosity value is as follows: record the flow velocity values before and after applying the standard strength probe pulse disturbance, calculate the flow velocity response amplitude, divide the flow velocity response amplitude by the flow channel characteristic size to obtain the shear rate, and divide the shear stress corresponding to the standard strength probe pulse disturbance by the shear rate to obtain the instantaneous viscosity value.
7. A computer vision-based online detection system for optical features of liquid oils, used to execute the computer vision-based online detection method for optical features of liquid oils according to any one of claims 1 to 6, characterized in that, include: The multi-angle polarization image acquisition module is used to sequentially irradiate the detection area of flowing oil at multiple polarization angles, and simultaneously acquire multiple sets of corresponding polarization images to obtain multi-angle polarization image data. The polarization feature image generation module is used to calculate the Stokes parameter at each pixel position based on multi-angle polarization image data, and generate polarization degree image and polarization angle image; The fibrous foreign object detection module is used to extract the linear response intensity in each direction by applying an anisotropic Gaussian filter bank to the polarization degree image, and to confirm the candidate region of fibrous foreign object by consistency judgment in combination with the polarization angle image. Then, it performs skeletonization processing to generate a fiber spatial distribution mask and fiber geometric feature data. The shear disturbance application module is used to apply shear disturbance pulses upstream of the flow grease detection area to trigger the destruction process of the grease structure; The temporal velocity field acquisition module is used to project structured light patterns onto the detection area of flowing oil and continuously acquire deformed image sequences, and obtain temporal velocity field data of the recovery process through phase demodulation. The viscosity recovery time map generation module is used to apply standard intensity probe pulse perturbation to each time point in the time-series velocity field data of the recovery process, measure the velocity response characteristics and calculate the instantaneous viscosity value, and generate a viscosity recovery time map sequence. The recovery parameter extraction module is used to divide the viscosity recovery time map sequence into fiber-adjacent regions and fiber-free regions based on the fiber spatial distribution mask, and to extract the recovery time constant and recovery degree parameters by applying the exponential recovery model. The coupling evaluation result generation module is used to calculate the ratio of the recovery time constant between the fiber-adjacent region and the non-fiber region and the spatial distribution difference statistics, and generate the spatial coupling quantitative evaluation results of the fiber's influence on thixotropic recovery.