Visual traditional Chinese medicine volatile oil extraction end point judgment method and device

By using visual determination methods and devices during the extraction of volatile oil of traditional Chinese medicine, the diameter of oil beads is monitored and analyzed in real time, and the problem of insufficient manual and automation dependence on endpoint judgment in the prior art is solved, and efficient and accurate extraction endpoint judgment and product consistency are achieved.

CN119540931AActive Publication Date: 2025-02-28JIANGXI UNIVERSITY OF TRADITIONAL CHINESE MEDICINE +1

Patent Information

Application Number
CN202411589591.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-28
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

The prior art has problems such as relying on manual judgment, insufficient automation, weak real-time monitoring capabilities and complex and expensive equipment in the endpoint determination of volatile oil extraction of traditional Chinese medicine, resulting in limitations in the efficiency and quality control of the extraction process.

Method used

Using a method and device for determining the end point of extraction of volatile oil of traditional Chinese medicine, real-time image data of oil and water mixture is obtained through industrial cameras, image preprocessing and visual analysis are performed, oil bead diameter is measured in real time, and extraction end point is automatically determined based on the preset diameter threshold.

Benefits of technology

Real-time monitoring and accurate judgment of oil bead diameter changes is achieved, which significantly reduces misjudgment and missed inspections, improves extraction efficiency and product consistency, and reduces system maintenance and adjustment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540931A_ABST
    Figure CN119540931A_ABST
Patent Text Reader

Abstract

The invention discloses a visual traditional Chinese medicine volatile oil extraction end point determination method and device. The method comprises the following steps: S1, forming an oil droplet image data set; s2, inputting the oil droplet image data set into an image processing unit for image preprocessing; s3, analyzing the preprocessed oil droplet image through a visual analysis system, extracting the contour of the oil droplet by using an image segmentation algorithm, and measuring the diameter of the oil droplet in real time; s4, setting corresponding oil droplet diameter judgment standards according to volatile oil extraction characteristics of different traditional Chinese medicinal materials; when the diameter of the oil droplets reaches a preset value, determining that the volatile oil extraction process is finished, and automatically sending an extraction end point signal; s5, the system automatically stops the extraction process according to the extraction end point signal and records oil droplet diameter data and related parameters in the extraction process; and S6, continuously monitoring the diameter change of the oil droplets by the system through a real-time monitoring function, and automatically judging an extraction end point through a preset diameter threshold value. According to the invention, real-time monitoring and accurate determination of the diameter change of the oil droplets are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of traditional Chinese medicine, and in particular to a visual method and device for determining the end point of extraction of volatile oil of traditional Chinese medicine. Background Art

[0002] With the continuous development of the pharmaceutical industry, Chinese herbal volatile oils have gradually become the focus of research and production due to their unique pharmacological effects and wide application value. The extraction endpoint needs to be precisely controlled during the extraction of volatile oils to ensure the stability of product quality and efficacy. However, in traditional extraction processes, endpoint judgment mainly relies on manual experience and simple sampling analysis, which is difficult to meet the needs of modern pharmaceutical production for continuous and precise control.

[0003] At present, the extraction process of Chinese herbal volatile oil usually adopts temperature control and pressure monitoring parameters as the basis for extraction control, and relies on the operator's experience to decide whether the extraction is completed. Although process control is achieved to a certain extent, there is a great deal of subjectivity and uncertainty. In order to improve production efficiency and product consistency, some modern pharmaceutical factories have begun to introduce process analysis technology and continuous manufacturing concepts. PAT technology monitors the production process through sensors and data analysis to achieve a certain degree of automation. Traditional PAT systems mainly rely on spectral analysis to detect material changes, and the hardware equipment is expensive, the data analysis is complex, and the requirements for the on-site environment are high, which limits the promotion of these technologies in the extraction endpoint control of Chinese herbal volatile oil.

[0004] In summary, the existing technology has significant deficiencies in the endpoint determination of volatile oil extraction from traditional Chinese medicine, which are mainly reflected in the reliance on manual judgment, insufficient automation, weak real-time monitoring capabilities, and complex and expensive equipment. The above-mentioned defects lead to certain limitations in the efficiency and quality control in the volatile oil extraction process. A new method and device are urgently needed to achieve accurate determination of the endpoint of volatile oil extraction and process optimization. Summary of the invention

[0005] One purpose of the present invention is to provide a visual method and device for determining the endpoint of extraction of volatile oil from traditional Chinese medicine. The present invention realizes real-time monitoring and accurate determination of changes in oil droplet diameter.

[0006] A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine according to an embodiment of the present invention comprises the following steps:

[0007] S1, obtaining real-time image data of oil-water mixture through an industrial camera installed on a glass sight column to form an oil droplet image data set;

[0008] S2, inputting the oil droplet image data set into the image processing unit for image preprocessing, including color space conversion, denoising, contrast enhancement and edge detection;

[0009] S3, analyzing the pre-processed oil droplet image through a visual analysis system, extracting the oil droplet contour using an image segmentation algorithm, and measuring the oil droplet diameter in real time;

[0010] S4. According to the volatile oil extraction characteristics of different Chinese medicinal materials, the corresponding oil droplet diameter determination standard is set. When the oil droplet diameter reaches the preset value, the volatile oil extraction process is determined to be completed, and an extraction endpoint signal is automatically issued;

[0011] S5. The system automatically stops the extraction process according to the extraction endpoint signal and records the oil droplet diameter data and related parameters during the extraction process;

[0012] S6. The system continuously monitors the changes in oil droplet diameter through real-time monitoring function, and automatically determines the extraction endpoint through the preset diameter threshold.

[0013] Optionally, S1 includes the following steps:

[0014] S11. Install an industrial camera on the glass sight column and select a stable viewing angle that is not affected by vibration. Use the industrial camera fixing structure to position the industrial camera at a distance h from the surface of the oil-water mixture and set the camera resolution to R. img ;

[0015] S12, placing the oil-water mixture in a transparent sight column to mix the oil droplets with the water, at different time points t during the mixing process i Collect oil droplet images, where t i Indicates the time of the i-th collection, and the collection frequency is set to f s ;

[0016] S13, using an industrial camera to obtain RGB channel data of the oil droplet image, and representing each frame of the oil droplet image as a three-dimensional matrix I (x, y, c), where x and y are pixel coordinates, and c represents red, green, and blue channels;

[0017] S14. Time-sequencing the continuously collected oil droplet images to construct a preliminary oil droplet image dataset:

[0018] D raw = {I t |t=t1,t2,…,t n};

[0019] Among them, I t represents the oil droplet image collected at the tth time point, and n is the total number of oil droplet images collected;

[0020] S15, through the camera internal parameter matrix K and external parameter matrix [R|T], the three-dimensional space point P in the visual column w (X w ,Y w ,Zw ) is mapped to a two-dimensional point P on the oil droplet image plane i (u,v):

[0021]

[0022] Among them, K represents the camera internal parameter matrix, [R|T] represents the external parameter matrix, (X w ,Y w ,Z w ) is the spatial point coordinate, (u,v) is the plane coordinate of the oil droplet image;

[0023] S16. Setting oil droplet image quality threshold Q th , only when the oil droplet image I t The signal-to-noise ratio meets SNR(I t )≥Q th When , the oil droplet image is retained and entered into the oil droplet image dataset;

[0024] S17, the final generated oil droplet image dataset D final Contains all valid oil droplet images after filtering:

[0025]

[0026] Among them, D final represents the oil droplet image dataset, which contains all valid oil droplet images that meet the signal-to-noise ratio requirements under the image quality screening condition. t represents the oil droplet image collected at time point t, recording the visible morphology of the oil droplets at that moment, m×n represents the pixel size of each image, and represents the resolution of the image in the x and y directions respectively, SNR(I t ) represents image I t The signal-to-noise ratio is an indicator of image quality. Represents image I t The average pixel intensity is used to calculate the deviation of each pixel from the average value, Q th Indicates the image quality threshold, which is set as the lower limit of the signal-to-noise ratio for the system to determine whether to retain the image. t )≥Q th When the image SNR(I t )≥Q th It is considered valid and added to the oil droplet image dataset D final .

[0027] Optionally, S2 includes the following steps:

[0028] S21. Oil droplet image dataset D final Perform color space conversion to obtain the RGB channel oil droplet image I of the characteristics of Chinese medicine volatile oilt (x, y, c) performs YCbCr color space conversion to optimize the impact of lighting changes on analysis:

[0029] Y=0.2627·R+0.6780·G+0.0593·B,

[0030] Cb=128-0.148·R-0.291·G+0.439·B,;

[0031] Cr=128+0.439·R-0.368·G-0.071·B,

[0032] Among them, R, G, and B are the intensity values ​​of the pixels in the RGB channels, Y is the brightness component, which is used to highlight the reflection characteristics of the volatile oil, and the Cb and Cr components are used to distinguish the color information of the oil droplets from the background water phase;

[0033] S22, the converted oil droplet image I t ′ (x,y) is subjected to Gaussian filtering and denoising, and the filtered oil droplet image is expressed as:

[0034]

[0035] Among them, σ is the standard deviation of the Gaussian distribution, and k is the size of the filter window, which is used to control the filter strength;

[0036] S23, the denoised oil droplet image I t ″ (x,y) is histogram equalized to make the edge of the oil droplets clearer:

[0037]

[0038] Where L is the maximum value of the gray level, h(i) is the number of pixels with gray value i, and m×n represents the pixel size of each image;

[0039] S24, using the Canny edge detection algorithm to perform edge detection on the oil droplet image after contrast enhancement, extracting the edge contour of the oil droplet by calculating the gradient change of the image, and defining the gradient G as:

[0040]

[0041] Among them, G x and G y is the gradient of the oil droplet image in the x and y directions, calculated by the Sobel operator respectively:

[0042]

[0043] Among them, the symbol * represents the convolution operation;

[0044] S25, the oil droplet image data after edge detection Save and update the oil droplet image dataset:

[0045]

[0046] Optionally, S3 includes the following steps:

[0047] S31, the pre-processed oil droplet image data Input the visual analysis system, perform preliminary segmentation of oil droplets and background using the Otsu threshold method, and calculate the adaptive threshold T to minimize the intra-class variance:

[0048]

[0049] Among them, ω1(T) and ω2(T) are the proportions of the two types of pixels under the threshold T. and is the variance of the two types of pixels;

[0050] S32, perform morphological processing on the segmented binary oil droplet image, using an open operation Remove noise:

[0051]

[0052] in, represents the opening operation, is the erosion operation, ⊕ is the dilation operation, and B is the structural element, which is used to eliminate small noise points and oil droplet contours with broken connections;

[0053] S33, extracting the contour point set of the oil droplet by contour detection algorithm {P j (u,v)|j=1,2,…,N i}, where N i Oil droplet image The number of oil droplets detected in the image, and the outline of each oil droplet is represented by a set of two-dimensional pixel coordinates (u, v);

[0054] S34. Calculate the minimum enclosing circle radius r of the oil droplet j As a basis for the oil droplet diameter:

[0055]

[0056] in, is the coordinate of the center point of the jth oil droplet, (u k ,v k ) is any point on the contour of the oil droplet;

[0057] S35. Calculate the diameter d of the oil droplet j:

[0058] d j =2·r j ;

[0059] Among them, d j It represents the diameter of the jth oil droplet and is used to determine whether the volatile oil extraction process has reached the end point.

[0060] Optionally, S4 includes the following steps:

[0061] S41. The system sets a specific endpoint oil droplet diameter threshold d for each volatile oil based on the volatile oil extraction characteristics of different Chinese medicinal materials. th,k ;

[0062] S42, the system will measure the oil droplet diameter d in real time j (t) and the endpoint diameter threshold d of the corresponding variety th,k Compare to determine whether the preset extraction endpoint standard is reached:

[0063] d j (t)≥d th,k ;

[0064] Among them, d j (t) represents the measured diameter of the jth oil droplet at time t;

[0065] S43. When it is detected that the diameters of all oil droplets meet the corresponding endpoint threshold:

[0066]

[0067] The system determines that the extraction process is complete and immediately sends out an extraction end signal S end ;

[0068] S44, the system automatically sends the endpoint signal S end Send to the control unit, stop the extraction process, and record the corresponding time t end and all relevant parameters d j (t end )Enter the database:

[0069] Record = {d j (t end )|j=1,2,…,N i}.

[0070] Optionally, S6 includes the following steps:

[0071] S61, the system obtains the continuous time t∈[t0,t end ] Oil droplet diameter change data D diameter ={dj (t)|j=1,2,…,N i ; t=t1,t2,…,t n}, used to analyze the dynamic change trend of oil droplet diameter in real time;

[0072] S62, the system for each time point t i The oil droplet diameter is calculated by difference, and the oil droplet diameter change rate v is defined j (t i )for:

[0073]

[0074] Among them, d j (t i ) and d j (t i-1 ) represent the jth oil droplet at time t i and t i-1 The diameter at time, v j (t i ) represents the rate of change of the diameter of the oil droplet during the time interval;

[0075] S63, the system calculates the diameter change rate according to the preset diameter change rate threshold v th Monitor the stability of the oil droplet diameter when the rate of change of all oil droplets meets the following conditions:

[0076]

[0077] The system determines that the oil droplet diameter tends to be stable and enters the endpoint detection state;

[0078] S64, the system is in the endpoint detection state, according to the endpoint diameter threshold d th,k Determine whether the extraction endpoint is reached when the following conditions are met:

[0079]

[0080] The system automatically sends out the extraction end signal S end ;

[0081] S65, the system will extract the end time t end And the oil droplet diameter data d at the corresponding time j (t end ) are stored in the database for process recording and quality tracking:

[0082] Record end ={d j (t end )|j=1,2,…,N i};

[0083] S66. If the diameter change rate of a certain oil droplet is found to exceed the threshold value during continuous monitoring:

[0084]

[0085] The system will automatically send out an abnormal warning signal S alert , prompting the operator to check or adjust parameters of the extraction process;

[0086] S67, extracting the endpoint signal S end After being sent, the system automatically stops the extraction process and archives all monitoring data.

[0087] A visual Chinese medicine volatile oil extraction endpoint determination device, comprising the following devices:

[0088] The industrial camera module is installed on the glass sight column and is used to collect real-time images of the RGB channels of oil droplets in the oil-water mixture at a set distance to generate a time series oil droplet image dataset;

[0089] The image preprocessing module receives the original oil droplet image data set collected by the industrial camera, performs color space conversion, denoising, contrast enhancement and edge detection, and forms a preprocessed oil droplet image data set;

[0090] The visual analysis system module is used to analyze the preprocessed oil droplet image data set, extract the outline of the oil droplet through the image segmentation algorithm, calculate the diameter of the oil droplet, and generate the oil droplet diameter data set;

[0091] The judgment standard module sets the corresponding oil droplet diameter judgment standard according to the volatile oil extraction characteristics of different Chinese medicinal materials, and stores the thresholds of different varieties in the threshold set;

[0092] The real-time monitoring module continuously monitors the changes in the diameter of the oil droplets, and determines whether it has reached a stable state by analyzing the change trend of the oil droplet diameter, and determines whether endpoint detection is required;

[0093] End point determination module: when the diameters of all oil droplets reach the corresponding preset threshold and the change trend is stable, the system automatically sends out an extraction end point signal;

[0094] Abnormal reminder module: during the monitoring process, if the changes of some oil droplets are found to be beyond the normal range, the system will automatically send out abnormal reminder signals to prompt the operator to check or adjust the extraction process;

[0095] The control and data recording module controls the extraction process to stop after receiving the extraction endpoint signal, and records the extraction endpoint time and all monitoring data into the database for subsequent quality tracking and process review;

[0096] The human-computer interaction interface displays real-time monitoring data and judgment results through a visual interface, allowing operators to view the changing trend and endpoint status of the oil droplet diameter, and provides abnormal processing prompts.

[0097] The beneficial effects of the present invention are:

[0098] (1) The present invention uses a variety of image processing algorithms such as color space conversion, Canny edge detection and Otsu threshold segmentation to convert RGB images into YCbCr space, thereby optimizing the impact of illumination changes on image quality. In the image segmentation process, morphological opening operations and Otsu threshold method are used to ensure the clear separation of oil droplets from the background water phase, thereby avoiding the problem of missed detection of small oil droplets in complex backgrounds by traditional algorithms. Experiments show that after the above improvements, the accuracy of oil droplet contour extraction in the present invention is improved by more than 12%, significantly reducing misjudgments and missed detections.

[0099] (2) The present invention introduces real-time calculation of the rate of change of oil droplet diameter in the monitoring module, and determines whether the oil droplets tend to be stable by setting a rate threshold. Compared with the traditional single time point judgment method, the present invention uses time series analysis to capture the dynamic change trend of the oil droplet diameter and triggers endpoint detection when the oil droplet diameter changes stably, effectively avoiding the problem of early or delayed endpoint judgment. Experimental data show that the endpoint judgment error of the present invention under complex extraction conditions is reduced by 18%, thereby improving extraction efficiency and product consistency.

[0100] (3) The present invention adopts a modular design, and independently configures the industrial camera, image preprocessing, visual analysis and endpoint determination modules, allowing users to freely combine and adjust the detection modules according to the characteristics of different Chinese medicinal materials. Compared with the traditional expensive spectral analysis system, the system of the present invention has a simple structure, low cost and easy maintenance. By seamlessly integrating visual analysis with the control system, automated closed-loop control is achieved, reducing the risks of manual intervention and misoperation. Experimental results show that the modular design of the present invention improves production efficiency by more than 15% and reduces the maintenance and adjustment costs of the system by about 20%. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention:

[0102] Figure 1 This is a flow chart of a visualized method and device for determining the endpoint of extraction of volatile oil from traditional Chinese medicine proposed by the present invention;

[0103] Figure 2 The present invention provides a hardware connection diagram of each module of a visual method and device for determining the endpoint of extraction of volatile oil from traditional Chinese medicine. DETAILED DESCRIPTION

[0104] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0105] Example 1: Reference Figure 1-Figure 2 A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine comprises the following steps:

[0106] S1, obtaining real-time image data of oil-water mixture through an industrial camera installed on a glass sight column to form an oil droplet image data set;

[0107] S2, inputting the oil droplet image data set into the image processing unit for image preprocessing, including color space conversion, denoising, contrast enhancement and edge detection;

[0108] S3, analyzing the pre-processed oil droplet image through a visual analysis system, extracting the oil droplet contour using an image segmentation algorithm, and measuring the oil droplet diameter in real time;

[0109] S4. According to the volatile oil extraction characteristics of different Chinese medicinal materials, the corresponding oil droplet diameter determination standard is set. When the oil droplet diameter reaches the preset value, the volatile oil extraction process is determined to be completed, and an extraction endpoint signal is automatically issued;

[0110] S5. The system automatically stops the extraction process according to the extraction endpoint signal and records the oil droplet diameter data and related parameters during the extraction process;

[0111] S6. The system continuously monitors the changes in oil droplet diameter through real-time monitoring function, and automatically determines the extraction endpoint through the preset diameter threshold.

[0112] In this implementation, S1 includes the following steps:

[0113] S11. Install an industrial camera on the glass sight column and select a stable viewing angle that is not affected by vibration. Use the industrial camera fixing structure to position the industrial camera at a distance h from the surface of the oil-water mixture and set the camera resolution to R. img ;

[0114] S12, placing the oil-water mixture in a transparent sight column to mix the oil droplets with the water, at different time points t during the mixing process i Collect oil droplet images, where t i Indicates the time of the i-th collection, and the collection frequency is set to f s ;

[0115] S13, using an industrial camera to obtain RGB channel data of the oil droplet image, and representing each frame of the oil droplet image as a three-dimensional matrix I (x, y, c), where x and y are pixel coordinates, and c represents red, green, and blue channels;

[0116] S14. Time-sequencing the continuously collected oil droplet images to construct a preliminary oil droplet image dataset:

[0117] D raw = {I t |t=t1,t2,…,t n};

[0118] Among them, I t represents the oil droplet image collected at the tth time point, and n is the total number of oil droplet images collected;

[0119] S15, through the camera internal parameter matrix K and external parameter matrix [R|T], the three-dimensional space point P in the visual column w (X w ,Y w ,Z w ) is mapped to a two-dimensional point P on the oil droplet image plane i (u,v):

[0120]

[0121] Among them, K represents the camera internal parameter matrix, [R|T] represents the external parameter matrix, (X w ,Y w ,Z w ) is the spatial point coordinate, (u,v) is the plane coordinate of the oil droplet image;

[0122] S16. Setting oil droplet image quality threshold Q th , only when the oil droplet image I t The signal-to-noise ratio meets SNR(I t )≥Q th When , the oil droplet image is retained and entered into the oil droplet image dataset;

[0123] S17, the final generated oil droplet image dataset D final Contains all valid oil droplet images after filtering:

[0124]

[0125] Among them, D final represents the oil droplet image dataset, which contains all valid oil droplet images that meet the signal-to-noise ratio requirements under the image quality screening condition. trepresents the oil droplet image collected at time point t, recording the visible morphology of the oil droplets at that moment, m×n represents the pixel size of each image, and represents the resolution of the image in the x and y directions respectively, SNR(I t ) represents image I t The signal-to-noise ratio is an indicator of image quality. Represents image I t The average pixel intensity is used to calculate the deviation of each pixel from the average value, Q th Indicates the image quality threshold, which is set as the lower limit of the signal-to-noise ratio for the system to determine whether to retain the image. t )≥Q th When the image SNR(I t )≥Q th It is considered valid and added to the oil droplet image dataset D final .

[0126] In this implementation, S2 includes the following steps:

[0127] S21. Oil droplet image dataset D final Perform color space conversion to obtain the RGB channel oil droplet image I of the characteristics of Chinese medicine volatile oil t (x, y, c) performs YCbCr color space conversion to optimize the impact of lighting changes on analysis:

[0128] Y=0.2627·R+0.6780·G+0.0593·B,

[0129] Cb=128-0.148·R-0.291·G+0.439·B,;

[0130] Cr=128+0.439·R-0.368·G-0.071·B,

[0131] Among them, R, G, and B are the intensity values ​​of the pixels in the RGB channels, Y is the brightness component, which is used to highlight the reflection characteristics of the volatile oil, and the Cb and Cr components are used to distinguish the color information of the oil droplets from the background water phase;

[0132] S22, the converted oil droplet image I t ′ (x,y) is subjected to Gaussian filtering and denoising, and the filtered oil droplet image is expressed as:

[0133]

[0134] Among them, σ is the standard deviation of the Gaussian distribution, and k is the size of the filter window, which is used to control the filter strength;

[0135] S23, the denoised oil droplet image It ″ (x,y) is histogram equalized to make the edge of the oil droplets clearer:

[0136]

[0137] Where L is the maximum value of the gray level, h(i) is the number of pixels with gray value i, and m×n represents the pixel size of each image;

[0138] S24, using the Canny edge detection algorithm to perform edge detection on the oil droplet image after contrast enhancement, extracting the edge contour of the oil droplet by calculating the gradient change of the image, and defining the gradient G as:

[0139]

[0140] Among them, G x and G y is the gradient of the oil droplet image in the x and y directions, calculated by the Sobel operator respectively:

[0141]

[0142] Among them, the symbol * represents the convolution operation;

[0143] S25, the oil droplet image data after edge detection Save and update the oil droplet image dataset:

[0144]

[0145] In this implementation, S3 includes the following steps:

[0146] S31, the pre-processed oil droplet image data Input the visual analysis system, perform preliminary segmentation of oil droplets and background using the Otsu threshold method, and calculate the adaptive threshold T to minimize the intra-class variance:

[0147]

[0148] Among them, ω1(T) and ω2(T) are the proportions of the two types of pixels under the threshold T. and is the variance of the two types of pixels;

[0149] S32, perform morphological processing on the segmented binary oil droplet image, using an open operation Remove noise:

[0150]

[0151] in, represents the opening operation, is the erosion operation, ⊕ is the dilation operation, and B is the structural element, which is used to eliminate small noise points and oil droplet contours with broken connections;

[0152] S33, extracting the contour point set of the oil droplet by contour detection algorithm {P j (u,v)|j=1,2,…,N i}, where N i Oil droplet image The number of oil droplets detected in the image, and the outline of each oil droplet is represented by a set of two-dimensional pixel coordinates (u, v);

[0153] S34. Calculate the minimum enclosing circle radius r of the oil droplet j As a basis for the oil droplet diameter:

[0154]

[0155] in, is the coordinate of the center point of the jth oil droplet, (u k ,v k ) is any point on the contour of the oil droplet;

[0156] S35. Calculate the diameter d of the oil droplet j :

[0157] d j =2·r j ;

[0158] Among them, d j It represents the diameter of the jth oil droplet and is used to determine whether the volatile oil extraction process has reached the end point.

[0159] In this implementation, S4 includes the following steps:

[0160] S41. The system sets a specific endpoint oil droplet diameter threshold d for each volatile oil based on the volatile oil extraction characteristics of different Chinese medicinal materials. th,k ; For example: for varieties of leaves or fruits such as Perilla, Mint, Artemisia argyi, Camphor leaf, Nepeta, Nepeta spicate, Tangerine peel, Citrus aurantium, Citrus aurantium, White cardamom, Amomum villosum, Tsaoko, Alpinia oxyphylla, Fennel, Lavender, Myrtle, Evodia rutaecarpa, Schisandra chinensis, etc., the endpoint oil droplet diameter threshold is set to 0.05mm; for varieties such as Dalbergia odorifera, Santalum, Frankincense, Myrrh, Ferula asafoetida, Liquidambar balsam, Notopterygium wilfordii, Cyperus rotundus, Cnidium monnieri, Platycladus orientalis, Angelica dahurica, Atractylodes macrocephala, Nardostachys grandiflora, Aucklandia lappa, Cyperus rotundus, Dry ginger, Turmeric, Acorus calamus, Bupleurum, Houttuynia cordata, Curcuma zedoaria, Elsholtzia ciliata, Asarum sieboldii, Magnolia, Ginger, Clove, etc., the endpoint oil droplet diameter threshold is set to 0.035mm; for varieties such as Cassia twig, Cinnamon bark, Chuanxiong, and Angelica sinensis, the endpoint oil droplet diameter threshold is set to 0.02mm;

[0161] S42, the system will measure the oil droplet diameter d in real time j(t) and the endpoint diameter threshold d of the corresponding variety th,k Compare to determine whether the preset extraction endpoint standard is reached:

[0162] d j (t)≥d th,k ;

[0163] Among them, d j (t) represents the measured diameter of the jth oil droplet at time t;

[0164] S43. When it is detected that the diameters of all oil droplets meet the corresponding endpoint threshold:

[0165]

[0166] The system determines that the extraction process is complete and immediately sends out an extraction end signal S end ;

[0167] S44, the system automatically sends the endpoint signal S end Send to the control unit, stop the extraction process, and record the corresponding time t end and all relevant parameters d j (t end )Enter the database:

[0168] Record = {d j (t end )|j=1,2,…,N i}.

[0169] In this implementation, S6 includes the following steps:

[0170] S61, the system obtains the continuous time t∈[t0,t end ] Oil droplet diameter change data D diameter ={d j (t)|j=1,2,…,N i ; t=t1,t2,…,t n}, used to analyze the dynamic change trend of oil droplet diameter in real time;

[0171] S62, the system for each time point t i The oil droplet diameter is calculated by difference, and the oil droplet diameter change rate v is defined j (t i )for:

[0172]

[0173] Among them, d j (t i ) and d j (t i-1) represent the jth oil droplet at time t i and t i-1 The diameter at time, v j (t i ) represents the rate of change of the diameter of the oil droplet during the time interval;

[0174] S63, the system calculates the diameter change rate according to the preset diameter change rate threshold v th Monitor the stability of the oil droplet diameter when the rate of change of all oil droplets meets the following conditions:

[0175]

[0176] The system determines that the oil droplet diameter tends to be stable and enters the endpoint detection state;

[0177] S64, the system is in the endpoint detection state, according to the endpoint diameter threshold d th,k Determine whether the extraction endpoint is reached when the following conditions are met:

[0178]

[0179] The system automatically sends out the extraction end signal S end ;

[0180] S65, the system will extract the end time t end And the oil droplet diameter data d at the corresponding time j (t end ) are stored in the database for process recording and quality tracking:

[0181] Record end ={d j (t end )|j=1,2,…,N i};

[0182] S66. If the diameter change rate of a certain oil droplet is found to exceed the threshold value during continuous monitoring:

[0183]

[0184] The system will automatically send out an abnormal warning signal S alert , prompting the operator to check or adjust parameters of the extraction process;

[0185] S67, extracting the endpoint signal S end After being sent, the system automatically stops the extraction process and archives all monitoring data.

[0186] Embodiment 2: A visual Chinese medicine volatile oil extraction endpoint determination device, comprising the following devices:

[0187] The industrial camera module is installed on the glass sight column and is used to collect real-time images of the RGB channels of oil droplets in the oil-water mixture at a set distance to generate a time series oil droplet image dataset;

[0188] The image preprocessing module receives the original oil droplet image data set collected by the industrial camera, performs color space conversion, denoising, contrast enhancement and edge detection, and forms a preprocessed oil droplet image data set;

[0189] The visual analysis system module is used to analyze the preprocessed oil droplet image data set, extract the outline of the oil droplet through the image segmentation algorithm, calculate the diameter of the oil droplet, and generate the oil droplet diameter data set;

[0190] The judgment standard module sets the corresponding oil droplet diameter judgment standard according to the volatile oil extraction characteristics of different Chinese medicinal materials, and stores the thresholds of different varieties in the threshold set;

[0191] The real-time monitoring module continuously monitors the changes in the diameter of the oil droplets, and determines whether it has reached a stable state by analyzing the change trend of the oil droplet diameter, and determines whether endpoint detection is required;

[0192] End point determination module: when the diameters of all oil droplets reach the corresponding preset threshold and the change trend is stable, the system automatically sends out an extraction end point signal;

[0193] Abnormal reminder module: during the monitoring process, if the changes of some oil droplets are found to be beyond the normal range, the system will automatically send out abnormal reminder signals to prompt the operator to check or adjust the extraction process;

[0194] The control and data recording module controls the extraction process to stop after receiving the extraction endpoint signal, and records the extraction endpoint time and all monitoring data into the database for subsequent quality tracking and process review;

[0195] The human-computer interaction interface displays real-time monitoring data and judgment results through a visual interface, allowing operators to view the changing trend and endpoint status of the oil droplet diameter, and provides abnormal processing prompts.

[0196] Example 3: In September 2024, a Chinese medicine pharmaceutical company located in City A adopted the visual Chinese medicine volatile oil extraction endpoint determination system of the present invention during the extraction of cinnamon twig volatile oil to solve the instability problem caused by the previous reliance on manual experience in extraction endpoint judgment. The main purpose of this test is to optimize the volatile oil extraction process and improve production efficiency and product consistency through automated monitoring and endpoint detection of the system.

[0197] At 10 a.m. on September 12, 2024, the company began to extract volatile oils from a batch of 200 kg of cinnamon twig samples. The samples were mixed with water in a ratio of 1:4 and heated to 70°C under a temperature control system. The heated water-oil mixture flowed through a pipe into a glass sight column with a height of 60 cm and a diameter of 15 cm. The industrial camera module in the system is located 30 cm above the sight column. It is configured to capture 1 frame of image per second and set the image resolution to 4096×2160 pixels to ensure that the complete morphology of the oil droplets is captured.

[0198] At 10:05, the system began to collect the first set of images and generated a preliminary oil droplet data set in the visual analysis system. The system detected that there were few oil droplets in the visual column, with a diameter of about 0.008 mm. At this time, the system displayed the status of "extraction not started".

[0199] At 11:15, as the temperature continued to rise, more oil droplets began to appear in the visual column. The system processed the image data through Gaussian filtering and Canny edge detection, and detected that the diameter of the oil droplets gradually increased to 0.015mm. At the same time, the real-time monitoring module recorded the abnormal fluctuation of the rate of change of the oil droplet diameter. According to the set algorithm system, it was determined that the extraction process had entered a critical stage.

[0200] At 12:30, the system detected that the diameter of the oil droplets was close to the set threshold of 0.02mm. Monitoring data showed that the rate of change of the oil droplet diameter gradually stabilized, and in the last 5 minutes the rate of change remained within 0.001mm / min. The system compared this information with the extraction standards in the database and automatically determined that the extraction was close to the end point.

[0201] At 12:35, the system automatically sends out an "end point is about to be reached" signal and records the final diameter of the oil droplets as 0.0201mm in the visual analysis system. Five seconds later, the system detects that the diameters of all oil droplets have reached or exceeded 0.02mm. The endpoint determination module sends out an "extraction endpoint" signal and immediately stops the heating system.

[0202] System operation and data logging

[0203] During the extraction process, the system recorded a number of data in real time, including the start time: 10:05 on September 12, 2024, the end time of extraction: 12:35 on September 12, 2024, the average oil droplet diameter change rate: 0.0015mm / min, the highest temperature during the extraction process: 72°C, the final diameter of the oil droplets: 0.0201mm, and the time when the system sent the endpoint signal: 12:35:05.

[0204] The system stores the above data in the database and displays the oil droplet diameter change trend of the whole process through a visual interface. The operator views the recorded oil droplet diameter change chart on the system terminal and confirms that all parameters of the extraction process meet the set standards.

[0205] To verify the superiority of the system of the present invention, the technical team also conducted a comparative test of the traditional manual monitoring method. Under the same conditions, the end time of the traditional extraction method was 13:10, which was 35 minutes later than the system of the present invention. This delay caused some oils to be over-extracted and the concentration of volatile oils to drop by 2%. In addition, during the manual monitoring process, the operator entered the site for inspection many times, resulting in omissions in some data records:

[0206] Table 1 Comparison between traditional method and the method of the present invention

[0207] index Traditional methods Method of the present invention Extraction time 3 hours 5 minutes 2 hours and 30 minutes Oil droplet diameter detection error ±0.05mm ±0.01mm Final volatile oil concentration 85% 87% Operator Check Times Every 30 minutes Fully automatic process Extraction time error ±10 minutes ±2 minutes

[0208] It can be seen from Example 1 that the system of the present invention can realize full-process automated control of the volatile oil extraction process without relying on manual monitoring. Compared with the traditional method, the endpoint detection error of the present system is reduced by 80%, and the volatile oil concentration of the product is increased by 2%. In addition, the system reduces the intervention of the operator through real-time monitoring and automatic judgment functions, and reduces the risk of human misjudgment. This example shows that the system of the present invention has significant advantages in improving extraction efficiency, ensuring product quality consistency, and reducing production costs.

[0209] The present invention adopts multiple image processing algorithms such as color space conversion, Canny edge detection and Otsu threshold segmentation to convert RGB images into YCbCr space, optimizes the influence of illumination change on image quality, and in the image segmentation link, uses morphological opening operation and Otsu threshold method to ensure the clear separation of oil droplets and background water phase, avoiding the problem of missed detection of small oil droplets in complex background by traditional algorithms. Experiments show that after the above improvements, the oil droplet contour extraction accuracy of the present invention is improved by more than 12%, and the misjudgment and missed detection are significantly reduced.

[0210] The present invention introduces real-time calculation of the rate of change of oil droplet diameter in the monitoring module, and determines whether the oil droplets tend to be stable by setting a rate threshold. Compared with the traditional single time point judgment method, the present invention uses time series analysis to capture the dynamic change trend of oil droplet diameter and triggers endpoint detection when the oil droplet diameter changes stably, effectively avoiding the problem of early or delayed endpoint judgment. Experimental data show that the endpoint judgment error of the present invention under complex extraction conditions is reduced by 18%, thereby improving extraction efficiency and product consistency.

[0211] The present invention adopts a modular design and independently configures the industrial camera, image preprocessing, visual analysis and endpoint determination modules, allowing the user to freely combine and adjust the detection modules according to the characteristics of different Chinese medicinal materials. Compared with the traditional expensive spectral analysis system, the system of the present invention has a simple structure, low cost and easy maintenance. By seamlessly integrating visual analysis with the control system, automated closed-loop control is achieved, reducing the risks of manual intervention and misoperation. Experimental results show that the modular design of the present invention improves production efficiency by more than 15% and reduces the maintenance and adjustment costs of the system by about 20%.

[0212] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine, characterized in that: The steps include: S1, obtaining real-time image data of oil-water mixture through an industrial camera installed on a glass sight column to form an oil droplet image data set; S2, inputting the oil droplet image data set into the image processing unit for image preprocessing, including color space conversion, denoising, contrast enhancement and edge detection; S3, analyzing the pre-processed oil droplet image through a visual analysis system, extracting the oil droplet contour using an image segmentation algorithm, and measuring the oil droplet diameter in real time; S4. According to the volatile oil extraction characteristics of different Chinese medicinal materials, the corresponding oil droplet diameter determination standard is set. When the oil droplet diameter reaches the preset value, the volatile oil extraction process is determined to be completed, and an extraction endpoint signal is automatically issued; S5. The system automatically stops the extraction process according to the extraction endpoint signal and records the oil droplet diameter data and related parameters during the extraction process; S6. The system continuously monitors the changes in oil droplet diameter through real-time monitoring function, and automatically determines the extraction endpoint through the preset diameter threshold.

2. A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine according to claim 1, characterized in that: The S1 comprises the following steps: S11. Install an industrial camera on the glass sight column and select a stable viewing angle that is not affected by vibration. Use the industrial camera fixing structure to position the industrial camera at a distance h from the surface of the oil-water mixture and set the camera resolution to R. img ; S12, placing the oil-water mixture in a transparent sight column to mix the oil droplets with the water, at different time points t during the mixing process i Collect oil droplet images, where t i Indicates the time of the i-th collection, and the collection frequency is set to f s ; S13, using an industrial camera to obtain RGB channel data of the oil droplet image, and representing each frame of the oil droplet image as a three-dimensional matrix I (x, y, c), where x and y are pixel coordinates, and c represents red, green, and blue channels; S14. Time-sequencing the continuously collected oil droplet images to construct a preliminary oil droplet image dataset: D raw ={I t |t=t1,t2,…,t n }; Among them, I t represents the oil droplet image collected at the tth time point, and n is the total number of oil droplet images collected; S15, through the camera internal parameter matrix K and external parameter matrix [R|T], the three-dimensional space point P in the visual column w (X w ,Y w ,Z w ) is mapped to a two-dimensional point P on the oil droplet image plane i (u,v): Among them, K represents the camera internal parameter matrix, [R|T] represents the external parameter matrix, (X w ,Y w ,Z w ) is the spatial point coordinate, (u,v) is the plane coordinate of the oil droplet image; S16. Setting oil droplet image quality threshold Q th , only when the oil droplet image I t The signal-to-noise ratio meets SNR(I t )≥Q th When , the oil droplet image is retained and entered into the oil droplet image dataset; S17, the final generated oil droplet image dataset D final Contains all valid oil droplet images after filtering: Among them, D final represents the oil droplet image dataset, which contains all valid oil droplet images that meet the signal-to-noise ratio requirements under the image quality screening condition. t represents the oil droplet image collected at time point t, recording the visible morphology of the oil droplets at that moment, m×n represents the pixel size of each image, and represents the resolution of the image in the x and y directions respectively, SNR(I t ) represents image I t The signal-to-noise ratio is an indicator of image quality. Represents image I t The average pixel intensity is used to calculate the deviation of each pixel from the average value, Q th Indicates the image quality threshold, which is set as the lower limit of the signal-to-noise ratio for the system to determine whether to retain the image. t )≥Q th When the image SNR(I t )≥Q th It is considered valid and added to the oil droplet image dataset D final .

3. A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine according to claim 1, characterized in that: The S2 comprises the following steps: S21. Oil droplet image dataset D final Perform color space conversion to obtain the RGB channel oil droplet image I of the characteristics of Chinese medicine volatile oil t (x, y, c) performs YCbCr color space conversion to optimize the impact of lighting changes on analysis: Among them, R, G, and B are the intensity values ​​of the pixels in the RGB channels, Y is the brightness component, which is used to highlight the reflection characteristics of the volatile oil, and the Cb and Cr components are used to distinguish the color information of the oil droplets from the background water phase; S22, the converted oil droplet image I t ′ (x,y) is subjected to Gaussian filtering and denoising, and the filtered oil droplet image is expressed as: Among them, σ is the standard deviation of the Gaussian distribution, and k is the size of the filter window, which is used to control the filter strength; S23, the denoised oil droplet image I t ″ (x,y) is histogram equalized to make the edge of the oil droplets clearer: Where L is the maximum value of the gray level, h(i) is the number of pixels with gray value i, and m×n represents the pixel size of each image; S24, using the Canny edge detection algorithm to perform edge detection on the oil droplet image after contrast enhancement, extracting the edge contour of the oil droplet by calculating the gradient change of the image, and defining the gradient G as: Among them, G x and G y is the gradient of the oil droplet image in the x and y directions, calculated by the Sobel operator respectively: Among them, the symbol * represents the convolution operation; S25, the oil droplet image data after edge detection Save and update the oil droplet image dataset:

4. A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine according to claim 1, characterized in that: The S3 comprises the following steps: S31, the pre-processed oil droplet image data Input the visual analysis system, perform preliminary segmentation of oil droplets and background using the Otsu threshold method, and calculate the adaptive threshold T to minimize the intra-class variance: Among them, ω1(T) and ω2(T) are the proportions of the two types of pixels under the threshold T. and is the variance of the two types of pixels; S32, perform morphological processing on the segmented binary oil droplet image, using an open operation Remove noise: Among them, ° represents the opening operation, For corrosion operations, is a dilation operation, and B is a structural element used to eliminate small noise points and oil droplet contours with broken connections; S33, extracting the contour point set of the oil droplet by contour detection algorithm {P j (u,v)|j=1,2,…,N i }, where N i Oil droplet image The number of oil droplets detected in the image, and the outline of each oil droplet is represented by a set of two-dimensional pixel coordinates (u, v); S34. Calculate the minimum enclosing circle radius r of the oil droplet j As a basis for the oil droplet diameter: in, is the coordinate of the center point of the jth oil droplet, (u k ,v k ) is any point on the contour of the oil droplet; S35. Calculate the diameter d of the oil droplet j : d j =2·r j ; Among them, d j It represents the diameter of the jth oil droplet and is used to determine whether the volatile oil extraction process has reached the end point.

5. A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine according to claim 1, characterized in that: The S4 comprises the following steps: S41. The system sets a specific endpoint oil droplet diameter threshold d for each volatile oil based on the volatile oil extraction characteristics of different Chinese medicinal materials. th,k ; S42, the system will measure the oil droplet diameter d in real time j (t) and the endpoint diameter threshold d of the corresponding variety th,k Compare to determine whether the preset extraction endpoint standard is reached: d j (t)≥d th,k ; Among them, d j (t) represents the measured diameter of the jth oil droplet at time t; S43. When it is detected that the diameters of all oil droplets meet the corresponding endpoint threshold: The system determines that the extraction process is complete and immediately sends out an extraction end signal S end ; S44, the system automatically sends the endpoint signal S end Send to the control unit, stop the extraction process, and record the corresponding time t end and all relevant parameters d j (t end )Enter the database: Record={d j (t end )∣j=1,2,…,N i }。 6. A visual method for determining the endpoint of extraction of volatile oil from traditional Chinese medicine according to claim 5, characterized in that: The S6 comprises the following steps: S61, the system obtains the continuous time t∈[t0,t end ] Oil droplet diameter change data D diameter ={d j (t)|j=1,2,…,N i ; t=t1,t2,…,t n }, used to analyze the dynamic change trend of oil droplet diameter in real time; S62, the system performs a i The oil droplet diameter is calculated by difference, and the oil droplet diameter change rate v is defined j (t i )for: Among them, d j (t i ) and d j (t i-1 ) represent the jth oil droplet at time t i and t i-1 The diameter at time, v j (t i ) represents the rate of change of the diameter of the oil droplet during the time interval; S63, the system calculates the diameter change rate according to the preset diameter change rate threshold v th Monitor the stability of the oil droplet diameter when the rate of change of all oil droplets meets the following conditions: The system determines that the oil droplet diameter tends to be stable and enters the endpoint detection state; S64, the system is in the endpoint detection state, according to the endpoint diameter threshold d th,k Determine whether the extraction endpoint is reached when the following conditions are met: The system automatically sends out the extraction end signal S end ; S65, the system will extract the end time t end And the oil droplet diameter data d at the corresponding time j (t end ) are stored in the database for process recording and quality tracking: Record end ={d j (t end )∣j=1,2,…,N i }; S66. If the diameter change rate of a certain oil droplet is found to exceed the threshold value during continuous monitoring: The system will automatically send out an abnormal warning signal S alert , prompting the operator to check or adjust parameters of the extraction process; S67, extracting the endpoint signal S end After being sent, the system automatically stops the extraction process and archives all monitoring data.

7. A visual Chinese medicine volatile oil extraction endpoint determination device, characterized in that: Includes the following devices: The industrial camera module is installed on the glass sight column and is used to collect real-time images of the RGB channels of oil droplets in the oil-water mixture at a set distance to generate a time series oil droplet image dataset; The image preprocessing module receives the original oil droplet image data set collected by the industrial camera, performs color space conversion, denoising, contrast enhancement and edge detection, and forms a preprocessed oil droplet image data set; The visual analysis system module is used to analyze the preprocessed oil droplet image data set, extract the outline of the oil droplet through the image segmentation algorithm, calculate the diameter of the oil droplet, and generate the oil droplet diameter data set; The judgment standard module sets the corresponding oil droplet diameter judgment standard according to the volatile oil extraction characteristics of different Chinese medicinal materials, and stores the thresholds of different varieties in the threshold set; The real-time monitoring module continuously monitors the changes in the diameter of the oil droplets, and determines whether it has reached a stable state by analyzing the change trend of the oil droplet diameter, and determines whether endpoint detection is required; End point determination module: when the diameters of all oil droplets reach the corresponding preset threshold and the change trend is stable, the system automatically sends out an extraction end point signal; Abnormal reminder module: during the monitoring process, if the changes of some oil droplets are found to be beyond the normal range, the system will automatically send out abnormal reminder signals to prompt the operator to check or adjust the extraction process; The control and data recording module controls the extraction process to stop after receiving the extraction endpoint signal, and records the extraction endpoint time and all monitoring data into the database for subsequent quality tracking and process review; The human-computer interaction interface displays real-time monitoring data and judgment results through a visual interface, allowing operators to view the changing trend and endpoint status of the oil droplet diameter, and provides abnormal processing prompts.

Citation Information

Patent Citations

  • Visual detection method and device for coating machine

    CN107154042A

  • Quality analysis method and system for low-carbon lubricating oil

    CN117723739A

  • Improved KNN-based 6lowpan network intrusion detection method

    WO2020042702A1

Cited By

  • Method and system for detecting pharmaceutical volatile oil extraction interface based on spectral analysis

    CN121856189A