Blood smear device and method for clinical laboratory
By segmenting and reconstructing the stained images of blood smears, identifying the overlap and gaps of blood cells, and determining the density distribution characteristics, the accuracy of blood smear detection is solved under complex interference, and the accuracy of detection is improved.
Patent Information
- Application Number
- CN202510390815.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing blood smear uniformity detection technology is difficult to accurately identify the distribution of blood cells under complex interference factors, resulting in insufficient detection accuracy.
By collecting stained images of blood smears, segmenting the clustered areas and sparse areas, determining the edge characteristics of blood cells, performing overlap analysis and gap reconstruction, determining the density distribution characteristics, and realizing the uniformity detection of blood smears.
Accurate identification of blood cell distribution under complex interference factors improves the accuracy of blood smear uniformity detection.
Smart Images

Figure CN120293968A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of blood detection, and more specifically, to a blood smear device and method for use in a clinical laboratory. Background Art
[0002] Blood detection is a medical detection method that extracts an individual's blood sample and analyzes it to understand the composition, function, and health status of the blood. It is also an important tool for diagnosing and monitoring many diseases, evaluating health status, and formulating treatment plans.
[0003] The blood smear for use in a clinical laboratory is a sample smear used by the clinical laboratory to examine the cell components in a blood sample. By evenly smearing the blood sample on a glass slide and then undergoing a fixation and staining process, a thin blood smear that can be observed under a microscope is made. In the existing blood smear uniformity detection technology, manual inspection is carried out through the traditional microscope inspection method, or the automated image analysis method uses computer vision technology to automatically analyze the entire smear image, so as to realize the detection of the uniformity of the blood smear. However, under complex interference factors such as the mixing of blood cells and the background area and the local overlap of blood cells, the local distribution of blood cells will be ignored and it is not easy to judge. Therefore, how to accurately identify the distribution of blood cells under complex interference factors, so as to improve the accuracy of blood smear uniformity detection has become a difficult problem faced by the industry. Summary of the Invention
[0004] The present application provides a blood smear device and method for use in a clinical laboratory, which can accurately identify the distribution of blood cells under complex interference factors, thereby improving the accuracy of blood smear uniformity detection.
[0005] In a first aspect, the present application provides a blood smear detection method for use in a clinical laboratory, including the following steps: Collect a stained image of the blood smear, and segment the aggregation area and the sparse area of blood cells in the blood smear from the stained image; Determine the edge features of each blood cell in the stained image, and perform overlapping analysis on the overlapping blood cells in the aggregation area based on the edge features of the blood cells in the aggregation area to obtain the overlapping influence area of the blood cells in the aggregation area; Reconstruct the gaps between each blood cell in the sparse area based on the edge features of the blood cells in the sparse area to obtain the gap reconstruction area of the blood cells in the sparse area; Determine the density distribution characteristics of blood cells in the stained image according to the overlapping influence area and the gap reconstruction area; Perform uniformity detection on the blood smear according to the density distribution characteristics.
[0006] In some embodiments, segmenting the aggregation region and the sparse region of blood cells in the blood smear from the stained image specifically includes: Isolate the main detection surface from the stained image; Determine the segmentation threshold of the main detection surface; Segment the main detection surface based on the segmentation threshold to obtain the aggregation region and the sparse region of blood cells in the blood smear.
[0007] In some embodiments, determining the edge features of each blood cell in the stained image specifically includes: Determine the radius of each blood cell in the stained image; Determine the curvature of each blood cell in the stained image; Take both the radius and the curvature of each blood cell as the edge features of the corresponding blood cell in the stained image.
[0008] In some embodiments, performing an overlap analysis on the overlapping blood cells in the aggregation region based on the edge features of the blood cells in the aggregation region to obtain the overlap influence region of the blood cells in the aggregation region specifically includes: Divide the aggregation region to obtain multiple distribution blocks of blood cells; Select one distribution block as the selected distribution block, and determine multiple edge points and multiple associated points of the selected distribution block according to the edge features of the blood cells in the aggregation region; Determine the overlap radius of the selected distribution block according to all the associated points and all the edge points; Continue to determine the overlap radii of the remaining distribution blocks; Determine multiple overlap influence ranges of the aggregation region based on all the overlap radii; Take the region composed of all the overlap influence ranges as the overlap influence region of the overlapping blood cells in the aggregation region.
[0009] In some embodiments, reconstructing the gaps between the blood cells in the sparse region based on the edge features of the blood cells in the sparse region to obtain the gap reconstruction region of the blood cells in the sparse region specifically includes: Determine the initial gaps between the blood cells in the sparse region according to the edge features of the blood cells in the sparse region; Determine the boundary points of each region in the sparse region; Determine the gap constraint of the sparse region according to all the boundary points; Reconstruct all the initial gaps based on the gap constraint to obtain the gap reconstruction region of the blood cell distribution in the sparse region.
[0010] In some embodiments, determining the density distribution characteristics of blood cells in the stained image according to the overlapping influence area and the gap reconstruction area specifically includes: Determining the overlapping density of the overlapping influence area; Determining the local sparsity of the gap reconstruction area; Taking the set composed of the overlapping density and the local sparsity as the density distribution characteristics of blood cells in the stained image.
[0011] In some embodiments, the uniformity detection of the blood smear according to the density distribution characteristics specifically includes: Obtaining the staining time for staining the blood smear; Determining the uniformity threshold of the blood stained smear; Determining the uniformity index of the blood stained picture according to the staining time and the density distribution characteristics; Comparing the uniformity threshold with the uniformity index; If the uniformity index is less than the uniformity threshold, marking the uniformity of the blood smear as non-uniform; If the uniformity index is greater than or equal to the uniformity threshold, marking the uniformity of the blood smear as uniform.
[0012] In a second aspect, the present application provides a blood smear device for a clinical laboratory. The device includes a blood smear detection unit, and the blood smear detection unit includes: An acquisition module, configured to acquire a stained image of a blood smear, and segment an aggregation area and a sparse area of blood cells in the blood smear from the stained image; A processing module, configured to determine the edge features of each blood cell in the stained image, perform overlapping analysis on the overlapping blood cells in the aggregation area based on the edge features of the blood cells in the aggregation area, and obtain an overlapping influence area of the blood cells in the aggregation area; The processing module is further configured to reconstruct the gaps between the blood cells in the sparse area based on the edge features of the blood cells in the sparse area, and obtain a gap reconstruction area of the blood cells in the sparse area; The processing module is further configured to determine the density distribution characteristics of blood cells in the stained image according to the overlapping influence area and the gap reconstruction area; An execution module, configured to perform uniformity detection on the blood smear according to the density distribution characteristics.
[0013] In a third aspect, the present application provides a computer device, which includes a memory and a processor. The memory stores code, and the processor is configured to obtain the code and execute the above-mentioned blood smear detection method for a clinical laboratory.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the above blood smear detection method for a clinical laboratory.
[0015] The technical solutions provided by the disclosed embodiments of the present application have the following beneficial effects: In the blood smear device and method for a clinical laboratory provided by the present application, first, a stained image of a blood smear is collected, an aggregation region and a sparse region of blood cells in the blood smear are segmented from the stained image, edge features of each blood cell in the stained image are determined, overlapping analysis is performed on the overlapping blood cells in the aggregation region based on the edge features of the blood cells in the aggregation region to obtain an overlapping influence region of the blood cells in the aggregation region, the gaps between the blood cells in the sparse region are reconstructed based on the edge features of the blood cells in the sparse region to obtain a gap reconstruction region of the blood cells in the sparse region, the density distribution characteristics of the blood cells in the stained image are determined according to the overlapping influence region and the gap reconstruction region, and the uniformity of the blood smear is detected based on the density distribution characteristics. The above solution can accurately identify the distribution of blood cells under complex interference factors, thereby improving the accuracy of blood smear uniformity detection.
[0016] Thus, in the process of the blood smear detection method for a clinical laboratory of the present application, first, an aggregation region and a sparse region of blood cells in the blood smear are segmented from the stained image, edge features of each blood cell in the stained image are determined, overlapping analysis is performed on the overlapping blood cells in the aggregation region based on the edge features of the blood cells in the aggregation region to obtain the range of influence of the overlapping blood cells on the remaining blood cells in the aggregation region, and then the overlapping influence region of the blood cells in the aggregation region is determined to determine the local overlapping situation of the blood cells in the aggregation region; secondly, the gaps between the blood cells in the sparse region are reconstructed based on the edge features of the blood cells in the sparse region to obtain a region where the blood cells do not contact each other and the blood cell boundaries are not interfered by the gaps in the sparse region, and then the gap reconstruction region of the blood cells in the sparse region is determined, and the local distribution situation of the blood cells in the sparse region can be obtained from the gap reconstruction region, and then the density distribution characteristics of the blood cells in the stained image are determined according to the overlapping influence region and the gap reconstruction region, and the uniformity of the blood smear is detected based on the density distribution characteristics. The above solution can accurately identify the distribution of blood cells under complex interference factors, thereby improving the accuracy of blood smear uniformity detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is an exemplary flowchart of a blood smear detection method for a clinical laboratory according to some embodiments of the present application; Figure 2 is an exemplary flowchart of the division of a detection block according to some embodiments of the present application; Figure 3 is an exemplary flowchart of determining edge features according to some embodiments of the present application; Figure 4 is a schematic structural diagram of a blood smear detection unit according to some embodiments of the present application; Figure 5 is a schematic structural diagram of a computer device for implementing the blood smear detection method for a clinical laboratory according to some embodiments of the present application. Detailed implementation manners
[0018] To better understand the above technical solutions, the above technical solutions will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementation manners. Refer to Figure 1 , this figure is an exemplary flowchart of a blood smear detection method for a clinical laboratory according to some embodiments of the present application. The blood smear detection method 100 for a clinical laboratory mainly includes the following steps: In step 101, a stained image of a blood smear is collected, and an aggregation area and a sparse area of blood cells in the blood smear are segmented from the stained image.
[0019] Specifically, a staining agent (such as Wright stain) is dropped onto the blood smear, and after standing for 10 minutes, the excess stain is rinsed off with mild distilled water. The rinsed blood smear is air-dried naturally, and the surface of the stained blood smear is scanned by an automatic microscope imaging system (such as a full-automatic scanning microscope). The collected image data is uploaded to image analysis software (such as ImageJ) to obtain the stained image of the blood smear; in other embodiments, other methods may also be used for acquisition, which will not be elaborated here.
[0020] In some embodiments, the segmentation of the aggregation area and the sparse area of blood cells in the blood smear from the stained image can be implemented by the following steps: Separate the main detection surface from the stained image; Determine the segmentation threshold of the main detection surface; Based on the segmentation threshold, segment the main detection surface to obtain the aggregation area and the sparse area of blood cells in the blood smear.
[0021] In specific implementation, the main detection surface can be separated from the stained image in the following way: Each pixel in the stained image is converted into point cloud data in three-dimensional space (i.e., including the horizontal axis coordinate, the vertical axis coordinate, and the vertical axis coordinate) through the three-dimensional reconstruction technology based on depth information in the prior art (such as the image point cloud conversion based on an RGB-D camera). A point cloud data is selected as the selected point cloud data. The mean value of the maximum value and the minimum value of the point cloud data on the vertical axis is used as the new vertical axis coordinate of the selected point cloud data. Then, in combination with the horizontal axis coordinate and the vertical axis coordinate of the selected point cloud data, the selected point cloud data is projected onto the XOZ plane. The points projected onto the XOZ plane are used as projection points. The remaining point cloud data is continuously projected onto the XOZ plane to obtain multiple projection points. Among them, the projection points are the points obtained by projecting the point cloud data along the positive direction of the vertical axis onto the XOZ plane. All the projection points on the cell edge are fitted through a data modeling processing tool (such as Matlab), and the fitted curve is used as the fitted curve of the blood cell boundary in the stained image. A projection point is selected as the selected projection point. The distance from the selected projection point to the fitted curve is calculated through the function processing module in Matlab. If the distance is less than 0.1 or greater than 0.2, the selected projection point is deleted. If the distance is greater than 0.1 and less than 0.2, the selected projection point is retained. The remaining projection points are continuously judged. All the retained projection points after judgment are subjected to plane modeling through Matlab, and the plane obtained by the plane modeling is used as the main detection surface separated from the stained image. Among them, the main detection surface is a plane that reflects the overall distribution law of blood cells and retains the main structure in the stained image. In other embodiments, it can also be determined in other ways, which are not limited here.
[0022] In specific implementation, the segmentation threshold of the main detection surface can be determined in the following way: The logarithm operation with base 10 is performed on the maximum abscissa among all the projection points on the main detection surface to obtain the first value. The logarithm operation with base 10 is performed on the maximum ordinate among all the projection points on the main detection surface to obtain the second value. The first value and the second value are multiplied. Based on the multiplied value, the main detection surface is evenly divided into multiple detection blocks, and the total number of detection blocks is the multiplied value. For example Figure 2 as shown; The total number of projection points is divided by the total number of detection blocks, and the obtained value is used as the segmentation threshold of the main detection surface. Among them, the segmentation threshold is used to segment the cell distribution in the picture. In other embodiments, it can also be determined in other ways, which are not limited here.
[0023] During specific implementation, the main detection surface is segmented based on the segmentation threshold to obtain the aggregation region and the sparse region of blood cells in the blood smear, which can be implemented in the following manner: Select a detection block from the main detection surface as the selected detection block, compare the total number of projection points in the selected detection block with the segmentation threshold. If the total number of projection points in the selected detection block is less than the segmentation threshold, the selected detection block is regarded as a sparse block; if the total number of projection points in the selected detection block is greater than or equal to the segmentation threshold, the selected detection block is regarded as a dense block. Continue to judge the remaining detection blocks to obtain multiple sparse blocks and multiple dense blocks. The region composed of all dense blocks is used as the aggregation region of blood cells in the blood smear, and the region composed of all sparse blocks is used as the sparse region of blood cells in the blood smear; in other embodiments, other methods can also be used to determine, which is not limited here.
[0024] It should be noted that the aggregation region in this application is the region where blood cells are densely distributed in the stained image; the sparse region is the region where the intervals between blood cells in the stained image are large and the distribution is scattered; the aggregation region and the sparse region are used to accurately analyze blood cells with different distribution situations, facilitating the identification of the basic characteristics of blood cells.
[0025] In step 102, determine the edge features of each blood cell in the stained image, and perform overlapping analysis on the overlapping blood cells in the aggregation region based on the edge features of the blood cells in the aggregation region to obtain the overlapping influence region of the blood cells in the aggregation region.
[0026] During specific implementation, referring to Figure 3 , the edge features of each blood cell in the stained image can be determined by the following steps: In step 1021, determine the radius of each blood cell in the stained image; In step 1022, determine the curvature of each blood cell in the stained image; In step 1023, both the radius and the curvature of each blood cell are used as the edge features of the corresponding blood cell in the stained image.
[0027] In specific implementation, the radii of the blood cells in the stained image can be determined in the following manner, that is: use an edge detection algorithm (such as the Canny algorithm) to detect the contours of the blood cells in the stained image, and then fit the edges of the cells into approximate circles, and use the Hough circle transform to obtain the center coordinates and radii of the blood cells; the curvatures of the blood cells in the stained image can be determined in the following manner, that is: use an edge detection algorithm (such as the Sobel algorithm) to extract the boundary points of the blood cells, obtain the coordinate sequences of the blood cells, and calculate the coordinate sequences of the blood cells by the finite element difference method to obtain the curvatures corresponding to the blood cells; in other embodiments, other methods can also be used for determination, which are not limited here.
[0028] It should be noted that the edge features in this application refer to the geometric features of the edges of the blood cells obtained after a brief analysis of the clearly stained blood cells in the stained image, which are used to identify blood cells at the boundaries of the regions with blurred or overlapping staining, and are convenient for analyzing the local smear uniformity of blood cells in different distribution regions.
[0029] In some embodiments, the overlapping analysis of the overlapping blood cells in the aggregation region based on the edge features of the blood cells in the aggregation region to obtain the overlapping influence area of the blood cells in the aggregation region can be implemented by the following steps: Divide the aggregation region to obtain multiple distribution blocks of blood cells; Select a distribution block as the selected distribution block, and determine multiple edge points and multiple associated points of the selected distribution block according to the edge features of the blood cells in the aggregation region; Determine the overlapping radius of the selected distribution block according to all the associated points and all the edge points; Continue to determine the overlapping radii of the remaining distribution blocks; Determine multiple overlapping influence ranges of the aggregation region based on all the overlapping radii; Take the region composed of all the overlapping influence ranges as the overlapping influence area of the overlapping blood cells in the aggregation region.
[0030] In specific implementation, the aggregation area is divided to obtain multiple distribution blocks of blood cells, which can be achieved in the following manner, namely: performing a logarithm operation with base 2 on the maximum horizontal coordinate of all projection points in the aggregation area to obtain a first value, performing a logarithm operation with base 2 on the maximum vertical coordinate of all projection points in the aggregation area to obtain a second value, multiplying the first value by the second value, and based on the multiplied value, evenly dividing the aggregation area into multiple distribution blocks, the total number of distribution blocks is the multiplied value, and multiple distribution blocks of blood cells are obtained, wherein the distribution blocks are area blocks obtained after evenly dividing the aggregation area; in other embodiments, other methods can also be used to determine, which are not limited here.
[0031] In a specific implementation, the following method can be used to determine the multiple edge points and multiple associated points of the selected distribution block according to the edge characteristics of the blood cells in the aggregation area, namely: select any two projection points from the selected distribution block as the selected two projection points, add the square of the difference between the horizontal coordinates of the two selected projection points and the square of the difference between the vertical coordinates of the two selected projection points, add the value obtained by the addition to the square of the difference between the vertical coordinates of the two selected projection points, then perform a square root operation on the value obtained by the addition, divide the value obtained by the square root operation by 2, use the value obtained by the division as the radius, draw a circle with the midpoint of the two selected projection points as the center and the above radius, and use the range included in the circle as the associated range of the two selected projection points, wherein the associated range is the range in which the coordinates of any two pixels in the selected distribution block are associated, and detect the associated range. If the associated range includes any multiple projection points remaining in the selected distribution block, all projection points within the associated range (including the boundary of the circular range) are squared. For the associated points of the selected distribution block, if the associated range does not include any remaining projection points in the selected distribution block, the two selected projection points are both used as potential edge points of the selected distribution block, and the remaining multiple associated points and multiple potential edge points in the selected distribution block are continued to be determined, and the repeated associated points in all associated points are removed, and all the associated points after deduplication are used as the associated points of the selected distribution block, and all the potential edge points are curve fitted by Matlab, and the curvature of each potential edge point in the fitted curve is calculated, and the potential edge points outside the value range of the curvature in the edge characteristics of the blood cells are removed from all the potential edge points, and the remaining potential edge points are all used as edge points of the selected distribution block, wherein the associated points refer to the points with strong association in the selected distribution block, the potential edge points are the points in the selected distribution block that are not associated and are affected by the background, and the edge points are the points in the selected distribution block that are not associated and have the background interference removed; in other embodiments, other methods can also be used for determination, which are not limited here.
[0032] In specific implementation, the overlapping radius of the selected distribution block can be determined based on all the associated points and all the edge points in the following way: calculate the area of the region formed by connecting all the associated points through the plane processing module in Matlab. Take the maximum abscissa value among all the associated points and all the edge points as the upper limit of the horizontal axis, the minimum abscissa value as the lower limit of the horizontal axis, the maximum ordinate value as the upper limit of the vertical axis, and the minimum ordinate value as the lower limit of the vertical axis. Integrate the volume element along the vertical axis in combination with all the above upper and lower limits, divide the value obtained from the integration operation by the above area, and then divide the value obtained from the division by the minimum vertical coordinate to obtain the first value. Integrate the volume element along the horizontal axis in combination with all the above upper limits, divide the value obtained from the integration operation by the above area, and then divide the value obtained from the division by the minimum vertical coordinate to obtain the second value. Take the first value as the abscissa of the centroid of the selected distribution block, take the second value as the ordinate of the centroid of the selected distribution block, and take the position formed by the abscissa and ordinate of the centroid as the centroid of the selected distribution block. Calculate the distances from the centroid of the selected distribution block to each edge point through the plane processing module in Matlab, and take the average of all the distances as the overlapping radius of the selected distribution block. Here, the overlapping radius represents the maximum straight-line distance when the blood cells in the selected distribution block overlap with the blood cells in the other distribution blocks. In other embodiments, other methods can also be used for determination, which are not limited here.
[0033] In specific implementation, the multiple overlapping influence ranges of the aggregation region can be determined based on all the overlapping radii in the following way: select a distribution block from the aggregation region as the selected distribution block, and select a distribution block other than the selected distribution block from the aggregation region as the comparison distribution block. Add the square of the difference between the abscissa of the centroid of the selected distribution block and the abscissa of the centroid of the comparison distribution block to the square of the difference between the ordinate of the centroid of the selected distribution block and the ordinate of the centroid of the comparison distribution block, then add the square of the difference between the vertical coordinate of the centroid of the selected distribution block and the vertical coordinate of the centroid of the comparison distribution block to the value obtained from the addition, and then perform a square root operation on the value obtained from the addition. Compare the value obtained from the square root operation with the sizes of the overlapping radii of the selected distribution block and the comparison distribution block. If the value obtained from the square root operation is less than the size of any of the above overlapping radii, then take the comparison distribution block as the overlapping influence block of the selected distribution block. Here, the overlapping influence block is the distribution block that overlaps with the selected distribution block. Continue to determine the multiple overlapping influence blocks of the selected distribution block in the aggregation region, take the regional range formed by all the overlapping influence blocks as the overlapping influence range of the selected distribution block, and continue to determine the overlapping influence ranges of the remaining distribution blocks in the aggregation region. In other embodiments, other methods can also be used for determination, which are not limited here.
[0034] It should be noted that the overlapping influence area in this application is the area where blood cells in a blood smear have an impact on the remaining blood cells when overlapping occurs during the smearing process. It can be used to analyze the local overlapping situation of blood cells at the smeared and stained blurred parts, facilitating the judgment of the smear uniformity of the blood smear in the dense area.
[0035] In step 103, based on the edge features of blood cells in the sparse area, the gaps between each blood cell in the sparse area are reconstructed to obtain the gap reconstruction area of blood cells in the sparse area.
[0036] In some embodiments, reconstructing the gaps between each blood cell in the sparse area based on the edge features of blood cells in the sparse area to obtain the gap reconstruction area of blood cells in the sparse area can be achieved by the following steps: Determine the initial gaps between each blood cell in the sparse area according to the edge features of blood cells in the sparse area; Determine the boundary points of each area in the sparse area; Determine the gap constraints of the sparse area according to all the boundary points; Based on the gap constraints, all the initial gaps are reconstructed to obtain the gap reconstruction area of the blood cell distribution in the sparse area.
[0037] Specifically, determining the initial gaps between each blood cell in the sparse area according to the edge features of blood cells in the sparse area can be achieved in the following way: Select any two blood cells in the sparse area as the selected two blood cells, initialize a gap model, use the edge features of the selected two blood cells as the constraint parameters of the gap model, and use the coordinate points of the selected two blood cells as the initialization parameters of the gap model. Then, obtain the gap between the selected two blood cells through the gap model. Among them, the gap model is a model of the gap established using machine learning algorithms (such as decision trees, neural networks, etc.). For example, the gap between the selected two blood cells = the edge features of the selected two blood cells * A + the coordinate points of the selected two blood cells * B, where A and B are weight coefficients, and A and B can be obtained by training the training set of the gaps between blood cells. Take this gap as the initial gap between the selected two blood cells in the sparse area, and continue to determine the initial gaps between the remaining any two blood cells in the sparse area. Among them, the initial gap refers to the initial spatial distance between blood cells before any optimization or adjustment. In other embodiments, it can also be determined in other ways, which are not limited here.
[0038] In specific implementation, the boundary points of each region in the sparse region can be determined in the following manner: taking the logarithm to the base 2 of the maximum abscissa among all the projection points in the sparse region to obtain a first value, taking the logarithm to the base 2 of the maximum ordinate among all the projection points in the sparse region to obtain a second value, multiplying the first value by the second value, and dividing the sparse region into multiple sparse blocks based on the multiplied value; selecting a sparse block as the selected sparse block, selecting any two projection points from the selected sparse block as the selected two projection points, adding the square of the difference between the abscissas of the selected two projection points and the square of the difference between the ordinates of the selected two projection points, adding the value obtained by the addition to the square of the difference between the vertical coordinates of the selected two projection points, then performing a square root operation on the value obtained by the addition, dividing the value obtained by the square root operation by 2, taking the value obtained by the division as the radius, using the midpoint of the selected two projection points as the center of the circle, and drawing a circle in combination with the above radius. If no remaining projection points in the selected sparse block are included within the circle, then both of the selected two projection points are used as potential edge points of the selected sparse block, continuing to determine the potential edge points of the remaining projection points in the selected distribution block, removing the potential edge points outside the range of the curvature value in the edge feature of the blood cell among all the potential boundary points to obtain multiple boundary points of the selected sparse block, and continuing to determine the boundary points of the remaining sparse blocks; in other embodiments, other methods can also be used for determination, which are not limited here.
[0039] In specific implementation, the gap constraint of the sparse region can be determined based on all the boundary points in the following manner: calculating the centroid of each region formed by all the boundary points corresponding to each sparse block and the block range through Matlab, selecting any two centroids from all the centroids as the selected two centroids, adding the square of the difference between the abscissas of the selected two centroids and the square of the difference between the ordinates of the selected two centroids, taking the square root of the value obtained by the addition, and taking the value obtained by the square root as the center distance between the two sparse blocks corresponding to the selected two centroids, where the center distance refers to the distance between the centroids of the two sparse blocks, and continuing to determine the center distances between the remaining centroids; subtracting the minimum blood cell radius in the edge feature from the maximum center distance among all the center distances, taking the value obtained by the subtraction as the maximum gap of the sparse region, subtracting the radius of the minimum blood cell in the edge feature from the minimum center distance among all the center distances, taking the value obtained by the subtraction as the minimum gap of the sparse region, and taking the set composed of the maximum gap and the minimum gap as the gap constraint of the sparse region, where the gap constraint represents the constraint on the range of the gap change between blood cells in the sparse region; in other embodiments, other methods can also be used for determination, which are not limited here.
[0040] In specific implementation, based on the gap constraint, all initial gaps are reconstructed to obtain the gap reconstruction region of the blood cell distribution in the sparse region, which can be implemented in the following manner: Select an initial gap as the selected initial gap, and judge the selected initial gap. If the selected initial gap is within the gap constraint, both sparse blocks where the two blood cells corresponding to the selected initial gap are located are regarded as pure distribution areas, where the pure distribution area refers to the distribution area of blood cells after noise removal in the blood picture; if the selected initial gap is not within the gap constraint, the initial gap is marked as an abnormal initial gap; continue to judge the remaining initial gaps to obtain multiple pure distribution areas and multiple abnormal initial gaps, and the region composed of all abnormal initial gaps is corrected by spline interpolation method (such as the least square method) to obtain a correction region, where the correction region is the region for repairing gaps in the sparse region, and the region composed of the correction region and the pure distribution area is used as the gap reconstruction region of the blood cell distribution in the sparse region; in other embodiments, other methods can also be used to determine it, which is not limited here.
[0041] It should be noted that the gap reconstruction region in this application refers to the region where blood cells do not touch each other and the boundaries of blood cells are not interfered by gaps, which is used to divide the mixed part of blood cells and gaps and analyze the accurate distribution of blood cells in the sparse region, so as to evaluate the uniformity or sparsity of blood cell distribution and determine the evenness of the blood smear.
[0042] In step 104, according to the overlapping influence region and the gap reconstruction region, the density distribution characteristics of blood cells in the stained image are determined.
[0043] In some embodiments, determining the density distribution characteristics of blood cells in the stained image according to the overlapping influence region and the gap reconstruction region can be implemented by the following steps: Determine the overlapping density of the overlapping influence region; Determine the local sparsity of the gap reconstruction region; The set composed of the overlapping density and the local sparsity is used as the density distribution characteristics of blood cells in the stained image.
[0044] When specifically implemented, the overlapping density of the overlapping influence region can be determined in the following manner: select an overlapping influence block from the overlapping influence region as the selected overlapping influence block, multiply the square of the overlapping radius of the selected overlapping influence block by pi, take the obtained value as the area occupied by blood cells in the selected overlapping influence block, divide this area by the area of the selected overlapping influence block, and take the obtained value as the overlapping degree of the selected overlapping influence block. Here, the overlapping degree is a parameter value describing the degree of overlap of blood cells in the overlapping influence block. Then, continue to determine the overlapping degrees of the remaining overlapping influence blocks; add up the areas occupied by blood cells in all overlapping influence blocks, divide the obtained value by the area of the overlapping influence region to obtain a first value, take the natural logarithm of the sum of all overlapping degrees, add the obtained logarithmic value to the first value, and take the obtained value as the overlapping density of the overlapping region. Here, the overlapping density is a parameter value describing the density of overlap between blood cells in the overlapping region; in other embodiments, it can also be determined by other methods, which are not limited here.
[0045] When specifically implemented, the local sparsity of the gap reconstruction region can be determined in the following manner: select a sparse block as the selected sparse block, calculate the distances between the centroid of the selected sparse block and each edge point of the selected sparse block through Matlab, multiply the square of the maximum distance among all distances by pi, take the obtained value as the area occupied by blood cells in the selected sparse block, and then continue to determine the areas occupied by blood cells in the remaining sparse blocks; add up the areas occupied by blood cells in all sparse blocks, divide the obtained value by the area of the gap reconstruction region, and take the obtained value as the local sparsity of the gap reconstruction region. Here, the local sparsity is a parameter value describing the local sparsity degree of blood cells in the sparse region; in other embodiments, it can also be determined by other methods, which are not limited here.
[0046] It should be noted that the density distribution feature in this application refers to the distribution pattern, density degree, and spacing law of blood cells in the smear, which is used to analyze the local distribution of blood cells and the mutual gaps between blood cells, facilitating the determination of the overall smear uniformity of the blood smear.
[0047] In step 105, the uniformity of the blood smear is detected based on the density distribution feature.
[0048] In some embodiments, the uniformity detection of the blood smear based on the density distribution feature can be implemented by the following steps: Obtain the staining time for staining the blood smear; Determine the uniformity threshold of the blood-stained smear; Determine the uniformity index of the blood staining picture according to the staining time and the density distribution characteristics; Compare the uniformity threshold with the uniformity index; If the uniformity index is less than the uniformity threshold, mark the uniformity of the blood smear as non-uniform; If the uniformity index is greater than or equal to the uniformity threshold, mark the uniformity of the blood smear as uniform; In specific implementation, monitor the staining process through a staining sensor and perform timing (starting from adding the staining agent to the blood smear) to obtain the staining time for staining the blood smear. The staining time is used to control the staining degree of each region in the blood sample to ensure that blood cells are clearly shown, thereby improving the detection efficiency of the uniformity of the blood smear. Determining the uniformity index of the blood staining picture according to the staining time and the density distribution characteristics can be achieved by the following method: subtract the overlapping density from the local sparse density in the density distribution characteristics, perform a logarithm operation with base 2 on the subtracted value, divide the value obtained from the logarithm operation by the staining time, and use the value obtained from the division as the uniformity index of the blood staining picture. The uniformity index is a parameter representing the smear uniformity degree of the blood smear and is used to predict the uniformity of the blood smear. In other embodiments, other methods can also be used for determination, which is not limited here.
[0049] It should be noted that the uniformity threshold in this application can be set according to the specific detection requirements of the blood smear. If it is necessary to quickly identify and locate the uniformity characteristics of the blood smear, the uniformity threshold can be set in a relatively high range, which can accelerate the detection process and avoid excessive attention to minor uniformity fluctuations at the same time. If high uniformity and strict control of blood cell distribution are required, the uniformity threshold can be set in a relatively low range to ensure that minor non-uniform distributions can be detected, thereby improving the detection accuracy. In other embodiments, for example, when external factors (such as environmental changes, image noise, etc.) affect the staining image, the uniformity threshold can be set in a relatively low range to improve the feasibility of the system temperature control strategy.
[0050] In addition, on the other hand of this application, in some embodiments, this application provides a blood smear device for a clinical laboratory. The device includes a blood smear detection unit. Refer to Figure 4 , this figure is a schematic structural diagram of the blood smear detection unit according to some embodiments of this application. The blood smear detection unit 400 includes: a collection module 401, a processing module 402, and an execution module 403, which are described as follows: Collection module 401. In this application, the acquisition module 401 is mainly used to collect the staining image of the blood smear and segment the aggregation area and sparse area of blood cells in the blood smear from the staining image; It should be noted that the processing module 402 in this application is further configured to determine the edge features of each blood cell in the stained image, perform overlapping analysis on the overlapping blood cells in the aggregation area based on the edge features of the blood cells in the aggregation area, and obtain the overlapping influence area of the blood cells in the aggregation area; In addition, it should be noted that the processing module 402 in this application is further configured to reconstruct the gaps between the blood cells in the sparse area based on the edge features of the blood cells in the sparse area, and obtain the gap reconstruction area of the blood cells in the sparse area; In addition, it should be noted that the processing module 402 in this application is further configured to determine the density distribution characteristics of the blood cells in the stained image according to the overlapping influence area and the gap reconstruction area; The execution module 403, in this application, the execution module 403 is mainly configured to perform uniformity detection on the blood smear according to the density distribution characteristics.
[0051] In addition, this application also provides a computer device, which includes a memory and a processor. The memory stores code, and the processor is configured to obtain the code and execute the above blood smear detection method for the inspection department.
[0052] In some embodiments, refer to Figure 5 This figure is a schematic structural diagram of a computer device for implementing the blood smear detection method for the inspection department according to some embodiments of this application. The blood smear detection method for the inspection department in the above embodiments can be implemented by Figure 5 The computer device shown. This computer device 500 includes at least one processor 501, a communication bus 502, a memory 503, and at least one communication interface 504.
[0053] The processor 501 can be a general-purpose central processing unit (CPU) or an application-specific integrated circuit (ASIC).
[0054] The communication bus 502 can be used to transmit information between the above components.
[0055] The memory 503 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or other types of dynamic storage devices that can store information and instructions. It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 503 can exist independently and be connected to the processor 501 through the communication bus 502. The memory 503 can also be integrated with the processor 501.
[0056] Among them, the memory 503 is used to store the program code for executing the solution of this application, and is controlled by the processor 501 to execute. The processor 501 is used to execute the program code stored in the memory 503. The program code can include one or more software modules. The methods used in the above embodiments can be implemented by one or more software modules in the program code in the processor 501 and the memory 503.
[0057] The communication interface 504 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0058] In a specific implementation, as an embodiment, the computer device can include multiple processors, and each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0059] The above computer device may be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device may be a desktop computer, a laptop computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of the present application do not limit the type of the computer device.
[0060] In addition, the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above blood smear detection method for a clinical laboratory is implemented.
[0061] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0062] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A blood smear detection method for a clinical laboratory, characterized in that, The steps include the following: Collect a stained image of a blood smear, and segment the aggregation area and the sparse area of blood cells in the blood smear from the stained image; Determine the edge features of each blood cell in the stained image, and perform overlapping analysis on the overlapping blood cells in the aggregation area based on the edge features of the blood cells in the aggregation area to obtain the overlapping influence area of the blood cells in the aggregation area; Reconstruct the gaps between the blood cells in the sparse area based on the edge features of the blood cells in the sparse area to obtain the gap reconstruction area of the blood cells in the sparse area; Determine the density distribution characteristics of the blood cells in the stained image according to the overlapping influence area and the gap reconstruction area; Perform uniformity detection on the blood smear according to the density distribution characteristics.
2. The method according to claim 1, characterized in that Specifically, segmenting the aggregation area and the sparse area of blood cells in the blood smear from the stained image includes: Separate the main detection surface from the stained image; Determine the segmentation threshold of the main detection surface; Segment the main detection surface based on the segmentation threshold to obtain the aggregation area and the sparse area of blood cells in the blood smear.
3. The method according to claim 1, wherein Specifically, determining the edge features of each blood cell in the stained image includes: Determine the radius of each blood cell in the stained image; Determine the curvature of each blood cell in the stained image; Take both the radius and the curvature of each blood cell as the edge features of the corresponding blood cell in the stained image.
4. The method according to claim 1, characterized in that Specifically, performing overlapping analysis on the overlapping blood cells in the aggregation area based on the edge features of the blood cells in the aggregation area to obtain the overlapping influence area of the blood cells in the aggregation area includes: Divide the aggregation area to obtain multiple distribution blocks of blood cells; Select one distribution block as the selected distribution block, and determine multiple edge points and multiple associated points of the selected distribution block according to the edge features of the blood cells in the aggregation area; Determine the overlapping radius of the selected distribution block according to all the associated points and all the edge points; Continue to determine the overlapping radii of the remaining distribution blocks; Determine multiple overlapping influence ranges of the aggregation area based on all the overlapping radii; Take the area composed of all the overlapping influence ranges as the overlapping influence area of the overlapping blood cells in the aggregation area.
5. The method according to claim 1, characterized in that Specifically, reconstructing the gaps between the blood cells in the sparse area based on the edge features of the blood cells in the sparse area to obtain the gap reconstruction area of the blood cells in the sparse area includes: Determine the initial gaps between the blood cells in the sparse area according to the edge features of the blood cells in the sparse area; Determine the boundary points of each area in the sparse area; Determine the gap constraint of the sparse area according to all the boundary points; Reconstruct all the initial gaps based on the gap constraint to obtain the gap reconstruction area of the blood cell distribution in the sparse area.
6. The method according to claim 1, wherein Specifically, determining the density distribution characteristics of the blood cells in the stained image according to the overlapping influence area and the gap reconstruction area includes: Determine the overlapping density of the overlapping influence area; Determine the local sparsity of the gap reconstruction area; Use the set composed of the overlapping density and the local sparsity as the density distribution feature of blood cells in the stained image.
7. The method according to claim 1, characterized in that, The uniformity detection of the blood smear based on the density distribution feature specifically includes: Obtain the staining time for staining the blood smear. Determine the uniformity threshold of the blood stained smear. Determine the uniformity index of the blood stained image according to the staining time and the density distribution feature. Compare the uniformity threshold with the uniformity index. If the uniformity index is less than the uniformity threshold, mark the uniformity of the blood smear as non-uniform. If the uniformity index is greater than or equal to the uniformity threshold, mark the uniformity of the blood smear as uniform.
8. A blood smear device for a clinical laboratory, the device comprising a blood smear detection unit, characterized in that, The blood smear detection unit includes: A collection module, configured to collect a stained image of the blood smear and segment the aggregation area and the sparse area of blood cells in the blood smear from the stained image. A processing module, configured to determine the edge features of each blood cell in the stained image, perform overlapping analysis on the overlapping blood cells in the aggregation area based on the edge features of the blood cells in the aggregation area, and obtain the overlapping influence area of the blood cells in the aggregation area. The processing module is further configured to reconstruct the gaps between each blood cell in the sparse area based on the edge features of the blood cells in the sparse area, and obtain the gap reconstruction area of the blood cells in the sparse area. The processing module is further configured to determine the density distribution feature of the blood cells in the stained image according to the overlapping influence area and the gap reconstruction area. An execution module, configured to perform uniformity detection on the blood smear according to the density distribution feature.
9. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores code, and the processor is configured to obtain the code and execute the blood smear detection method for the inspection department according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the blood smear detection method for the inspection department according to any one of claims 1 to 7.
Citation Information
Cited By
Blood smear evaluation method, device and system based on medical examination
CN120807531A
Pollutant detection method and system in sludge treatment process
CN121521764A