Ampoule bottle bottom endotoxin gel result detection method using AI and OpenCV
Automatically detecting the endotoxin gel results at the bottom of the ampoule through AI and OpenCV technology, solving the problems of cumbersome, low efficiency and susceptibility to human interference in the existing detection methods, and achieving efficient, accurate and reliable detection results.
Patent Information
- Application Number
- CN202311593943.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2025-05-27
AI Technical Summary
The existing endotoxin gel detection methods are cumbersome, inefficient, susceptible to human interference, and the test results are difficult to preserve and trace.
Using AI and OpenCV technology, the endotoxin gel results at the bottom of the ampoule are automatically detected, and automated detection is achieved through steps such as image acquisition, grayscale processing, regional interest division, binarization, expansion, corrosion, contour search and area calculation.
It improves detection efficiency, reduces labor costs, reduces the risk of human interference, ensures the accuracy and stability of data, and provides audit tracking functions.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of endotoxin gel result detection, and in particular to a method for detecting the endotoxin gel result at the bottom of an ampoule bottle using AI and OpenCV. Background Technique
[0002] As a small container, ampoule bottles are widely used in the fields of medicine, biotechnology, drug research, etc. for storing drugs, experimental samples, and other liquids. It is crucial to have an endotoxin gel detection method that can accurately and efficiently detect the gel result at the bottom of the ampoule bottle.
[0003] Bacterial endotoxin inspection is an important quality index to ensure the safety of injections. Traditional bacterial endotoxin gel method detection usually relies on manual detection and uses the method of horseshoe crab reagent enzyme reaction to obtain the final test result.
[0004] The disadvantages of the existing detection methods are as follows: the test process is cumbersome, the efficiency of manual detection is not high, the risk of human interference during the test process is high, which is likely to interfere with the result determination of drugs, the test results are difficult to preserve, the test data cannot be traced, and the manual evaluation cannot be fully trusted. Therefore, we propose a method for detecting the endotoxin gel result at the bottom of an ampoule bottle using AI and OpenCV. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the existing defects and provide a method for detecting the endotoxin gel result at the bottom of an ampoule bottle using AI and OpenCV. It automatically detects the gel result, reduces labor costs, improves work efficiency, has a high degree of automation, minimizes the risk factors that may be brought by human interference, records the whole process by video, records the entire experimental process, uses tools and algorithms for image processing and analysis to obtain accurate results, ensures the accuracy of data, has an audit trail, provides guarantee for the accuracy and stability of data, and can effectively solve the problems in the background technique.
[0006] To achieve the above object, the present invention provides the following technical solution: A method for detecting the endotoxin gel result at the bottom of an ampoule bottle using AI and OpenCV, the method for detecting the endotoxin gel result at the bottom of an ampoule bottle using AI and OpenCV includes the following steps:
[0007] 1) Image acquisition process: After sealing the mouth of the ampoule bottle to be detected and mixing it evenly, then buckle the multifunctional fixture onto the ampoule bottle, place the entire multifunctional fixture together with the ampoule bottle into a thermostat for heat preservation, then the multifunctional fixture horizontally moves to the photographing position, uses the laminated motor to drive the flipping mechanism to slowly flip the ampoule bottle 180 degrees, uses the LED to vertically irradiate the bottom of the ampoule bottle, and uses a high-resolution camera to collect images of the bottom of the ampoule bottle;
[0008] 2) Grayscale processing: Use an image processing device to convert the captured color image into a grayscale image;
[0009] 3) Region of interest (ROI) division: Divide the image into multiple regions of interest (ROIs);
[0010] 4) Binarization processing: Perform binarization processing on each ROI in step 3), and divide the pixels in the grayscale image into two categories, foreground and background, through the binarization algorithm;
[0011] 5) Dilation processing: Use the dilation processing algorithm to perform dilation operations on the target regions in each ROI;
[0012] 6) Erosion processing: Use the erosion processing algorithm to perform erosion operations on the target regions in each ROI;
[0013] 7) Contour finding: Apply the contour finding algorithm to extract the contours of the target regions in each ROI;
[0014] 8) Contour area calculation: Calculate the area of each contour in step 7) to determine the size of the gel result.
[0015] Preferably, during the image acquisition process, the holding time of the ampoule bottle in the thermostat is 60 ± 2 minutes.
[0016] Preferably, in the grayscale processing, a grayscale conversion algorithm is used to convert the RGB channel information of each pixel point in the color image into a grayscale value.
[0017] Preferably, in the region of interest (ROI) division, the region of interest (ROI) algorithm is used to divide the image into multiple specific regions, which correspond to different parts of the bottom of the ampoule bottle, and each ROI represents a specific region.
[0018] Preferably, in the dilation processing, the area of the target region is enlarged by increasing the number of foreground pixels.
[0019] Preferably, in the erosion processing, the area of the target region is reduced by reducing the number of foreground pixels.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: The method for detecting the endotoxin gel result at the bottom of the ampoule bottle using AI and OpenCV has the following advantages: automatically detecting the gel result, reducing labor costs, improving work efficiency, having a high degree of automation, minimizing the risk factors that may be brought by human interference, recording the whole process, recording the entire experimental process, using tools and algorithms for image processing and analysis to obtain accurate results, ensuring the accuracy of data, having an audit trail, and providing guarantee for the accuracy and stability of data. Detailed implementation manners
[0021] The following will combine with the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0022] A method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV. This method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV includes the following steps:
[0023] 1) Image acquisition process: After sealing the mouth of the ampoule to be detected and mixing it evenly, the experimenter then buckles the multi-functional fixture onto the ampoule, places the entire multi-functional fixture together with the ampoule into a thermostat for heat preservation. The heat preservation time of the ampoule in the thermostat is 60 ± 2 minutes. When the time arrives, the multi-functional fixture is horizontally moved to the photographing position. The turnover mechanism is driven by a laminated motor to slowly turn the ampoule 180 degrees. The bottom of the ampoule is vertically irradiated by an LED, and a high-resolution camera is used to acquire an image of the bottom of the ampoule. When selecting the high-resolution lens, it is necessary to ensure that the entire row of test tubes is included in the range of the photo. At the same time, determine the photographing position. According to the photographing size, the edge of each ampoule is determined as the ROI area. During the turnover process of the entire mechanical structure, it takes 2.5 seconds, and continuous photographing will be carried out. The acquired images will be used as input data for subsequent analysis. In order to obtain accurate results, ensure that the acquired images have sufficient resolution and clarity;
[0024] 2) Grayscale processing: Use an image processing device to convert the acquired color image into a grayscale image;
[0025] In grayscale processing, a grayscale conversion algorithm is adopted to convert the RGB channel information of each pixel point of the color image into a grayscale value. This helps to simplify the image, eliminate color information, and provide a clearer basic image for subsequent steps;
[0026] 3) Region of interest (ROI) division: Divide the image into multiple regions of interest (ROI);
[0027] In the region of interest (ROI) division, a region of interest (ROI) algorithm is adopted to divide the image into multiple specific regions. These regions correspond to different parts of the bottom of the ampoule to meet different experimental requirements. This is to focus on specific regions at the bottom in order to better analyze the gel result. Each ROI represents a specific region, which may include gel results and other elements;
[0028] 4) Binarization processing: Perform binarization processing on each ROI in 3). By using a binarization algorithm, the pixels in the grayscale image are divided into two categories: foreground and background. By setting an appropriate threshold, the target area in the image is highlighted, facilitating precise processing in subsequent steps;
[0029] 5) Dilation processing: Use a dilation processing algorithm to perform dilation operations on the target areas in each ROI;
[0030] In dilation processing, by increasing the number of foreground pixels, the area of the target area is expanded, which helps to connect adjacent pixels and improves the ability to capture the boundary of the gel result;
[0031] 6) Erosion processing: Use an erosion processing algorithm to perform erosion operations on the target areas in each ROI;
[0032] In erosion processing, by reducing the number of foreground pixels, the area of the target area is reduced, which helps to remove small noises or connections and makes the boundary of the gel result clearer;
[0033] 7) Contour finding: Apply a contour finding algorithm to extract the contours of the target areas in each ROI. Once the binarization, dilation, and erosion processing are completed, we use the contour finding algorithm to detect the boundaries within each ROI. These contours represent the shape of the gel result, and contour finding can provide information about the shape and size of the gel;
[0034] 8) Contour area calculation: Calculate the area of each contour in 7) to determine the size of the gel result. This is an important parameter that can be used for further analysis and determination. Based on the area of the gel result, we can perform classification and decision-making to determine its nature and whether there are any abnormal situations. After the calculation is completed, according to the Ai classifier, the image results are classified to judge the nature of the gel result, and the gel experiment results are obtained through data calculation and uploaded to the host computer software in real time. The host computer software also generates an experiment report simultaneously.
[0035] The above are only embodiments of the present invention, and thus do not limit the patent scope of the present invention. Any equivalent structural or equivalent process transformations made by using the content of the specification of the present invention, or directly or indirectly applied in other related technical fields, are similarly included in the patent protection scope of the present invention.
Claims
1. A method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV, characterized in that: The method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV comprises the following steps: 1) Image acquisition process: After sealing the mouth of the ampoule to be detected and mixing it evenly, then buckle the multi-functional fixture onto the ampoule, place the entire multi-functional fixture together with the ampoule into a thermostat for heat preservation, then horizontally move the multi-functional fixture to the photographing position, use the laminated motor to drive the flipping mechanism to slowly flip the ampoule 180 degrees, use an LED to vertically irradiate the bottom of the ampoule, and use a high-resolution camera to collect an image of the bottom of the ampoule; 2) Grayscale processing: Use an image processing device to convert the collected color image into a grayscale image; 3) Region of interest (ROI) division: Divide the image into multiple regions of interest (ROIs); 4) Binarization processing: Perform binarization processing on each ROI in step 3), and divide the pixels in the grayscale image into two categories, foreground and background, through a binarization algorithm; 5) Dilation processing: Use a dilation processing algorithm to perform a dilation operation on the target region in each ROI; 6) Erosion processing: Use an erosion processing algorithm to perform an erosion operation on the target region in each ROI; 7) Contour finding: Apply a contour finding algorithm to extract the contour of the target region in each ROI; 8) Contour area calculation: Calculate the area of each contour in step 7) to determine the size of the gel result.
2. The method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV according to claim 1, characterized in that: During the image acquisition process, the heat preservation time of the ampoule in the thermostat is 60 ± 2 minutes.
3. The method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV according to claim 1, characterized in that: In the grayscale processing, a grayscale conversion algorithm is adopted to convert the RGB channel information of each pixel point of the color image into a grayscale value.
4. The method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV according to claim 1, characterized in that: In the region of interest (ROI) division, a region of interest (ROI) algorithm is adopted to divide the image into multiple specific regions, these regions correspond to different parts of the bottom of the ampoule, and each ROI represents a specific region.
5. The method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV according to claim 1, characterized in that: In the dilation processing, the area of the target region is enlarged by increasing the number of foreground pixels.
6. The method for detecting the endotoxin gel result at the bottom of an ampoule using AI and OpenCV according to claim 1, characterized in that: In the erosion processing, the area of the target region is reduced by reducing the number of foreground pixels.