A method for detecting the layered interface of Echinacea extract based on image segmentation

CN122223070BActive Publication Date: 2026-09-01XI AN RAINBOW BIO-TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202610669207.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-15
Publication Date
2026-09-01
Estimated Expiration
2046-05-15

AI Technical Summary

Technical Problem

[0005]为了解决现有技术无法适应流体沉降末期动态特征消失导致的特征失真,且依赖经验阈值难以排除外界干扰,从而无法在极低的光学对比度下准确、稳定地对紫锥菊提取物萃取分层界面进行检测的问题,本发明提供基于图像分割的紫锥菊提取物萃取分层界面检测方法,该方法包括:

Benefits of technology

本发明结合紫锥菊有效成分萃取工艺,针对紫锥菊提取物萃取液透光率低、易产生多级乳化带、工业现场震动干扰大等问题,构建了一套将流体力学与机器视觉相融合的数据处理架构,解决了常规视觉检测技术在低对比度暗色液体中存在识别局限的问题,确保了紫锥菊提取物萃取液物理分层界面的准确检测;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122223070B_ABST
    Figure CN122223070B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image data processing technology, specifically to a method for detecting the layered interface of Echinacea extract based on image segmentation. The method includes: acquiring a continuous image sequence and preprocessing it; calculating the spatial static feature value and optical flow dynamic feature value of each pixel; obtaining the global relative kinetic energy value and environmental noise value; constructing a dynamic attenuation fusion weight factor; then fusing the spatial static feature value and the optical flow dynamic feature value to obtain a comprehensive feature value; iterating and recombining the comprehensive feature value to obtain a comprehensive feature matrix; pre-setting dual steady-state conditions; determining the interface physical height and dynamic attenuation fusion weight factor of the comprehensive feature matrix; and outputting a detection report based on the determination result. This invention constructs dynamic and static feature weights by combining the static law of fluid sedimentation, avoiding misjudgments caused by feature disappearance at the end of sedimentation and improving detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and more specifically to a method for detecting the layered interface of echinacea extract based on image segmentation. Background Technology

[0002] In the extraction and purification of the active ingredients of Echinacea purpurea, liquid-liquid extraction is the most commonly used separation technique. After the mixed liquid is thoroughly stirred in the reaction vessel, the upper and lower phases are separated by static sedimentation. The layering state is determined by collecting images from the sight glass of the reaction vessel, and then the bottom valve is controlled to discharge the material. However, Echinacea extract contains a large amount of macromolecular polysaccharides and plant pigments, and the liquid is a very deep brownish-green with very low light transmittance. Under these conditions, the color difference between the upper and lower liquids is minimal, and there is a thick emulsion layer at the interface. This extremely low optical contrast makes it difficult for conventional static image recognition algorithms to accurately locate the true layering interface, and often misidentifies suspended residues or emulsion bands in the liquid as layering lines.

[0003] To address the issue of misjudgment in static images, existing technologies have introduced dual-path feature fusion algorithms. These algorithms extract static features while incorporating dynamic optical flow features, utilizing the tumbling displacement of the liquid during the initial settling phase to aid in distinguishing false interfaces. For example, Chinese patent document CN106529477B, entitled "A Video Human Behavior Recognition Method Based on Significant Trajectory and Spatiotemporal Evolution Information," discloses a detection method that separately extracts static saliency and dynamic saliency based on optical flow, and calculates the combined saliency using a linear fusion approach. While this method improves initial recognition performance to some extent, the extraction and settling of Echinacea extract is a unidirectional physical process that gradually transitions from vigorous motion to stillness. Most existing dual-path fusion algorithms use fixed feature weights, neglecting the significant attenuation or even disappearance of dynamic displacement features in the viewing mirror image when settling reaches its final stage and the macroscopic movement of the liquid completely ceases. At this point, the fixed weight allocation mechanism cannot adapt to this abrupt change in physical state, leading to severe distortion of the fused feature data. Furthermore, it is susceptible to interference from tiny residues on the viewing mirror wall, resulting in unstable detection results.

[0004] Furthermore, when determining whether stratification is complete, existing technologies typically rely on empirical thresholds for steady-state determination. For example, Chinese patent application CN106052792A, entitled "A Method and Device for Detecting Liquid Level in PET Bottles Based on Machine Vision," discloses a method for scanning and determining the row where the liquid level is located based on empirically set thresholds. However, due to the continuous vibration caused by the operation of large equipment in industrial settings, it is difficult to completely distinguish between the actual fluid settling displacement and external vibration interference. This not only leads to frequent false alarms and increases the risk of valve malfunction, but also easily causes cross-contamination between the upper and lower phase liquids, affecting the purity of the final product. Summary of the Invention

[0005] To address the limitations of existing technologies in detecting feature distortion caused by the disappearance of dynamic characteristics at the end of fluid settling, and the difficulty in eliminating external interference by relying on empirical thresholds, thus hindering accurate and stable detection of the layered extraction interface of Echinacea extract under extremely low optical contrast, this invention provides an image segmentation-based method for detecting the layered extraction interface of Echinacea extract. This method includes: An image acquisition device is configured to acquire a continuous image sequence at the sight glass of the reactor. The continuous image sequence is preprocessed to obtain a grayscale image sequence containing multiple frames of grayscale images. The spatial static feature value and optical flow dynamic feature value of each pixel in the grayscale image sequence are calculated. The global relative kinetic energy value of the grayscale image sequence is calculated, and the environmental noise value and the historical highest kinetic energy peak value are obtained. Based on the environmental noise value, the historical highest kinetic energy peak value, and the global relative kinetic energy value, a dynamic attenuation fusion weight factor is calculated. Based on the dynamic attenuation fusion weight factor, the spatial static feature value and the optical flow dynamic feature value of each pixel are fused to obtain a comprehensive feature value for each pixel. The comprehensive feature value is traversed and reorganized to obtain a comprehensive feature matrix. The interface physical height of the comprehensive feature matrix is ​​extracted. A dual steady-state condition is preset. Based on the dual steady-state condition, the fluctuation range of the interface physical height and the dynamic attenuation fusion weight factor are determined, and a detection report is output according to the determination result.

[0006] This invention dynamically adjusts the characteristic specific gravity according to the physical settling progress of the fluid, effectively avoiding the distortion of characteristic data caused by the disappearance of dynamic displacement at the end of the settling period, solving the interface positioning problem of dark liquids under extremely low optical contrast, and improving detection accuracy.

[0007] Further, the preprocessing includes: converting the continuous image sequence into a single-channel grayscale image; and performing smoothing filtering on the single-channel grayscale image in both the spatial and temporal dimensions to obtain the grayscale image sequence.

[0008] This invention converts color images into single-channel grayscale images and performs smoothing filtering in both spatial and temporal dimensions. This effectively removes non-uniform lighting flicker that may be caused by explosion-proof lighting fixtures in industrial settings, while also suppressing thermal noise generated by the long-term operation of the image acquisition device. This provides high signal-to-noise ratio underlying data for subsequent calculations.

[0009] Further, calculating the spatial static feature value and optical flow dynamic feature value of each pixel in the grayscale image sequence includes: using an image edge detection operator to calculate the transmittance gradient of each pixel in the grayscale image at the current moment, as the spatial static feature value; constructing an optical flow estimation model to calculate the displacement values ​​of each pixel in the horizontal and vertical directions in two adjacent grayscale images, and then calculating the optical flow dynamic feature value.

[0010] This invention maps image features to specific fluid dynamics and optical data, which not only improves the anti-interference ability of the algorithm under low contrast conditions, but also ensures the interpretability of the algorithm during execution and enhances its adaptability to complex working conditions.

[0011] Further, calculating the global relative kinetic energy value of the grayscale image sequence specifically includes: for each frame of the grayscale image sequence, extracting the displacement values ​​of all pixels in the horizontal direction and the displacement values ​​in the vertical direction, calculating the displacement magnitude, and for all pixels of each frame of the grayscale image, summing the displacement magnitudes in spatial dimensions to obtain the global relative kinetic energy value.

[0012] Furthermore, the acquisition of environmental noise values ​​includes: when the reactor is in a static state, using the image acquisition device to acquire a baseline image sequence; calculating the global relative kinetic energy value of the baseline image sequence and performing statistical analysis to extract the environmental noise value.

[0013] This invention quantitatively extracts environmental noise values ​​by acquiring baseline image sequences when the reactor is in a static state and then calculating the pseudo-displacement integral of each pixel. Based on actual equipment vibration data, the obtained environmental noise values ​​reflect the true physical noise level of the industrial site, providing an objective data benchmark for subsequent calculations.

[0014] Furthermore, the dynamic decay fusion weighting factor satisfies the following relationship:

[0015] in, For indexing time; For a moment The dynamic decay fusion weighting factor; For a moment The global relative kinetic energy value; The environmental noise value; This refers to the highest historical kinetic energy peak value.

[0016] Furthermore, the comprehensive eigenvalues ​​satisfy the following relation:

[0017] in, For indexing time; The index of the x-coordinate of the pixel; The index of the ordinate of the pixel; For a moment ,coordinate The comprehensive feature value of the pixel; For a moment ,coordinate The optical flow dynamic feature value of the pixel; For a moment ,coordinate The spatial static feature value of the pixel; For a moment The dynamic decay fusion weighting factor.

[0018] Further, extracting the interface physical height from the comprehensive feature matrix includes: extracting edge coordinate points in the comprehensive feature matrix where the values ​​change abruptly, fitting and calculating the edge coordinate points to obtain the pixel coordinate system height; and constructing a physical scale mapping model to convert the pixel coordinate system height into the interface physical height.

[0019] Furthermore, the dual steady-state condition includes a first condition and a second condition, wherein the first condition is that the absolute value of the first derivative of the physical height of the interface in the time dimension is less than or equal to the critical settling rate, and the critical settling rate is the ratio of the spatial resolution limit of the image acquisition device to the acquisition time interval; the second condition is that the dynamic attenuation fusion weight factor is equal to 0.

[0020] This invention effectively reduces the probability of misjudgment caused by the slow sinking of the emulsion layer and continuous external vibration by combining dual steady-state conditions with the physical properties of the hardware and a rigorous mathematical truncation mechanism.

[0021] Furthermore, the step of outputting a test report based on the judgment result specifically includes: when the judgment result satisfies the dual steady-state condition, it indicates that a stable state has been reached, and the test report outputs the physical height of the interface, the timestamp of the current moment, and a process permission prompt that allows the material release operation; when the judgment result does not satisfy the dual steady-state condition, it indicates that the dynamic settling stage has been reached, and the test report outputs the settling rate and the remaining settling time, wherein the settling rate is the first derivative of the physical height of the interface.

[0022] The present invention has the following technical effects: This invention combines the extraction process of effective components of Echinacea purpurea and addresses the problems of low light transmittance of Echinacea extract, easy formation of multi-level emulsion zones, and large vibration interference in industrial sites. It constructs a data processing architecture that integrates fluid mechanics and machine vision, solves the problem of the limited recognition of conventional visual inspection technology in low-contrast dark liquids, and ensures the accurate detection of the physical layer interface of Echinacea extract. This invention addresses the conventional design of existing technologies that rely on a fixed ratio to fuse multimodal features. Instead, it uses the unidirectional physical decay law of the fluid's macroscopic kinetic energy as the core control variable to drive the feature weights to switch adaptively and smoothly. This eliminates pseudo-interface interference in the early stage of extraction and settling and ensures a smooth transition in the late stage of extraction and settling, thus guaranteeing the data continuity and logical consistency of the algorithm during the fluid's transition from dynamic to static states. Attached Figure Description

[0023] Figure 1 This is a flowchart of the method for detecting the layered interface of echinacea extract based on image segmentation provided in an embodiment of the present invention; Figure 2 This is a comparison diagram of the anti-interference technology provided by the embodiments of the present invention and the present invention. Detailed Implementation

[0024] This invention provides a method for detecting the extraction layer interface of Echinacea extract based on image segmentation, referring to... Figure 1 This includes steps S1-S4: S1: Data Acquisition and Preprocessing.

[0025] Specifically, an image acquisition device is configured to acquire a continuous image sequence at the sight glass of the reactor. The continuous image sequence is then subjected to color space conversion and smoothing filtering to obtain a grayscale image sequence with a high signal-to-noise ratio.

[0026] To prevent image blurring and overexposure under complex working conditions, this embodiment uses an industrial-grade CMOS monochrome-color compatible camera with a global shutter as the image acquisition device, with a resolution of 1920×1080 pixels and a frame rate of 30 frames per second. Since the sight glass of the reactor is usually made of thickened high borosilicate glass, which easily reflects ambient light, this embodiment uses a megapixel-level low-distortion fixed-focus industrial lens equipped with a polarizing filter, and paired with an explosion-proof cold light source shadowless ring lamp to continuously shoot the sight glass of the reactor to obtain a continuous image sequence.

[0027] Because echinacea extract is rich in pigments and has a very deep brownish-green color, there is a lot of redundant hue data in the RGB color channel. In order to reduce the computational load, the RGB values ​​of each pixel in each color image in the continuous image sequence are extracted. A weighted average method based on the physiological characteristics of human vision is used, and linear superposition calculation is performed according to a fixed weight of gray value equal to 0.299×R+0.587×G+0.114×B to obtain a single-channel grayscale image.

[0028] Next, smoothing filtering is performed on the single-channel grayscale image in both the spatial and temporal dimensions, as follows: For the spatial dimension, this embodiment selects a Gaussian smoothing filter operator with a size of 5×5, and performs convolution traversal calculation on the single-channel grayscale image of each frame. Since the Gaussian filter exhibits the normal distribution characteristics of high center weight and low edge weight, it can effectively smooth out the thermal noise of the image acquisition device itself. For the time dimension, this embodiment uses a cross-frame temporal median filtering algorithm. The AC explosion-proof lighting fixtures in the industrial site have high-frequency flicker, which causes the acquired single-channel grayscale image to flicker with alternating brightness and darkness on the time axis. By extracting the grayscale values ​​of pixels at the same coordinate position in five consecutive frames of single-channel grayscale images, sorting them by size and taking the median, the grayscale value of the pixel in the current frame is used.

[0029] Ultimately, a grayscale image sequence with high signal-to-noise ratio, uniform illumination, and no motion blur was obtained.

[0030] It should be noted that the specific selection of the image acquisition device and the algorithm used in the preprocessing stage mentioned above are only a preferred embodiment of the present invention. In practical applications, the image acquisition device can be equivalently replaced with a CCD camera, near-infrared vision sensor, or other devices, depending on the size of the sight glass of the reactor, the ambient lighting conditions of the industrial site, and the underlying computing power configuration of the industrial control computer. Furthermore, the image resolution, acquisition frame rate, and hyperparameters of the smoothing filtering algorithm can be adaptively adjusted. All hardware replacements or algorithm adjustments based on the same logical rules are included within the protection scope of the present invention.

[0031] S2: Feature extraction and global relative kinetic energy calculation.

[0032] Specifically, based on the grayscale image sequence obtained in S1, the spatial static feature value and optical flow dynamic feature value of each pixel are calculated, and the global relative kinetic energy value of each grayscale image in the grayscale image sequence is calculated.

[0033] Because the extract of Echinacea purpurea is a very deep brownish-green with extremely low light transmittance, using the original grayscale values ​​to find the layer lines is easily affected by slight fluctuations in illumination. Therefore, this embodiment uses the Sobel edge detection operator. For the grayscale image of a single frame at the current moment, a 3×3 horizontal convolution kernel and a 3×3 vertical convolution kernel are defined. Through a double loop, each pixel is traversed, and the grayscale values ​​of the two convolution kernels are multiplied and summed one by one with the grayscale values ​​of the pixel and its eight neighboring pixels. This yields the partial derivatives of the pixel in the horizontal and vertical directions. These two partial derivatives represent two mutually orthogonal direction vectors. The sum of their squares and modulo operations are then performed to obtain the spatial static feature value of the pixel, denoted as . ,in, For time, , represents the x and y coordinates of the pixel.

[0034] During the initial and middle stages of extraction and settling, significant tumbling and settling motions occur within the liquid. Relying solely on spatial static characteristic values ​​can easily lead to misinterpretations of minute stains and low-transmittance emulsion zones on the inner wall of the reactor's sight glass as layering interfaces. Therefore, it is necessary to construct an optical flow estimation model. Based on the grayscale images of the current and previous frames, the motion of each pixel is analyzed, as follows: Because S1 uses an explosion-proof cold light source shadowless ring lamp for continuous illumination, and the image acquisition device has a frame rate of 30 frames per second, within an extremely short exposure interval, the same tiny fluid particle suspended in the dark brownish-green echinacea extract does not undergo abrupt changes in its light transmittance or the illumination conditions it receives. According to the paper "An Iterative Image Registration Technique with an Application to Stereo Vision" published at IJCAI, in continuous image processing, the grayscale value and transmittance of the same fluid particle remain unchanged within an extremely short exposure time. For any pixel in the grayscale image, its horizontal and vertical displacements satisfy the basic optical flow constraint equations: ,in, and These are the gray-level differences of the pixel in the horizontal and vertical image space, respectively, obtained by subtracting the gray-level values ​​of the adjacent pixels to the right and directly below the pixel. This is the temporal grayscale difference of a pixel between two adjacent frames, obtained by subtracting the grayscale value of the pixel at the same coordinate position in the previous frame from the current grayscale value. and These are the horizontal and vertical displacements of the pixel, respectively. Because echinacea extract is rich in macromolecular polysaccharides, it exhibits significant fluid viscosity and cohesion. Fluid particles within adjacent micro-regions maintain coordinated motion within a very short time. Therefore, based on the spatial uniformity assumption—that fluid particles within adjacent micro-regions move at the same speed—for any pixel in a grayscale image, denoted as the target pixel, a 3×3 local spatial neighborhood is established centered on the target pixel. Substituting the nine pixels within this local spatial neighborhood into the basic optical flow equation yields a system of nine linear equations, which can then be transformed into matrix form: ,in, It is a 9×2 matrix containing the gray-level differences of these 9 pixels in the horizontal and vertical image space. It is a 9×1 column vector containing the temporal grayscale difference of these 9 pixels between two adjacent frames; Matrix inversion using the least squares method This yields the horizontal and vertical displacement values ​​of the target pixel.

[0035] Since the sedimentation of echinacea extract is a unidirectional, irreversible thermodynamic process that gradually transitions from initial violent turbulence to a stagnant state, in order to assess the degree of sedimentation in real time and adaptively adjust the fusion ratio of static and dynamic characteristics, it is necessary to calculate the global relative kinetic energy value, as follows: For a single frame of grayscale image at the current moment, extract the horizontal and vertical displacement values ​​corresponding to each pixel within its width and height range. Calculate the square root of the sum of the squares of the horizontal and vertical displacement values ​​corresponding to each pixel to obtain the displacement modulus of that pixel, which is used as the dynamic optical flow feature value of that pixel. Then, perform spatial accumulation calculation on the displacement moduli of pixels at all coordinate positions in the grayscale image of that frame to obtain the global relative kinetic energy value at the current moment.

[0036] Next, a dedicated non-volatile register space is set up in the controller's memory as an extreme value comparator with the highest priority. During the entire settling cycle of a single echinacea extract, the extreme value comparator compares the calculated global relative kinetic energy value of each frame with the stored maximum value. If it is greater than the maximum value, a hardware overwrite instruction is triggered to update it to the global relative kinetic energy value of the current frame, which is recorded as the historical highest kinetic energy peak value.

[0037] In industrial settings, the continuous operation of equipment such as large compressors, centrifuges, and agitators generates persistent, high-frequency, minute vibrations in image acquisition devices. These vibrations cause continuous pseudo-displacement of pixels in the acquired grayscale images. Therefore, it is necessary to obtain environmental noise values ​​to avoid inaccurate data collection. Specifically: When the reactor is in a static state, i.e., no feed is being introduced or the liquid inside is stagnant, the same image acquisition device and preprocessing steps as in S1 are used to acquire a one-minute grayscale image sequence, which is recorded as the baseline image sequence. The global relative kinetic energy value of each frame of the grayscale image in the baseline image sequence is calculated, and these are combined into a dataset. The mean and standard deviation of this dataset are calculated, and a probability density distribution curve is fitted. Based on the statistical principle of 3... The criterion is to extract the extreme value corresponding to the upper probability limit of 99.7% in the probability density distribution curve, and use it as the environmental noise value, denoted as . .

[0038] S3: Weight construction and feature fusion.

[0039] Specifically, the dynamic attenuation fusion weighting factor is calculated using the global relative kinetic energy value, the historical highest kinetic energy peak value, and the environmental noise value obtained in S2. Using the dynamic attenuation fusion weighting factor, the spatial static feature value and the optical flow dynamic feature value of each pixel are fused to obtain the comprehensive feature value of the pixel.

[0040] Since the sedimentation of echinacea extract is a unidirectional, irreversible process from vigorous motion to a gradual stagnant state, when sedimentation reaches its final stage, the macroscopic fluid motion ceases, and the dynamic characteristic value of optical flow approaches 0. Therefore, it is necessary to calculate the dynamic attenuation fusion weighting factor based on the sedimentation progress and dynamically adjust the fusion weights of the spatial static characteristic value and the dynamic characteristic value of optical flow. The specific relationship is as follows:

[0041] in, For indexing time; For a moment The dynamic attenuation fusion weighting factor, due to the unidirectional damped attenuation of the fluid, therefore It will gradually decrease as settlement progresses; For a moment The global relative kinetic energy value; This refers to the ambient noise level. This represents the highest historical kinetic energy peak, and the initial moment. up to the current moment The largest global relative kinetic energy value; The term represents the effective fluid kinetic energy at the current moment; The term represents the maximum effective fluid kinetic energy during the entire settling cycle.

[0042] To prevent the echinacea extract from entering a stagnant state... Below This can lead to a negative numerator, causing range overflow in subsequent calculations. Therefore, a lower limit truncation logic instruction needs to be set. When, trigger the Boolean switch, causing .

[0043] After obtaining the macroscopic dynamic attenuation fusion weight factor, it needs to be applied to each pixel. In the early stage of settling, the rolling displacement of fluid particles is used to filter static dirt. In the late stage of settling, the transmittance gradient is used to determine the layer interface. As pointed out in the paper "Video Instance Segmentation with Temporal Feature Fusion" published in the Journal of Image and Graphics, when it is necessary to locate a target in a complex background, the kinematic parameters of the target in the temporal dimension and the optical parameters in the spatial dimension can be extracted and used as multi-source evidence for joint calculation. Based on this, this embodiment combines a dynamic attenuation fusion weight factor to calculate the comprehensive feature value of the pixel, and the specific relationship is as follows:

[0044] in, For indexing time; The index of the pixel's x-coordinate; The index of the pixel's ordinate; For a moment ,coordinate The comprehensive feature value of each pixel; For a moment ,coordinate The dynamic optical flow feature value of the pixel; For a moment ,coordinate The spatial static feature values ​​of pixels; For a moment The dynamic decay fusion weighting factor.

[0045] Next, for each pixel in the grayscale image at the current moment, its corresponding comprehensive feature value is extracted, and a comprehensive feature matrix is ​​constructed according to the coordinate position of each pixel for subsequent detection and judgment.

[0046] It should be noted that, considering the possible difference in absolute value between the dynamic eigenvalues ​​and the static eigenvalues ​​of optical flow in the matrix, this embodiment performs maximum-minimum normalization before calculating the comprehensive eigenvalues ​​to eliminate computational bias.

[0047] S4: Condition judgment and result output.

[0048] Specifically, a dual steady-state condition is preset, and a judgment is made based on the comprehensive feature matrix obtained in S3. A detection report is then output based on the judgment result.

[0049] In the comprehensive feature matrix, a column-by-column scan is performed along the vertical direction. Since the layered interface is represented as the extreme value band of the comprehensive feature value in the matrix, the edge coordinate points where the values ​​change abruptly in the comprehensive feature matrix are extracted by the local nonmaximum suppression algorithm, that is, the sub-pixel level coordinate positions. For a series of extracted discrete edge coordinate points, the least squares method is used to perform line fitting calculation, and the vertical pixel coordinate center point of the extracted line is defined as the pixel coordinate system height. Then, a physical scale mapping model is constructed, and the camera intrinsic parameter conversion ratio calculated by the high-precision calibration plate is used. In this embodiment, 1 pixel = 0.5 mm is taken, and the pixel coordinate system height is converted into the interface physical height.

[0050] Due to significant batch-to-batch variations in echinacea extract and the slow settling of the emulsion layer, a dual steady-state condition was pre-set to determine the fluctuation range of the interface physical height and the dynamic attenuation fusion weighting factor, as detailed below: When the surface movement speed of the echinacea extract is too slow, and even the smallest photosensitive unit of the image acquisition device cannot capture it, the echinacea extract is considered to be completely stationary on a macroscopic scale. Based on this, the first derivative of the physical height of the interface at the current moment in the time dimension is calculated, which is the current settling rate. The first condition in the dual steady-state condition is verified, and it is determined that the absolute value of the first derivative is less than or equal to the critical settling rate, which is the ratio of the spatial resolution limit of the image acquisition device to the acquisition time interval between two adjacent grayscale images. When the global relative kinetic energy is less than or equal to the environmental noise value, it means that the fluid particles have stopped tumbling. Based on this, the second condition of the dual steady-state condition is set, and the dynamic attenuation fusion weight factor is determined to be equal to 0.

[0051] When the judgment result is that the dual steady-state conditions are met, it means that a steady state has been reached. The physical height of the interface and the timestamp of the current moment are output in the test report. A process permission prompt for executing the material feeding operation with the highest priority is issued in the form of a pop-up window in the configuration software. When the judgment result indicates that the dual steady-state condition is not met, it means that the process is in the dynamic settlement stage. The settlement rate is output in the test report, and the remaining settlement time is calculated in combination with the physical height of the interface to help the operator grasp the process progress.

[0052] Figure 2This is a comparison diagram of the anti-interference capabilities of the prior art and the present invention provided in the embodiments of the present invention. It can be seen that as the environmental noise level increases, the detection accuracy of the prior art continuously decreases, while the present invention, although also slowly decreasing, maintains a relatively high detection accuracy, demonstrating superior robustness.

Claims

1. A method for detecting the layered interface of echinacea extract based on image segmentation, characterized in that, include: An image acquisition device is configured to acquire a continuous image sequence at the sight glass of the reactor. The continuous image sequence is preprocessed to obtain a grayscale image sequence, which contains multiple frames of grayscale images. The spatial static feature value and optical flow dynamic feature value of each pixel in the grayscale image sequence are calculated, including: using an image edge detection operator to calculate the transmittance gradient of each pixel in the grayscale image at the current moment, as the spatial static feature value; constructing an optical flow estimation model to calculate the displacement values ​​of each pixel in the horizontal and vertical directions in two adjacent grayscale images, and then calculating the optical flow dynamic feature value. Calculate the global relative kinetic energy value of the grayscale image sequence, and obtain the environmental noise value and the historical highest kinetic energy peak value; based on the environmental noise value, the historical highest kinetic energy peak value, and the global relative kinetic energy value, calculate the dynamic attenuation fusion weight factor; the dynamic attenuation fusion weight factor satisfies the following relationship: ;in, For indexing time; For a moment The dynamic decay fusion weighting factor; For a moment The global relative kinetic energy value; The environmental noise value; This refers to the highest historical kinetic energy peak value; Based on the dynamic attenuation fusion weight factor, the spatial static feature value and the optical flow dynamic feature value of each pixel are fused and calculated to obtain the comprehensive feature value of each pixel. The comprehensive feature value is then traversed and reorganized to obtain the comprehensive feature matrix. The interface physical height of the comprehensive feature matrix is ​​extracted, and a dual steady-state condition is preset. Based on the dual steady-state condition, the fluctuation range of the interface physical height and the dynamic attenuation fusion weight factor are determined, and a detection report is output according to the determination result.

2. The method for detecting the layered interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, The preprocessing includes: converting the continuous image sequence into a single-channel grayscale image; and performing smoothing filtering on the single-channel grayscale image in both the spatial and temporal dimensions to obtain the grayscale image sequence.

3. The method for detecting the layered interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, Calculating the global relative kinetic energy value of the grayscale image sequence specifically includes: for each frame of the grayscale image sequence, extracting the displacement values ​​of all pixels in the horizontal direction and the displacement values ​​in the vertical direction, calculating the displacement magnitude, and for all pixels of each frame of the grayscale image, summing the displacement magnitudes in spatial dimensions to obtain the global relative kinetic energy value.

4. The method for detecting the extraction layer interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, The process of obtaining the environmental noise value includes: acquiring a baseline image sequence using the image acquisition device when the reactor is in a static state; calculating the global relative kinetic energy value of the baseline image sequence and performing statistical analysis to extract the environmental noise value.

5. The method for detecting the extraction layer interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, The comprehensive eigenvalues ​​satisfy the following relationship: in, For indexing time; The index of the x-coordinate of the pixel; The index of the ordinate of the pixel; For a moment ,coordinate The comprehensive feature value of the pixel; For a moment ,coordinate The optical flow dynamic feature value of the pixel; For a moment ,coordinate The spatial static feature value of the pixel; For a moment The dynamic decay fusion weighting factor.

6. The method for detecting the layered interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, Extracting the interface physical height from the comprehensive feature matrix includes: extracting edge coordinate points in the comprehensive feature matrix where the values ​​change abruptly; fitting and calculating the edge coordinate points to obtain the pixel coordinate system height; and constructing a physical scale mapping model to convert the pixel coordinate system height into the interface physical height.

7. The method for detecting the layered interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, The dual steady-state conditions include a first condition and a second condition. The first condition is that the absolute value of the first derivative of the physical height of the interface in the time dimension is less than or equal to the critical settling rate, which is the ratio of the spatial resolution limit of the image acquisition device to the acquisition time interval. The second condition is that the dynamic attenuation fusion weight factor is equal to 0.

8. The method for detecting the extraction layer interface of Echinacea extract based on image segmentation according to claim 1, characterized in that, The step of outputting a test report based on the judgment result specifically includes: when the judgment result satisfies the dual steady-state condition, it indicates that a stable state has been reached, and the test report outputs the physical height of the interface, the timestamp of the current moment, and a process permission prompt that allows the material release operation; when the judgment result does not satisfy the dual steady-state condition, it indicates that the dynamic settlement stage is in progress, and the test report outputs the settlement rate and the remaining settlement time, wherein the settlement rate is the first derivative of the physical height of the interface.

Citation Information

Patent Citations

  • Method and device for detecting liquid level of PET bottle based on machine vision

    CN106052792A

  • Video Human Behavior Recognition Method Based on Significant Trajectory and Spatiotemporal Evolution Information

    CN106529477B

  • Cloud-based security control method and system

    CN115953740A

  • Real-time image monitoring method and system for yucca extract separation process

    CN121095238A