A method for detecting quality of prepared solution
The automatic evaluation of embryo culture medium droplet quality through image processing technology solves the problems of low efficiency and high subjectivity of manual screening, and realizes efficient and accurate preparation liquid quality detection.
Patent Information
- Application Number
- CN202411257765.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-09-09
AI Technical Summary
During the embryo culture process in the field of assisted reproduction, the liquid preparation operation is prone to problems such as irregular droplet shape, bubbles, and impurity contamination. Manual screening is inefficient and subject to subjectivity, making it difficult to ensure the quality of the prepared liquid.
Image processing technology is used to collect the original image of the culture solution, and then perform proportional reduction, background light intensity estimation, foreground image extraction, morphological operations and edge detection to automatically evaluate the droplet contour, bubbles and impurities, calculate the droplet roundness and height, and provide quality assessment indicators.
It achieves automatic and accurate preparation solution quality assessment, reduces the labor cost and time of manual screening, improves efficiency, reduces subjective errors, and ensures the quality and consistency of preparation solutions.
Smart Images

Figure CN119413797B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of assisted reproduction, and in particular to a method for detecting the quality of a prepared solution. Background Art
[0002] In the field of assisted reproduction, embryo culture requires the preparation of culture dishes in advance, a process known as fluid preparation. This involves titrating culture fluid and mineral oil into the culture dish in a specific arrangement to ensure that the culture fluid droplets are covered with mineral oil, preventing water from evaporating and affecting the osmotic pressure of the culture fluid.
[0003] However, during the liquid preparation process, operational errors may cause problems such as irregular droplet shapes and bubbles. Improper surface treatment of the culture dish or incorrect liquid dispensing method may cause the culture solution droplet height to be too low. Impurities may enter the culture dish during the liquid preparation process, causing droplet contamination.
[0004] Manual screening of culture dishes with qualified preparations is labor-intensive, inefficient, and subject to subjectivity, resulting in low repeatability and accuracy. Therefore, a method that can automatically assess the quality of preparations is urgently needed to improve both efficiency and quality. Summary of the Invention
[0005] In order to overcome the deficiencies of the prior art, one of the objectives of the present invention is to provide a method for accurately and automatically evaluating the quality of a prepared solution without the need for manual screening of culture dishes for which the prepared solution has been completed.
[0006] One of the purposes of the present invention is achieved by the following technical solution:
[0007] A method for detecting the quality of a prepared solution comprises the following steps:
[0008] Collecting an original image of the culture solution preparation, and reducing the width and height of the original image in equal proportion;
[0009] The background light intensity of the reduced image is estimated based on the Gaussian blur function to obtain a background image;
[0010] Subtract the background image from the reduced image to obtain the foreground image;
[0011] Normalizing the foreground image and binarizing the normalized foreground image to enhance the contrast and strengthen the features of the foreground image;
[0012] Connect the contour breakpoints of the binarized image based on the morphological closing operation of dilation and erosion to obtain the processed image;
[0013] The object contour is found in the processed image. A contour tracing algorithm based on the Sobel edge detection algorithm and chain code representation is used. By performing contour detection on the binary image, the boundary lines in the image can be extracted. The geometric characteristics of the image are used to extract and represent the object contour in the image. The Douglas-Peucker algorithm is used to eliminate burrs and noise in the contour curve to obtain the final image.
[0014] The Shoelace polygon area calculation formula based on the vector cross product is used to calculate the contour area of the final image. The droplet contours, bubbles and impurity contours are screened out according to their area sizes. Impurities and bubbles are distinguished according to their roundness and grayscale values. The droplet contour roundness and droplet height are calculated, and the presence of impurities and bubbles and droplet morphology quality evaluation indicators are given.
[0015] Furthermore, the width and height of the original image are proportionally reduced as follows: the size of the original image is (W, H), W is the width, H is the height, and the size of the compressed image is (W / k, H / k), where k is adjusted according to the image size and processing efficiency.
[0016] Furthermore, the background light intensity of the reduced image is estimated based on the Gaussian blur function to obtain the background image. Specifically, the Gaussian blur function is used to generate a weight matrix, and its formula is as follows:
[0017]
[0018] Among them, x, y are the relative positions of the pixel point and the center point. The values of x and y are related to the Gaussian kernel. The size of the Gaussian kernel (Size(bx, by)) is a two-dimensional matrix. bx and by are the width and height of the Gaussian kernel respectively. The value range of x is arrive The value range of y is an integer between arrive An integer between , σ is the standard deviation, σ determines the degree of blur, and σ is automatically calculated based on the Gaussian kernel size.
[0019] Furthermore, the foreground image is normalized as follows:
[0020]
[0021] Where src(x,y) is the pixel value of the fourth image, max_src and min_src are the minimum and maximum pixel values of the foreground image, max_dst and min_dst are the minimum and maximum values of the target range, and dst(x,y) is the pixel value of the normalized image.
[0022] Furthermore, the normalized foreground image is binarized as follows:
[0023]
[0024] Among them, dst(x,y) is the pixel value of the normalized image, and dst2(x,y) is the pixel value of the binarized image.
[0025] Furthermore, the closing operation is specifically as follows:
[0026]
[0027] Among them, A is the processed image, B is the structural element, that is, the convolution kernel, and A·B is the closing operation of image A under the structural element B. represents the expansion operation, Represents an erosion operation.
[0028] Furthermore, the Douglas-Peucker algorithm is used to eliminate burrs and noise from the contour curve as follows:
[0029] The formula for the Douglas-Peucker algorithm is
[0030]
[0031] Among them, (x1, y1) and (x2, y2) are the coordinates of the two endpoints, and (x, y) is the coordinate of the point to be measured.
[0032] Furthermore, the contour area of the final image is calculated as follows:
[0033]
[0034] Where A is the area, (x i ,y i ) represents the coordinates of the i-th vertex of the polygon, (x i+1 ,y i+1 ) represents the coordinates of the next vertex.
[0035] Furthermore, in the method of distinguishing impurities and bubbles based on roundness and grayscale value, the roundness calculation formula is:
[0036]
[0037] Among them, Area is the area of the contour and Perimeter is the perimeter of the contour.
[0038] Furthermore, in the calculation of the droplet contour roundness and droplet height, the droplet height formula is:
[0039]
[0040] Where V is the volume of the prepared liquid, A is the area of the droplet contour, and h is the height of the droplet.
[0041] Compared with the existing technology, the preparation liquid quality detection method of the present invention collects the original image of the culture solution preparation liquid, and proportionally reduces the width and height of the original image; estimates the background light intensity of the reduced image based on the Gaussian blur function to obtain a background image; subtracts the background image from the reduced image to obtain a foreground image; normalizes the foreground image, and binarizes the normalized foreground image to enhance the contrast and strengthen the features of the foreground image; connects the contour breakpoints of the binarized image based on the morphological closing operation of expansion and corrosion to obtain a processed image; searches for the object contour in the processed image, and uses contour tracking based on the Sobel edge detection algorithm and the chain code representation method. The algorithm can extract the boundary lines in the image by performing contour detection on the binary image, extract and represent the contours of objects in the image by using the geometric characteristics of the image, and eliminate the burrs and noise of the contour curve based on the Douglas-Peucker algorithm to obtain the final image; calculate the contour area of the final image based on the Shoelace polygon area calculation formula of the vector cross product, filter out the droplet contours, bubbles and impurity contours according to the area size, distinguish impurities and bubbles according to the roundness and grayscale value, calculate the droplet contour roundness and droplet height, and provide the presence of impurities and bubbles and droplet morphology quality evaluation indicators. It can accurately and automatically evaluate the quality of the prepared liquid without the need for manual screening of the prepared culture dishes. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of the method for testing the quality of the prepared solution of the present invention;
[0043] Figure 2 is the original image of the prepared solution;
[0044] Figure 3 is the reduced image;
[0045] Figure 4 is the background image;
[0046] Figure 5 is the foreground image;
[0047] Figure 6 is the normalized image;
[0048] Figure 7 is the image after binarization processing;
[0049] Figure 8 To process images;
[0050] Figure 9 The object contour image is extracted and represented;
[0051] Figure 10 This is an image of a droplet with bubbles;
[0052] Figure 11 This is an image of a droplet with impurities. DETAILED DESCRIPTION
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0054] It should be noted that when a component is referred to as being "fixed to" another component, it may be directly on the other component or there may be another intermediate component through which it is fixed. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may be another intermediate component at the same time. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be another intermediate component at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0056] See also Figure 1 The present invention provides a method for detecting the quality of a prepared solution, comprising the following steps:
[0057] Collecting an original image of the culture solution preparation, and reducing the width and height of the original image in equal proportion;
[0058] The background light intensity of the reduced image is estimated based on the Gaussian blur function to obtain a background image;
[0059] Subtract the background image from the reduced image to obtain the foreground image;
[0060] Normalizing the foreground image and binarizing the normalized foreground image to enhance the contrast and strengthen the features of the foreground image;
[0061] Connect the contour breakpoints of the binarized image based on the morphological closing operation of dilation and erosion to obtain the processed image;
[0062] The object contour is found in the processed image. A contour tracing algorithm based on the Sobel edge detection algorithm and chain code representation is used. By performing contour detection on the binary image, the boundary lines in the image can be extracted. The geometric characteristics of the image are used to extract and represent the object contour in the image. The Douglas-Peucker algorithm is used to eliminate burrs and noise in the contour curve to obtain the final image.
[0063] The Shoelace polygon area calculation formula based on the vector cross product is used to calculate the contour area of the final image. The droplet contours, bubbles and impurity contours are screened out according to their area sizes. Impurities and bubbles are distinguished according to their roundness and grayscale values. The droplet contour roundness and droplet height are calculated, and the presence of impurities and bubbles and droplet morphology quality evaluation indicators are given.
[0064] When the method for detecting the quality of prepared liquid of the present invention is specifically implemented, the liquid is prepared first.
[0065] The specific process of preparing the solution is as follows:
[0066] The pipetting arm draws up a volume V of culture fluid and a sufficient amount of mineral oil, the culture dish is moved to the sample loading position (x1, y1) via the stage, and the pipetting arm prepares the culture fluid to the designated position of the culture dish.
[0067] The specific steps for collecting the original image of the culture solution are as follows: according to the position of the culture dish, the stage transmission device corresponds to the shooting position (x2, y2), and the microscope camera is used to focus and shoot the droplet of the culture solution to obtain the original image, such as Figure 2 As shown, here, in order to distinguish it from subsequent images, the original image is called the first image. There is a positional relationship (Δx, Δy) between the loading position and the shooting position of the stage. The values of Δx and Δy are determined by the actual transmission distance of the instrument. The positional relationship between the loading position and the shooting position is
[0068] x2=x1+Δx
[0069] y2=y1+Δy
[0070] The purpose of proportionally reducing the width and height of the original image is to improve the image processing efficiency. Specifically, the width and height of the original image are reduced proportionally as follows: the captured droplet image is compressed to obtain a compressed image, such as Figure 3 As shown in the figure, the compressed image is called the second image. The compression process is as follows: the width and height of the original image are reduced by a factor k. The dimensions of the first image are (W, H), where W is the width and H is the height. The compressed image dimensions are (W / k, H / k). k is adjusted based on the image size and processing efficiency.
[0071] Due to the influence of factors such as external light intensity and system position deviation, the light intensity of the droplet image may be uneven, and the droplet image needs to be processed for uniform light intensity. The uniform light intensity processing includes generating a background image and obtaining a foreground image through the background image.
[0072] Specifically: the background image is obtained by estimating the background light intensity through Gaussian blur, such as Figure 4 As shown, it is called the third image.
[0073] The Gaussian blur function is used to generate a weight matrix (convolution kernel), and its formula is as follows:
[0074]
[0075] Where: x, y are the relative positions of the pixel and the center point. The values of x and y are related to the Gaussian kernel. The size of the Gaussian kernel (Size(bx, by)) is a two-dimensional matrix, bx and by are the width and height of the Gaussian kernel respectively, and the value range of x is arrive The value range of y is an integer between arrive To improve processing efficiency, a larger Gaussian kernel is needed. The standard deviation σ determines the degree of blur and is automatically calculated based on the Gaussian kernel size.
[0076] Original image minus background image: Subtract the background image (third image) with background light intensity from the compressed image (second image) to obtain the foreground image (fourth image), as shown in the following example: Figure 5 shown.
[0077] The foreground image is contrast enhanced, feature strengthened, normalized and binarized:
[0078] (1) Perform normalization on the fourth image to obtain a normalized image, which is called the fifth image. Figure 6 As shown;
[0079]
[0080] Where src(x,y) is the pixel value of the foreground image (the fourth image). max_src and min_src are the minimum and maximum pixel values of the fourth image. max_dst and min_dst are the minimum and maximum values of the destination range. dst(x,y) is the normalized pixel value of the fifth image.
[0081] (2) Binarization is performed on the fifth image. The image after binarization is called the sixth image. Figure 7 As shown;
[0082]
[0083] Wherein, dst(x,y) is the fifth image, and threshold is the set threshold.
[0084] In the sixth image, the outlines of droplets, bubbles, impurities, etc. may have breakpoints. The closing operation in the morphological operation is used to connect the breakpoints to obtain the processed image, such as Figure 8 As shown, it is called the seventh image, and the closing operation is a combination of dilation and erosion.
[0085]
[0086] Where A is the sixth image. B is the structural element, i.e., the convolution kernel. A·B is the closing operation of image A under the structural element B. represents the expansion operation, Represents an erosion operation.
[0087] Find contours and eliminate burrs and noise
[0088] The object contour search for the processed image is as follows: the object contour search is performed on the seventh image, and the contour tracking algorithm based on the Sobel edge detection algorithm and the chain code representation is used. By performing contour detection on the binary image, the boundary line in the image can be extracted, and the geometric characteristics of the image are used to extract and represent the object contour in the image, such as Figure 9 shown.
[0089] The Douglas-Peucker algorithm is used to eliminate burrs and noise from the contour curve and obtain the final image. The formula of the Douglas-Peucker algorithm is:
[0090]
[0091] Among them, (x1, y1) and (x2, y2) are the coordinates of the two endpoints, and (x, y) is the coordinate of the point to be measured.
[0092] Screen droplets, bubbles, and impurities based on their characteristics, and provide indicators for evaluating the quality of the prepared solution, such as the presence of impurities and bubbles, and the quality of the droplet shape (roundness and height). Specific indicators are as follows:
[0093] Calculate the contour area using the Shoelace polygon area calculation formula based on the vector cross product:
[0094]
[0095] Among them, (x i ,y i ) represents the coordinates of the i-th vertex of the polygon, (x i+1 ,y i+1 ) represents the coordinates of the next vertex.
[0096] First, the outlines of droplets, bubbles, and impurities are screened out based on their area size. Then, impurities and bubbles are distinguished based on their roundness and grayscale value. Figure 10 The image of the droplet with bubbles, the white circles are marked as identified bubbles; Figure 11 This is an image of a droplet with impurities. The white rectangle marks the identified impurity. The droplet contour roundness and height are calculated, providing indicators related to droplet quality assessment, such as the presence of impurities and bubbles, and the quality of the droplet shape (roundness and height).
[0097] Roundness calculation formula:
[0098]
[0099] Among them, Area is the area of the contour and Perimeter is the perimeter of the contour.
[0100] Droplet height calculation formula:
[0101]
[0102] Wherein, V is the volume of the prepared solution in step 1, A is the area of the droplet contour, and h is the height of the droplet.
[0103] The prepared liquid quality detection method of the present invention automatically provides evaluation indicators, greatly shortening the time for prepared liquid quality evaluation. It eliminates the need to wait for manual microscopic observation, reducing labor costs, and can process a large number of samples immediately or in batches, significantly improving work efficiency. Manual observation is easily affected by factors such as subjective judgment, fatigue, and distraction, while automated evaluation is based on preset algorithms and standards, reducing errors caused by human factors. The image processing speed is fast, providing real-time feedback on the prepared liquid quality. Furthermore, the processor performance requirements are relatively low, reducing the overall cost and energy consumption of the system while ensuring processing speed. The prepared liquid quality is comprehensively evaluated through quantitative indicators such as droplet area, droplet height, and the identification of bubbles and impurities, making the prepared liquid results more accurate and comprehensive.
[0104] The above embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patented invention. It should be noted that those skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention. These variations and improvements are equivalent modifications and improvements to the above embodiments based on the essential technology of the present invention and fall within the scope of protection of the present invention.
Claims
1. A method for detecting the quality of a prepared solution, characterized in that: The following steps are involved: Collecting an original image of the culture solution preparation, and reducing the width and height of the original image in equal proportion; The background light intensity of the reduced image is estimated based on the Gaussian blur function to obtain a background image; Subtract the background image from the reduced image to obtain the foreground image; Normalizing the foreground image and binarizing the normalized foreground image to enhance the contrast and strengthen the features of the foreground image; Connect the contour breakpoints of the binarized image based on the morphological closing operation of dilation and erosion to obtain the processed image; The object contour is found in the processed image. A contour tracing algorithm based on the Sobel edge detection algorithm and chain code representation is used. By performing contour detection on the binary image, the boundary lines in the image can be extracted. The geometric characteristics of the image are used to extract and represent the object contour in the image. The Douglas-Peucker algorithm is used to eliminate burrs and noise in the contour curve to obtain the final image. The Shoelace polygon area calculation formula based on the vector cross product is used to calculate the contour area of the final image. The droplet contours, bubbles and impurity contours are screened out according to their area sizes. Impurities and bubbles are distinguished according to their roundness and grayscale values. The droplet contour roundness and droplet height are calculated, and the presence of impurities and bubbles and droplet morphology quality evaluation indicators are given.
2. The method for detecting the quality of the prepared solution according to claim 1, wherein: The specific method of proportionally reducing the width and height of the original image is as follows: the size of the original image is (W, H), W is the width, H is the height, and the size of the compressed image is (W / k, H / k), where k is adjusted according to the image size and processing efficiency.
3. The method for detecting the quality of the prepared solution according to claim 1, wherein: The background light intensity of the reduced image is estimated based on the Gaussian blur function to obtain the background image. Specifically, the Gaussian blur function is used to generate a weight matrix, and its formula is as follows: Among them, x, y are the relative positions of the pixel point and the center point. The values of x and y are related to the Gaussian kernel. The size of the Gaussian kernel (Size(bx, by)) is a two-dimensional matrix. bx and by are the width and height of the Gaussian kernel respectively. The value range of x is arrive The value range of y is an integer between arrive An integer between , σ is the standard deviation, σ determines the degree of blur, and σ is automatically calculated based on the Gaussian kernel size.
4. The method for detecting the quality of the prepared solution according to claim 1, wherein: The normalization process of the foreground image is as follows: Where src(x,y) is the pixel value of the fourth image, max_src and min_src are the minimum and maximum pixel values of the foreground image, max_dst and min_dst are the minimum and maximum values of the target range, and dst(x,y) is the pixel value of the normalized image.
5. The method for detecting the quality of the prepared solution according to claim 1, wherein: The specific binarization process of the normalized foreground image is as follows: Among them, dst(x,y) is the pixel value of the normalized image, and dst2(x,y) is the pixel value of the binarized image.
6. The method for detecting the quality of the prepared solution according to claim 1, wherein: The closing operation is as follows: Among them, A is the processed image, B is the structural element, that is, the convolution kernel, and A·B is the closing operation of image A under the structural element B. represents the expansion operation, Represents an erosion operation.
7. The method for detecting the quality of the prepared solution according to claim 1, wherein: The method of eliminating burrs and noise of the contour curve based on the Douglas-Peucker algorithm is as follows: The formula for the Douglas-Peucker algorithm is Among them, (x1, y1) and (x2, y2) are the coordinates of the two endpoints, and (x, y) is the coordinate of the point to be measured.
8. The method for detecting the quality of the prepared solution according to claim 1, wherein: The calculation of the contour area of the final image is specifically as follows: Where A is the area, (x i ,y i ) represents the coordinates of the i-th vertex of the polygon, (x i+1 ,y i+1 ) represents the coordinates of the next vertex.
9. The method for detecting the quality of the prepared solution according to claim 1, wherein: In the above method of distinguishing impurities and bubbles based on roundness and grayscale value, the roundness calculation formula is: Among them, Area is the area of the contour and Perimeter is the perimeter of the contour.
10. The method for detecting the quality of the prepared solution according to claim 1, wherein: In the calculation of the droplet contour roundness and droplet height, the droplet height formula is: Where V is the volume of the prepared liquid, A is the area of the droplet contour, and h is the height of the droplet.