A detection system for liquid level of microplate
By designing a liquid level detection system for microplate and combining image processing technology, the problems of low efficiency and low accuracy of microplate liquid level detection are solved, and efficient and accurate liquid level detection is achieved to adapt to complex environments.
Patent Information
- Application Number
- CN202210074579.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-01-21
AI Technical Summary
The prior art is difficult to efficiently and accurately detect the liquid level of the microplate, especially in the case of small volume and large quantity, which has high cost, small space and difficult to operate, resulting in low manual detection efficiency and low accuracy.
A liquid level detection system for microplate is designed. Through the processor and memory stored with computer programs, the parameter setting of the drive device, the number of target pixels and the depth of field are obtained and the frame is collected by a preset camera. The rate matches the transmission speed of the drive device, obtains a single row of microplate images, and performs angle correction and liquid level extraction through image processing technology to ensure detection accuracy.
It can adapt to changes in external light intensity, prevent image imaging angle deviation, improve detection accuracy, simplify liquid level volume calculation, and meet detection needs.
Smart Images

Figure CN114577310B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision, and in particular to a detection system for liquid level of a microplate. Background Art
[0002] In recent years, due to the characteristics of machine vision technology, such as non-contact, lossless, and able to adapt to harsh industrial environments, its application fields have become increasingly extensive, the technology has become increasingly mature, and good results have been achieved in various fields. Machine vision technology has high detection accuracy, low cost, higher efficiency, easy information integration and portability, and strong adaptability. These characteristics make it one of the preferred detection technologies for industrial production; machine vision often detects large containers such as storage tanks, transparent containers such as glass bottles and unobstructed containers on all sides in liquid level detection, and has achieved good detection results; in the liquid level detection of transparent containers, sensors are used to collect images vertically from the side of the container and detect them. For non-transparent large containers, they are often processed using triangulation with the help of lasers or their own high-intensity light; and there is less research on microplates that are obstructed on all sides and have a smaller volume.
[0003] Especially in the medical field, it is necessary to check the liquid level in a large number of containers. However, in the prior art, it is difficult to implement pressure-type liquid level detection technology for microplates with smaller volumes. For example, in the detection of liquid levels in related containers, the more mature technology is capacitive liquid level detection. However, this technology has the problems of high cost, small space and difficulty in operation when performing liquid level detection on microplates with small volumes and large numbers. Laser and ultrasonic liquid level detection are relatively expensive. Due to the complex characteristics of microplate materials and volumes, microplate liquid level detection currently still uses manual detection methods, which have low efficiency and low accuracy. Therefore, it is impossible to check a large number of micropore liquid levels for liquid level measurement in the prior art. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by this application is:
[0005] A liquid level detection system for a microplate, the system comprising a processor and a memory storing a computer program, when the computer program is executed by the processor, the following steps are implemented:
[0006] S1. Set the parameters of the drive device;
[0007] S2, obtaining the target pixel number B, and being able to collect complete liquid level information;
[0008] S3, obtaining the target depth of field ΔL;
[0009] S4, calibrating the target camera device based on B and ΔL;
[0010] S5. Matching the preset camera acquisition frame rate of the target camera device with the transmission speed in the driving device to obtain a single-row microplate image and use the single-row microplate image as the target image.
[0011] The present application has at least the following technical effects: it can adapt to changes in external light intensity and prevent the angle of microplate imaging from shifting due to camera shaking during image acquisition, which affects detection accuracy. It can also well guarantee accuracy requirements, making the calculation of liquid level volume more efficient and concise, and meeting detection needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A schematic diagram of a flow chart of a liquid level detection system for a microplate executing a program provided in Example 1 of the present application;
[0014] Figure 2 A schematic flow chart of a liquid level detection method provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0016] Embodiment 1
[0017] like Figure 1 As shown, Embodiment 1 of the present invention provides a liquid level detection system for a microplate, the system comprising a processor and a memory storing a computer program, and when the computer program is executed by the processor, the following steps are implemented:
[0018] S1. Set the parameters of the drive device;
[0019] S11. Obtain the pulse frequency P, which meets the following conditions:
[0020] Among them, c is the set motor subdivision, i is the speed reducer reduction ratio, R is the conveyor belt radius, and n meets the following conditions:
[0021] Wherein, V represents the transmission speed; those skilled in the art can set it according to requirements.
[0022] S13, adjusting P so that P reaches a preset pulse frequency threshold.
[0023] S2. Obtain the target pixel number B, and collect complete liquid level information.
[0024] Specifically, step S2 also includes the following steps to obtain B:
[0025] S21, obtaining the height H and diameter L of any microwell in the microwell plate to be tested, and obtaining α based on H and L, wherein α0≤α≤90°;
[0026] Furthermore, α0 meets the following conditions:
[0027]
[0028] The camera collects the image of the microplate at an inclined angle, ensuring that the camera can obtain the image of the entire microplate microwell height and ensuring the imaging quality of the image.
[0029] S23 obtains the number of pixels B based on α, where B meets the following conditions:
[0030] Wherein, G represents the field of view width. Those skilled in the art can set the value of G according to actual needs, and d meets the following conditions:
[0031] dβu×cosα, wherein u represents the physical resolution of the liquid level height in the camera, and those skilled in the art can set the value of u according to actual needs.
[0032] The above can ensure that the camera light spot and the left top endpoint and the right bottom endpoint of each microwell on the microwell plate are in a straight line, and the image of the entire height of the microwell can be completely collected, making the subsequent liquid level extraction more convenient.
[0033] Furthermore, the bottom shape of the micro-well plate is any one of a flat bottom, a round bottom and a V-shaped bottom. Preferably, the bottom shape of the micro-well plate is a flat bottom.
[0034] Preferably, the microporous plate is provided with 12 rows of microporous holes, and the number of microporous holes corresponding to each row is 8, wherein the microporous plate is 120 mm long, 80 mm wide and 14 mm high.
[0035] Preferably, each microwell has an inner diameter of 6 mm, an inner height of 10.5 mm, a volume of about 400 μl and a distance between the centers of the microwells of 9 mm.
[0036] Preferably, the microplate is transparent.
[0037] S3. Obtain target depth of field ΔL.
[0038] Specifically, step S3 also includes the following steps to obtain ΔL:
[0039] S31, obtaining the field of view width W of the target camera device;
[0040] S33. Based on W, obtain the focal length f of the lens, where f meets the following conditions:
[0041] f=a×D / W, where a represents the horizontal width of the camera image, i.e., the horizontal size of the selected camera photosensitive chip; D represents the distance from the camera to the object, i.e., the object distance.
[0042] S35 . Obtain a target depth of field ΔL based on the depth BC in the optical axis direction of the target camera device and f.
[0043] Specifically, BC meets the following conditions:
[0044] BC = h × cos α;
[0045] Specifically, ΔL meets the following conditions:
[0046] ΔL=ΔL1+ΔL2;
[0047] Among them, ΔL1 represents the depth of field in front of the lens, and ΔL2 represents the depth of field behind the lens. ΔL1 and ΔL2 meet the following conditions:
[0048]
[0049] Wherein δ represents the diameter of the allowed circle of confusion; F represents the shooting aperture value; L represents the focus distance, which can be understood as the object distance. Those skilled in the art can set the values of L and F according to actual needs; this can provide the camera with a clearer image.
[0050] Specifically, the target camera device is an industrial camera and a lens used in conjunction with the industrial camera.
[0051] S4. Calibrate the target camera device based on B and ΔL. A person skilled in the art may adopt any camera calibration method in the prior art to calibrate the camera, for example, Zhang Zhengyou calibration method, camera calibration based on 3D stereo targets, active vision camera calibration, and camera self-calibration method, etc. Preferably, the embodiment of the present invention adopts Zhang Zhengyou calibration method, which can eliminate the distortion that occurs when taking photos and improve the measurement accuracy of the system.
[0052] S5. Matching the preset camera acquisition frame rate of the target camera device with the transmission speed in the driving device to obtain a single-row microplate image and use the single-row microplate image as the target image.
[0053] Furthermore, a soft triggering method is adopted to enable the target camera device to perform image acquisition.
[0054] Furthermore, those skilled in the art may adopt any method to match the camera acquisition frame rate with the conveyor belt speed V, which will not be described in detail here.
[0055] Furthermore, those skilled in the art may adopt any soft triggering method to allow the camera to perform image acquisition, which will not be described in detail here.
[0056] Embodiment 2
[0057] like Figure 2 As shown, this embodiment provides a liquid level detection method, which is implemented by using a detection system for microplate liquid level in the embodiment, and the method also includes the following steps:
[0058] S100: Acquire a target image and process the target image to obtain a second intermediate image.
[0059] Specifically, step S100 also includes the following steps:
[0060] S101. Binarize the target image to obtain a first intermediate image.
[0061] S103: Acquire a target image region from the first intermediate image and perform a closing operation on the target image region to obtain a second intermediate image.
[0062] Furthermore, in step S101, the first intermediate image is obtained by the following steps:
[0063] Get the pixel point list D corresponding to the target image = (D1, D2, ..., D f ), where D g It refers to the gray value of the g-th pixel, g = 1...f, f is the number of pixels;
[0064] When D g ≥ preset grayscale threshold t, D g Set to 255;
[0065] When D g When <t, Dg is set to 0;
[0066] Based on all settings D g , and obtain the first intermediate image.
[0067] Furthermore, those skilled in the art may set the grayscale threshold according to requirements, which will not be elaborated here. Preferably, the grayscale threshold is 127.
[0068] Furthermore, in step S103, the closing operation is an expansion and corrosion process, which can be understood as: performing expansion processing on the target area to obtain an intermediate area; performing corrosion processing on the intermediate area to obtain a final image area and based on the final area, obtaining a second intermediate image; those skilled in the art can adopt the expansion and corrosion processing method in the prior art as needed, which will not be repeated here.
[0069] Preferably, the target area refers to an area in the first intermediate image where an abnormality exists, such as separation, disconnection, edge cracking, omission, etc. Those skilled in the art know the method of obtaining the area with abnormality, which will not be described in detail here.
[0070] S200, based on the second intermediate image, perform angle correction processing on the target image to obtain a third intermediate image; it can be understood that: the liquid surface presentation area, that is, the final area, can be obtained from the second intermediate image.
[0071] Specifically, step S200 also includes the following steps:
[0072] S201, based on the second intermediate image, obtaining the coordinates (x0, y0) of the target pixel point p0;
[0073] S203, based on the coordinates (x0, y0) of the target pixel point p0, obtaining a target slope value range;
[0074] S205. Based on the target slope value range, fit two straight lines corresponding to the two edges of the second intermediate image and use the intersection of the two straight lines as the corner point. A person skilled in the art knows the method of obtaining the corner point based on the target slope value range, which will not be described in detail here.
[0075] Specifically, step S203 also includes the following steps:
[0076] S2031, obtaining a preset slope value range A to B;
[0077] S2033, dividing the preset slope value range into n sub-intervals, wherein the width of each sub-interval is 1 / n;
[0078] S2035. Set the accumulator K for the j-th subinterval j , j = 1...n, and when K j = 0, traverse the pixel point list corresponding to the second intermediate image and obtain the i-th pixel point P in the straight line detection area from the pixel point list corresponding to the second intermediate image. iThe coordinates (x i ,y i ), according to P i The coordinates (x i ,y i ), and get P i The corresponding slope m i , i = 1...Z, Z is the number of pixels in the line detection area, where m i Meet the following conditions:
[0079]
[0080] S2037, when m i In any subinterval, get m i The accumulator K of the corresponding subinterval j =K j +1;
[0081] S2039, taking the subinterval of the maximum value of the accumulator and its two adjacent subintervals as the next slope value range, repeating steps S2033-S2037 until the slope value range is smaller than the preset slope threshold range and is used as the target slope value range.
[0082] Specifically, the straight line inspection area refers to an image area obtained by performing Hough transform straight line detection processing on the target image.
[0083] The above steps are based on the straight line detection process, which can prevent the microplate image from being offset at an angle due to camera shaking during image acquisition, thereby affecting the detection accuracy, and ensure that four accurate corner points are finally obtained.
[0084] S207. Process the second intermediate image according to all corner point coordinates to obtain a third intermediate image; wherein the processing adopts a perspective transformation method. Those skilled in the art may adopt any perspective transformation method, which will not be described here, so that the angle of the microplate in the first intermediate image can be parallel to the horizontal axis.
[0085] S300, extracting the ROI of the third intermediate image to obtain the ROI area image of each micropore; only the micropore image portion with better liquid level characteristics can be retained to reduce unnecessary interference.
[0086] Specifically, step S300 also includes the following steps:
[0087] S301, obtaining a middle portion image of any micropore in a third intermediate image corresponding to each micropore, wherein the height of the middle portion is 1 / Q of the total height of each micropore, preferably, Q=2;
[0088] S303, obtaining the starting coordinates of the ROI corresponding to each micropore according to the coordinates of all endpoints corresponding to the third intermediate image and the preset width of any micropore pixel; those skilled in the art can set the preset width according to actual needs, which will not be described in detail here;
[0089] S305, obtaining the ROI area image of each micropore according to the width and height of the preset designated area; the technicians in this field set the width and height of the preset designated area according to actual needs, which will not be repeated here.
[0090] S400 , performing histogram equalization processing on the ROI area image of each micro-hole to obtain a key image corresponding to each micro-hole.
[0091] Specifically, step S400 also includes the following steps:
[0092] S401, obtaining the grayscale level r of the ROI area image of each micropore, 0≤r≤1, which can be understood as: when r=0, the grayscale value of the ROI area image of each micropore is 0, and when r=1, the grayscale value of the ROI area image of each micropore is 255.
[0093] S403 , performing histogram equalization processing on the ROI area image of each micropore to obtain a grayscale level s corresponding to the key image corresponding to each micropore, where 0≤s≤1.
[0094] Furthermore, those skilled in the art may adopt any histogram equalization processing method, which will not be described in detail herein. Preferably, the histogram equalization processing is a histogram equalization processing of continuous gray values. For example, when the probability density corresponding to r is P r (r), the probability density corresponding to s is P s (s) = 1, where P() is the probability density function corresponding to the image grayscale.
[0095] After histogram equalization processing, some pixel values are merged, thereby increasing the contrast of the image and making the liquid level features of the image clearer.
[0096] S500 , filtering the key image corresponding to each micropore to obtain a final image.
[0097] Specifically, step S500 also includes the following steps:
[0098] S501, processing the key image corresponding to each micropore to obtain a fourth intermediate image, wherein the processing method is a seed filling method, preferably, the processing method is an eight-neighborhood pixel filling method;
[0099] S503, obtaining a connected region from the fourth intermediate image, and when the area of the connected region is less than or equal to a preset area threshold, setting the grayscale values of all pixels in the connected region to 0;
[0100] When the area of the connected region is greater than the preset area threshold, the grayscale values of all pixels in the connected region are retained.
[0101] After the image is filtered, the noise points such as the black holes above are removed, and the interference of the non-liquid part is filtered out, leaving only the valid part containing liquid.
[0102] S600. Based on the final image, obtain the liquid level curve corresponding to the target image. A person skilled in the art knows that any method can be used to obtain the liquid level curve through the image. Preferably, the least square method is used to perform polynomial fitting on the obtained liquid level contour coordinates to obtain the liquid level curve corresponding to the target image, wherein the liquid level contour is found in the final image using the findContours function in openCV.
[0103] In this embodiment, the liquid level curve is fitted, which can solve the problem in the prior art that the liquid levels corresponding to the multiple micropores of the micropore plate cannot be determined, and can accurately determine the contour of the liquid level, reduce the error in calculating the liquid volume, and improve the accuracy of the liquid volume calculation.
[0104] Although some specific embodiments of the present application have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present application. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present application. The scope disclosed in the present application is defined by the appended claims.
Claims
1. A liquid level detection system for a microplate, characterized in that: The system comprises a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: S1. Set the parameters of the drive device; S2, obtaining the target pixel number B, and being able to collect complete liquid level information; In S2, the following steps are also included: S21, obtain the height H and diameter L of any microwell in the microwell plate to be tested, and based on H and L, obtain α ,in, ; α 0 meets the following conditions: ; S23 is based on α , get the number of pixels B, B meets the following conditions: ; d meets the following conditions: ; Where G represents the width of the field of view; S3, obtaining the target depth of field ∆L; S4, calibrating the target camera device based on B and ∆L; S5, matching the preset camera acquisition frame rate of the target camera device with the transmission speed in the driving device to obtain a single-row microplate image and use the single-row microplate image as the target image; After obtaining the target image, the following processing steps are also included: S100, processing the target image to obtain a second intermediate image; The step S100 includes the following steps: S101, performing binarization processing on the target image to obtain a first intermediate image; S103, acquiring a target image region from the first intermediate image and performing a closing operation on the target image region to obtain a second intermediate image; S200, performing angle correction processing on the target image based on the second intermediate image to obtain a third intermediate image; The step S200 includes the following steps: S201, based on the second intermediate image, obtaining the coordinates (x0, y0) of the target pixel point p0; S203, based on the coordinates (x0, y0) of the target pixel point p0, obtaining a target slope value range; S205, based on the target slope value range, fitting two straight lines corresponding to the two edges of the target image and taking the intersection point between the two straight lines as the corner point; S207, processing the second intermediate image according to the coordinates of all corner points to obtain a third intermediate image; S300, performing ROI extraction on the third intermediate image to obtain an ROI area image of each micropore; The step S300 includes the following steps: S301, obtaining a middle portion image of any micropore in a third intermediate image corresponding to each micropore; S303, obtaining the starting coordinates of the ROI corresponding to each micropore according to the coordinates of all endpoints corresponding to the third intermediate image and the preset width of any micropore pixel; S305, acquiring the ROI area image of each micro-hole according to the preset width and height of the designated area; S400, performing histogram equalization processing on the ROI area image of each micropore to obtain a key image corresponding to each micropore; The step S400 includes the following steps: S401, obtaining the gray level r of the ROI area image of each micropore, 0≤r≤1; S403, performing histogram processing on the ROI area image of each micropore to obtain the grayscale level s corresponding to the key image corresponding to each micropore, where 0≤s≤1; S500, filtering the key image corresponding to each micropore to obtain a final image; The step S500 includes the following steps: S501, processing the key image corresponding to each micropore to obtain a fourth intermediate image; S503, obtaining a connected region from the fourth intermediate image, and when the area of the connected region is less than or equal to a preset area threshold, setting the grayscale values of all pixels in the connected region to 0; when the area of the connected region is greater than the preset area threshold, retaining the grayscale values of all pixels in the connected region; S600: Based on the final image, obtain a liquid level curve corresponding to the target image.
2. A liquid level detection system for a microplate according to claim 1, characterized in that: In S1, the following steps are also included: S11, get pulse frequency P , P Meet the following conditions: ; Among them, c is the set motor subdivision, i is the reducer reduction ratio, ,in, V Indicates the transmission speed. R is the conveyor belt radius; S13, yes P Make adjustments so that P The preset pulse frequency threshold is reached.
3. A liquid level detection system for a microplate according to claim 1, characterized in that: The bottom shape of the microplate is flat.
4. A liquid level detection system for a microplate according to claim 1, characterized in that: In S3, the following steps are also included: S31, obtaining the field of view width W of the target camera device; S33, based on W, obtaining the focal length f of the lens; S35. Based on the depth BC in the optical axis direction of the target camera device and f, obtain the depth of field ∆L of the lens.
5. A liquid level detection system for a microplate according to claim 4, characterized in that: In step S33, f satisfies the following condition: f = a × D / W; Among them, a represents the horizontal width of the camera imaging, that is, the horizontal size of the selected camera photosensitive chip; D represents the distance from the camera to the object, that is, the object distance.
