Method and system for acquiring blood cell morphology contour based on microscopic images

By dividing the blood cell grayscale image into small windows, adjusting and merging the windows to form a target window, and performing threshold segmentation and chain code segment analysis, the problem of inaccurate blood cell outline segmentation in the existing technology is solved, and a more accurate blood cell morphological outline is achieved. extract.

CN119151977BActive Publication Date: 2025-01-24NANJING PUKOU CENT HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411640909.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-01-24
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

In the prior art, during threshold segmentation, the blood cells contain red blood cells, white blood cells, and platelets, and their characteristics are largely different, resulting in poor threshold segmentation effect in specific areas and the complete blood cell contour edge cannot be divided.

Method used

By dividing blood cell grayscale images into several small windows, the best threshold for each small window and the best threshold of the blood cell grayscale image, calculate the adaptation of each small window, adjust the small window that needs to be adjusted, merge phase phase phase phase. The small window of the neighboring is to form a target window, a threshold segmentation, dividing the chain code segment and calculating the probability of the arc -shaped characteristics, evaluating the clarity and rationality of the segmentation result, and finally the outline of the blood cell wheel.

Benefits of technology

It improves the accuracy of extracting the morphological contours of blood cells and can accurately determine whether each target window needs to be adjusted to ensure that complete blood cell contours are segmented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151977B_ABST
    Figure CN119151977B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and in particular to a method and system for acquiring blood cell morphological contours based on microscopic images, including: obtaining the clarity of the foreground area of ​​each target window of the blood cell grayscale image after threshold segmentation according to the probability that each chain code segment of the foreground area of ​​each target window satisfies the arc feature and the number of chain code segments; obtaining the rationality of the threshold segmentation of the foreground area of ​​each target window according to the clarity of the foreground area of ​​each target window after threshold segmentation and the fitness of all small windows in the foreground area of ​​each target window; obtaining the threshold segmentation result of each target window according to the rationality of the threshold segmentation of the foreground area of ​​each target window; and obtaining the blood cell wheel morphological contour through the threshold segmentation result of each target window. The present invention can accurately segment the complete blood cell contour edge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for acquiring blood cell morphology contours based on microscopic images. Background Art

[0002] The extraction of blood cell morphological contours is not only a basic technology in hematology and pathology, but also an important tool for diagnosis, treatment and prognosis assessment, which helps to improve the accuracy of disease diagnosis and the effectiveness of treatment. Doctors can extract the morphological contours of patients' blood cells to help analyze the size, shape, color, nuclear morphology and other characteristics of cells, thereby identifying abnormal cells or pathological changes in the blood. At the same time, according to the morphological characteristics of individual blood cells, personalized treatment plans can be formulated more accurately to improve treatment effects and reduce adverse reactions. For the existing methods of obtaining blood cell morphological contours based on microscopic images, threshold segmentation technology is often used for extraction. However, during threshold segmentation, since blood cells contain red blood cells, white blood cells, and platelets, their characteristics are quite different. Therefore, for specific areas, the threshold segmentation effect is not good, resulting in the inability to segment the complete blood cell contour edge. Summary of the invention

[0003] The present invention provides a method and system for acquiring blood cell morphological contours based on microscopic images to solve the problem that during threshold segmentation, since blood cells include red blood cells, white blood cells, and platelets, and their characteristics are quite different, the threshold segmentation effect is poor for specific areas, resulting in the inability to segment the complete blood cell contour edges.

[0004] The method and system for acquiring blood cell morphology contour based on microscopic images of the present invention adopt the following technical solutions:

[0005] An embodiment of the present invention provides a method for acquiring blood cell morphology contours based on a microscopic image, the method comprising the following steps:

[0006] Obtaining grayscale images of blood cells;

[0007] Divide the blood cell grayscale image into several small windows; obtain the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window; obtain the fitness of each small window according to the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window; obtain all the small windows that need to be adjusted according to the fitness of each small window;

[0008] According to all the small windows that need to be adjusted, several target windows are obtained; the foreground area and the background area of ​​each target window are obtained by segmentation; the foreground area of ​​each target window is divided into several chain code segments, and according to the difference in the position relationship of the pixel points in each chain code segment of the foreground area of ​​each target window, the probability that each chain code segment of the foreground area of ​​each target window satisfies the arc feature is obtained;

[0009] According to the probability that each chain code segment of the foreground area of ​​each target window of the blood cell grayscale image meets the arc feature and the number of chain code segments, the clarity of the foreground area of ​​each target window after threshold segmentation is obtained; according to the clarity of the foreground area of ​​each target window after threshold segmentation and the fitness of all small windows in the foreground area of ​​each target window, the rationality of the foreground area threshold segmentation of each target window is obtained;

[0010] According to the rationality of the threshold segmentation of the foreground area of ​​each target window, the threshold segmentation result of each target window is obtained; through the threshold segmentation result of each target window, the morphological outline of the blood cell wheel is obtained.

[0011] Preferably, the step of obtaining the fitness of each small window according to the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window includes the following specific steps:

[0012] The optimal threshold of the blood cell grayscale image is The inverse proportional normalized value of the absolute value of the difference between the best thresholds of the small windows is recorded as the first The adaptability of a small window.

[0013] Preferably, the step of obtaining all small windows that need to be adjusted according to the fitness of each small window includes the following specific steps:

[0014] When the grayscale image of blood cells The fitness of a small window is less than the preset threshold When , the grayscale image of blood cells The small window is the one that needs to be adjusted.

[0015] Preferably, the step of obtaining a plurality of target windows according to all small windows that need to be adjusted includes the following specific steps:

[0016] In the blood cell grayscale image, adjacent small windows that need to be adjusted are merged to obtain a target window.

[0017] Preferably, the foreground area of ​​each target window is divided into a plurality of chain code segments, and the probability that each chain code segment of the foreground area of ​​each target window satisfies the arc feature is obtained according to the difference in the position relationship of the pixel points in each chain code segment of the foreground area of ​​each target window, including the following specific steps:

[0018] In the grayscale image of blood cells On the edge of the foreground area of ​​the target window, The first The absolute value of the difference between the chain code values ​​of the edge pixels is recorded as The chain code differential eigenvalues ​​of edge pixels;

[0019] When the grayscale image of blood cells On the edge of the foreground area of ​​the target window, The chain code differential eigenvalue of edge pixels is greater than the preset threshold When The edge pixels are taken as segmentation points, and all segmentation points are used to divide the edge of the foreground area into several chain code segments;

[0020] When the grayscale image of blood cells The foreground area of ​​the target window On the chain code segment, The chain code differential eigenvalue of edge pixels is equal to the preset threshold When The edge pixels are taken as new segmentation points, and all new segmentation points are used to A chain code segment is divided into several chain code sequences;

[0021] Grayscale image of blood cells The foreground area of ​​the target window The calculation formula for the probability that a chain code segment meets the arc feature is as follows:

[0022]

[0023] In the formula, The grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature; The grayscale image of blood cells The foreground area of ​​the target window The number of all edge pixels on a chain code segment; Represents the grayscale image of blood cells The foreground area of ​​the target window The first chain code segment The chain code value of edge pixels; Represents the grayscale image of blood cells The foreground area of ​​the target window The first chain code segment The chain code value of edge pixels; Represents the grayscale image of blood cells The foreground area of ​​the target window The variance of the lengths of all chain code sequences in a chain code segment; is an exponential function with a natural constant as base; is the absolute value function.

[0024] Preferably, the clarity of the foreground area of ​​each target window after threshold segmentation is obtained according to the probability that each chain code segment of the foreground area of ​​each target window of the blood cell grayscale image satisfies the arc feature and the number of chain code segments, including the specific formula as follows:

[0025]

[0026] In the formula, Represents the grayscale image of blood cells The clarity of the foreground area of ​​the target window after threshold segmentation; Represents the grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature; Represents the grayscale image of blood cells The number of all chain code segments in the foreground area of ​​the target window; is the normalization function.

[0027] Preferably, the rationality of the threshold segmentation of the foreground area of ​​each target window is obtained according to the clarity of the foreground area of ​​each target window after the threshold segmentation and the fitness of all small windows in the foreground area of ​​each target window, and the specific steps include the following:

[0028] Calculate the grayscale image of blood cells The inverse of the variance of the fitness of all small windows in the foreground area of ​​the target window and the first The product of the clarity of the foreground area of ​​the target window after threshold segmentation is calculated, and the result after normalization is recorded as the first grayscale image of the blood cell. The rationality of the threshold segmentation of the foreground area of ​​the target window.

[0029] Preferably, the threshold segmentation result of each target window is obtained according to the rationality of the threshold segmentation of the foreground area of ​​each target window, and the specific steps include the following:

[0030] Get the grayscale image of blood cells The foreground area and the background area of ​​the secondary segmentation of the background area of ​​the target window;

[0031] According to the reasonableness acquisition method of the foreground area threshold segmentation of each target window, the reasonableness of the foreground area threshold segmentation of each segmentation is obtained;

[0032] When the grayscale image of blood cells The rationality of the foreground area threshold segmentation of the secondary segmentation of the background area of ​​the target window is less than or equal to the When the rationality of the foreground area threshold segmentation of the target window is The foreground area and background area divided by the target window are used as the The threshold segmentation result of the target window; when the blood cell grayscale image The rationality of the threshold segmentation of the foreground area of ​​the secondary segmentation of the background area of ​​the target window is greater than that of the When the rationality of the foreground area threshold segmentation of the target window is obtained, The foreground area and the background area of ​​the second segmentation of the background area of ​​the target window are the foreground area and the background area of ​​the third segmentation until the rationality of the foreground area threshold segmentation of any segmentation is greater than the rationality of the foreground area threshold segmentation of any segmentation after the first segmentation, and the segmentation is stopped, and the background area of ​​any segmentation and the foreground area of ​​any segmentation and all the previous segments are taken as the first segmentation. Threshold segmentation result of the target window.

[0033] Preferably, the step of obtaining the blood cell wheel morphology contour by using the threshold segmentation result of each target window includes the following specific steps:

[0034] Each small window that is not the target window is divided into a foreground area and a background area, and the threshold segmentation result of each small window that is not the target window is obtained. Combined with the threshold segmentation result of each target window, the grayscale value of the pixel in the foreground area of ​​the blood cell grayscale image is set to 0, and the grayscale value of the pixel in the background area is set to 1, and the final blood cell binary image is obtained. The edge of the final blood cell binary image is extracted as the blood cell wheel morphology contour.

[0035] The present invention also proposes a blood cell morphology contour acquisition system based on microscopic images, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned blood cell morphology contour acquisition method based on microscopic images.

[0036] The beneficial effects of the technical solution of the present invention are: according to the fitness of each small window, all small windows that need to be adjusted are obtained; each small part of the blood cell grayscale image can be analyzed to improve the accuracy of extracting the blood cell morphological contour. According to the rationality of the threshold segmentation of the foreground area of ​​each target window, the rationality of the threshold segmentation of the foreground area of ​​each target window after the background area is re-segmented is obtained; according to the rationality of the threshold segmentation of the foreground area of ​​each target window and the rationality of the threshold segmentation of the foreground area of ​​the background area re-segmented, the threshold segmentation result of each target window is obtained; it can be accurately judged whether each target window needs to be adjusted. The blood cell wheel morphological contour is obtained through the threshold segmentation result of each target window; and the complete blood cell contour can be accurately segmented. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 It is a flowchart of the steps of the method for acquiring the blood cell morphology profile based on microscopic images of the present invention;

[0039] Figure 2 A schematic diagram of a blood cell provided for this embodiment;

[0040] Figure 3 A blood cell grayscale image provided for this embodiment;

[0041] Figure 4 This is a result diagram of segmenting a blood cell grayscale image provided in this embodiment. DETAILED DESCRIPTION

[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the blood cell morphology profile acquisition method and system based on microscopic images proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0044] The specific scheme of the method and system for acquiring blood cell morphology contour based on microscopic images provided by the present invention is described in detail below with reference to the accompanying drawings.

[0045] See also Figure 1 , which shows a flow chart of the steps of a method for acquiring blood cell morphology contours based on a microscopic image provided by an embodiment of the present invention, the method comprising the following steps:

[0046] Step S001: Obtain a blood cell grayscale image.

[0047] Blood cell images are collected using a microscope. The collected blood cell diagram is shown below. Figure 2 As shown, including red blood cells, white blood cells and platelets, the image is cropped and grayed to obtain a blood cell grayscale image as shown in Figure 3 shown.

[0048] It should be noted that since blood cells are divided into red blood cells, white blood cells, and platelets, different types lead to different blood cell morphologies, as well as interference from factors such as uneven cell staining. Therefore, using global threshold segmentation cannot segment each type of blood cell well. The results of using the Otsu algorithm to segment the blood cell grayscale image are shown in the figure. Figure 4 As shown in the figure, the maximum inter-class variance is 366.5021 when the grayscale is 169. Therefore, in order to obtain the complete cell outline, the local threshold of the image is adjusted to ensure a more accurate segmentation result in the local area.

[0049] Among them, the Otsu algorithm is a well-known technology, and the specific method will not be introduced here.

[0050] Step S002: Divide the blood cell grayscale image into several small windows; obtain the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window; obtain the fitness of each small window according to the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window; obtain all the small windows that need to be adjusted according to the fitness of each small window.

[0051] It should be noted that the image is first divided into small grid-like windows to evaluate the image segmentation in local areas. The local segmentation is judged by the difference between the local optimal threshold and the overall optimal threshold. When the optimal threshold of a small window is close to the optimal threshold of the overall image, it usually indicates that the separation between the background and the target object in the small window is relatively clear. When the difference is large, it indicates that the local segmentation effect is not good and the size of the small window may need to be adjusted.

[0052] Default Value For 7, set a The blood cell grayscale image is equally divided into several small windows;

[0053] The optimal threshold of the blood cell grayscale image and the optimal threshold of each small window of the blood cell grayscale image are obtained by using the Otsu algorithm;

[0054] The optimal threshold of the blood cell grayscale image is The inverse proportional normalized value of the absolute value of the difference between the best thresholds of the small windows is recorded as the first The adaptability of a small window;

[0055] Grayscale image of blood cells The calculation method of the fitness of a small window is as follows:

[0056]

[0057] In the formula, Represents the grayscale image of blood cells The adaptability of a small window; represents the optimal threshold for the grayscale image of blood cells; Represents the grayscale image of blood cells The optimal threshold for a small window; is the absolute value function; is an exponential function with a natural constant as the base. To present the inverse proportional relationship and normalization processing, the implementer can set the inverse proportional function and normalization function according to the actual situation.

[0058] What needs to be explained is that Represents the grayscale image of blood cells The difference between the optimal threshold of a small window and the optimal threshold of the entire image is larger, indicating that The more inappropriate the size of the small window is, the The lower the fitness of the first small window, the more Adjust the size of the small window.

[0059] According to the above method, the fitness of each small window of the blood cell grayscale image is calculated;

[0060] Preset Threshold is 0.9, when the grayscale image of blood cells The fitness of a small window is less than the preset threshold When , the grayscale image of blood cells The small window is the one that needs to be adjusted.

[0061] At this point, all small windows of the blood cell grayscale image that need to be adjusted are obtained.

[0062] Step S003: According to all the small windows that need to be adjusted, several target windows are obtained; the foreground area and the background area of ​​each target window are obtained by segmentation; the foreground area of ​​each target window is divided into several chain code segments, and according to the difference in the position relationship of the pixel points in each chain code segment of the foreground area of ​​each target window, the probability that each chain code segment of the foreground area of ​​each target window satisfies the arc feature is obtained.

[0063] It should be noted that when adjusting small windows, adjacent small windows that need to be adjusted may be in the same area. Therefore, the adjacent small windows that need to be adjusted are first merged together, and the size of the merged window is adjusted to obtain the final window suitable for segmentation.

[0064] In the blood cell grayscale image, adjacent small windows that need to be adjusted are merged to obtain a target window, thereby obtaining several target windows.

[0065] It should be noted that the target window is obtained above, and the suspected blood cell area is obtained by using the Otsu algorithm for the target window, and the rationality of the segmentation in the window is judged by the target window characteristics and the suspected blood cell characteristics. The definition of segmentation rationality includes the rationality of the window and the clarity of the image after segmentation. The more reasonable the merged window is, the greater the rationality of the segmentation is, and the clearer the image after segmentation is, the greater the rationality of the segmentation is. For the calculation of window rationality, when the fitness difference of multiple small windows contained in the window is small, the merged window is more reasonable.

[0066] It should be noted that for the clarity calculation of the segmented image, since the outer contours of normal blood cells are all circular or elliptical, if the segmentation result is approximately circular or locally approximately circular (locally smooth) due to cell adhesion, the segmentation is considered to be clearer. When blood cells adhere, the chain code of the cell image will mutate at the adhesion point of the cell. The entire area chain code is split into multiple chain codes according to the cell adhesion point, and each chain code satisfies the uniform gradient change.

[0067] It should be noted that when the cell chain code mutates, the current mutated pixel point may be an adhesion point, and the entire chain code is segmented accordingly. For the judgment of whether the segmented chain code meets the gradient change, when the mean value of the chain code differential characteristic value of the edge pixel point is smaller, the more it meets the arc uniform change feature; when the chain code differential characteristic value of the edge pixel point is 1, after the chain code is split, the length of each small segment of the chain code is roughly equal, and the smaller the change in the length of each small segment of the chain code is, the more it meets the arc feature of the gradient change. When the number of chain codes that meet the arc is greater, it proves that the region is more likely to be a blood cell, and the clarity of the segmented image is greater.

[0068] The grayscale image of blood cells The target window is segmented using the Otsu algorithm and segmented into the first The foreground area and background area of ​​the target window;

[0069] It should be noted that the grayscale value of the pixel in the foreground area is smaller than the grayscale value of the pixel in the background area.

[0070] Among them, the region expansion algorithm and the Otsu algorithm are well-known technologies, and the specific methods are not introduced here.

[0071] The 8-connected chain code algorithm is used to calculate the grayscale image of blood cells. The chain code value of each edge pixel in the foreground area of ​​the target window is obtained. The chain code sequence of the foreground area of ​​the target window;

[0072] It should be noted that the calculation The edge chain code of the foreground area of ​​the target window is 8 chain codes, with the horizontal right direction being 0 and the clockwise direction being 0. The intervals are recorded as 1 to 7. Starting from any point on the edge of the connected domain, the edge chain code of the entire connected domain is extracted clockwise. Pixels whose chain code differential eigenvalues ​​are greater than 2 are found. The pixels corresponding to these differential chain codes are the cell adhesion points, and the edges are segmented according to these pixels.

[0073] In the grayscale image of blood cells On the edge of the foreground area of ​​the target window, The first The absolute value of the difference between the chain code values ​​of the edge pixels is recorded as The chain code differential eigenvalues ​​of edge pixels;

[0074] It should be noted that the chain code differential eigenvalue of the last edge pixel is the absolute value of the difference between the chain code values ​​of the last edge pixel and the first edge pixel.

[0075] Preset Threshold The preset threshold is 2. is 1;

[0076] When the grayscale image of blood cells On the edge of the foreground area of ​​the target window, The chain code differential eigenvalue of edge pixels is greater than the preset threshold When The edge pixels are taken as segmentation points, and all segmentation points are used to divide the edge of the foreground area into several chain code segments;

[0077] According to the above method, several chain code segments of the foreground area of ​​each target window are obtained;

[0078] When the grayscale image of blood cells The foreground area of ​​the target window On the chain code segment, The chain code differential eigenvalue of edge pixels is equal to the preset threshold When The edge pixels are taken as new segmentation points, and all new segmentation points are used to A chain code segment is divided into several chain code sequences;

[0079] According to the above method, several chain code sequences of each chain code segment of the foreground area of ​​each target window are obtained;

[0080] Grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature is calculated as follows:

[0081]

[0082] In the formula, Represents the grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature; Represents the grayscale image of blood cells The foreground area of ​​the target window The number of all edge pixels on a chain code segment; Represents the grayscale image of blood cells The foreground area of ​​the target window The first chain code segment The chain code value of edge pixels; Represents the grayscale image of blood cells The foreground area of ​​the target window The first chain code segment The chain code value of edge pixels; Represents the grayscale image of blood cells The foreground area of ​​the target window The variance of the lengths of all chain code sequences in a chain code segment; is an exponential function with a natural constant as base; is the absolute value function.

[0083] What needs to be explained is that Represents the grayscale image of blood cells The foreground area of ​​the target window The chain code differential eigenvalues ​​of the edge pixels corresponding to the chain code segments; Represents the grayscale image of blood cells The foreground area of ​​the target window The mean of the chain code differential eigenvalues ​​of all edge pixels corresponding to the chain code segment. The smaller the mean, the The lower the average change of each chain code segment, that is, the more uniform the change, the greater the probability of satisfying the arc feature. Represents the grayscale image of blood cells The foreground area of ​​the target window The variance of the lengths of all chain code sequences in a chain code segment. The smaller the variance, the more it satisfies the arc characteristics of the gradient change.

[0084] At this point, the probability that each chain code segment in the foreground area of ​​each target window of the blood cell grayscale image satisfies the arc feature is obtained.

[0085] Step S004: According to the probability that each chain code segment in the foreground area of ​​each target window of the blood cell grayscale image satisfies the arc feature and the number of chain code segments, the clarity of the foreground area of ​​each target window after threshold segmentation is obtained; according to the clarity of the foreground area of ​​each target window after threshold segmentation and the fitness of all small windows in the foreground area of ​​each target window, the rationality of the threshold segmentation of the foreground area of ​​each target window is obtained.

[0086] Grayscale image of blood cells The calculation method of the clarity of the foreground area of ​​the target window after threshold segmentation is as follows:

[0087]

[0088] In the formula, Represents the grayscale image of blood cells The clarity of the foreground area of ​​the target window after threshold segmentation; Represents the grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature; Represents the grayscale image of blood cells The number of all chain code segments in the foreground area of ​​the target window; is the normalization function.

[0089] What needs to be explained is that Represents the grayscale image of blood cells The mean of the probability that all chain code segments in the foreground area of ​​the target window meet the arc feature. The larger the mean, the more the segmented image meets the blood cell morphological characteristics, and the higher the clarity after segmentation; Represents the grayscale image of blood cells The number of all chain code segments in the foreground area of ​​a target window. The larger the number, the more fragmented the segmentation is, which means that the edge of the chain code sequence changes frequently, the less the connected domain obtained meets the characteristics of blood cells, and the lower the segmentation rationality is.

[0090] It should be noted that: according to the above method, the grayscale image of blood cells is calculated. The fitness of each small window in the foreground area of ​​the target window.

[0091] Calculate the grayscale image of blood cells The inverse of the variance of the fitness of all small windows in the foreground area of ​​the target window and the first The product of the clarity of the foreground area of ​​the target window after threshold segmentation is calculated, and the result after normalization is recorded as the first grayscale image of the blood cell. The rationality of the threshold segmentation of the foreground area of ​​the target window;

[0092] Grayscale image of blood cells The calculation method for the rationality of the threshold segmentation of the foreground area of ​​the target window is as follows:

[0093]

[0094] In the formula, Represents the grayscale image of blood cells The rationality of the threshold segmentation of the foreground area of ​​the target window; Represents the grayscale image of blood cells The clarity of the foreground area of ​​the target window after threshold segmentation; Represents the grayscale image of blood cells The variance of the fitness of all small windows in the foreground area of ​​the target window; is the normalization function.

[0095] What needs to be explained is that Represents the grayscale image of blood cells The variance of the fitness of all small windows in the foreground area of ​​the target window is the smaller the variance is, the smaller the fitness difference of these small windows is, indicating that the grayscale image of blood cells is The more reasonable the foreground area of ​​the target window is merged, the The greater the rationality of the threshold segmentation of the foreground area of ​​the target window. Represents the grayscale image of blood cells The clarity of the foreground area of ​​the target window after the threshold segmentation, the greater the clarity, the greater the rationality of the threshold segmentation. Among them, if a part of a small window is in the foreground area of ​​the target window, the small window also belongs to the foreground area.

[0096] At this point, the rationality of the threshold segmentation of the foreground area of ​​each target window of the blood cell grayscale image is obtained.

[0097] It should be noted that the above preliminary calculation of the rationality of the segmentation in the window is based on the basic morphology of blood cells. However, in the process of white blood cell segmentation, since white blood cells have nuclei and the contour of the white blood cell nucleus is similar to the morphology of adhesion cells, both meet the local smoothness feature. Therefore, the area segmented in the target window in the previous step may be the nuclear area of ​​the white blood cell, rather than the outer edge morphology contour of the blood cell. Therefore, it is necessary to further judge whether the threshold setting is reasonable.

[0098] Step S005: according to the rationality of the threshold segmentation of the foreground area of ​​each target window, the threshold segmentation result of each target window is obtained; and the blood cell wheel morphology contour is obtained through the threshold segmentation result of each target window.

[0099] It should be noted that the white blood cell image includes the cell nucleus, cytoplasm, and background area. To determine whether the segmented area is the white blood cell nucleus area, the background area of ​​the segmented image can be re-segmented. When the rationality after re-segmentation is higher than the previously calculated segmentation rationality, it is proved that the image previously segmented may be the cell nucleus of the white blood cell. The calculation method for the rationality of the background area re-segmentation is the same as the above method.

[0100] The grayscale image of blood cells The background area of ​​the target window is segmented twice using the Otsu algorithm; the grayscale image of the blood cells is segmented into The foreground area and the background area of ​​the secondary segmentation of the background area of ​​the target window;

[0101] According to the above method, the grayscale image of blood cells is calculated. The rationality of the threshold segmentation of the foreground area of ​​the secondary segmentation of the background area of ​​the target window;

[0102] When the grayscale image of blood cells The rationality of the foreground area threshold segmentation of the secondary segmentation of the background area of ​​the target window is less than or equal to the When the rationality of the foreground area threshold segmentation of the target window is The foreground area and background area divided by the target window are used as the The threshold segmentation result of the target window. The rationality of the threshold segmentation of the foreground area of ​​the secondary segmentation of the background area of ​​the target window is greater than that of the When the rationality of the foreground area threshold segmentation of the target window is obtained, The foreground area and the background area of ​​the second segmentation of the background area of ​​the target window are divided into three segments, until the rationality of the foreground area threshold segmentation of any segmentation is greater than the rationality of the foreground area threshold segmentation of any segmentation after that, the segmentation is stopped, and the background area of ​​any segmentation and the foreground area of ​​any segmentation and all the previous segments are taken as the first segmentation. Threshold segmentation result of the target window.

[0103] According to the above method, the threshold segmentation result of each target window is obtained.

[0104] The Otsu algorithm is used to divide each small window that is not the target window into a foreground area and a background area, and the threshold segmentation result of each small window that is not the target window is obtained. Combined with the threshold segmentation result of each target window, the grayscale value of the pixel in the foreground area of ​​the blood cell grayscale image is set to 0, and the grayscale value of the pixel in the background area is set to 1, and the final blood cell binary image is obtained. The edge of the final blood cell binary image is extracted as the blood cell wheel morphology contour.

[0105] It should be noted that the final blood cell binary image is processed by morphological opening operation to remove isolated points.

[0106] It should be noted that: in this embodiment, when the denominator in the formula is 0, the denominator is set to 1 to ensure that the formula is valid, and this example is used for description.

[0107] An embodiment of the present invention also provides a blood cell morphology contour acquisition system based on microscopic images, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above steps S001 to S005 when executing the computer program.

[0108] At this point, this embodiment is completed.

[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for acquiring blood cell morphology contours based on microscopic images, characterized in that: The method comprises the following steps: Obtaining a grayscale image of blood cells; Divide the blood cell grayscale image into several small windows; obtain the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window; obtain the fitness of each small window according to the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window; obtain all the small windows that need to be adjusted according to the fitness of each small window; According to all the small windows that need to be adjusted, several target windows are obtained; the foreground area and the background area of ​​each target window are obtained by segmentation; the foreground area of ​​each target window is divided into several chain code segments, and according to the difference in the position relationship of the pixel points in each chain code segment of the foreground area of ​​each target window, the probability that each chain code segment of the foreground area of ​​each target window satisfies the arc feature is obtained; According to the probability that each chain code segment of the foreground area of ​​each target window of the blood cell grayscale image meets the arc feature and the number of chain code segments, the clarity of the foreground area of ​​each target window after threshold segmentation is obtained; according to the clarity of the foreground area of ​​each target window after threshold segmentation and the fitness of all small windows in the foreground area of ​​each target window, the rationality of the foreground area threshold segmentation of each target window is obtained; According to the rationality of the threshold segmentation of the foreground area of ​​each target window, the threshold segmentation result of each target window is obtained; through the threshold segmentation result of each target window, the morphological outline of the blood cell wheel is obtained; The step of obtaining the fitness of each small window according to the optimal threshold of the blood cell grayscale image and the optimal threshold of each small window includes the following specific steps: The optimal threshold of the blood cell grayscale image is The inverse proportional normalized value of the absolute value of the difference between the best thresholds of the small windows is recorded as the first The adaptability of a small window; The specific steps of obtaining all small windows that need to be adjusted according to the fitness of each small window are as follows: When the grayscale image of blood cells The fitness of a small window is less than the preset threshold When , the grayscale image of blood cells The small window is the small window that needs to be adjusted; The foreground area of ​​each target window is divided into a plurality of chain code segments, and the probability that each chain code segment of the foreground area of ​​each target window satisfies the arc feature is obtained according to the difference in the position relationship of the pixel points in each chain code segment of the foreground area of ​​each target window, including the following specific steps: In the grayscale image of blood cells On the edge of the foreground area of ​​the target window, The first The absolute value of the difference between the chain code values ​​of the edge pixels is recorded as The chain code differential eigenvalues ​​of edge pixels; When the grayscale image of blood cells On the edge of the foreground area of ​​the target window, The chain code differential eigenvalue of edge pixels is greater than the preset threshold When The edge pixels are taken as segmentation points, and all segmentation points are used to divide the edge of the foreground area into several chain code segments; When the grayscale image of blood cells The foreground area of ​​the target window On the chain code segment, The chain code differential eigenvalue of edge pixels is equal to the preset threshold When The edge pixels are taken as new segmentation points, and all new segmentation points are used to A chain code segment is divided into several chain code sequences; Grayscale image of blood cells The foreground area of ​​the target window The calculation formula for the probability that a chain code segment meets the arc feature is as follows: In the formula, Represents the grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature; The grayscale image of blood cells The foreground area of ​​the target window The number of all edge pixels on a chain code segment; The grayscale image of blood cells The foreground area of ​​the target window The first chain code segment The chain code value of edge pixels; The grayscale image of blood cells The foreground area of ​​the target window The first chain code segment The chain code value of edge pixels; Represents the grayscale image of blood cells The foreground area of ​​the target window The variance of the lengths of all chain code sequences in a chain code segment; is an exponential function with a natural constant as base; is the absolute value function.

2. The method for acquiring blood cell morphology contour based on microscopic images according to claim 1, characterized in that: The specific steps of obtaining a plurality of target windows according to all the small windows that need to be adjusted are as follows: In the blood cell grayscale image, adjacent small windows that need to be adjusted are merged to obtain a target window.

3. The method for acquiring blood cell morphology contour based on microscopic images according to claim 1, characterized in that: The specific formula for obtaining the clarity of the foreground area of ​​each target window after threshold segmentation is as follows based on the probability that each chain code segment of the foreground area of ​​each target window of the blood cell grayscale image satisfies the arc feature and the number of chain code segments: In the formula, Represents the grayscale image of blood cells The clarity of the foreground area of ​​the target window after threshold segmentation; Represents the grayscale image of blood cells The foreground area of ​​the target window The probability that a chain code segment satisfies the arc feature; Represents the grayscale image of blood cells The number of all chain code segments in the foreground area of ​​the target window; is the normalization function.

4. The method for acquiring blood cell morphology contour based on microscopic images according to claim 1, characterized in that: The rationality of the threshold segmentation of the foreground area of ​​each target window is obtained according to the clarity of the foreground area of ​​each target window after the threshold segmentation and the fitness of all small windows in the foreground area of ​​each target window, and the specific steps include the following: Calculate the grayscale image of blood cells The inverse of the variance of the fitness of all small windows in the foreground area of ​​the target window and the first The product of the clarity of the foreground area of ​​the target window after threshold segmentation is calculated, and the result after normalization is recorded as the first grayscale image of the blood cell. The rationality of the threshold segmentation of the foreground area of ​​the target window.

5. The method for acquiring blood cell morphology contour based on microscopic images according to claim 1, characterized in that: The threshold segmentation result of each target window is obtained according to the rationality of the threshold segmentation of the foreground area of ​​each target window, and the specific steps include the following: Get the grayscale image of blood cells The foreground area and the background area of ​​the secondary segmentation of the background area of ​​the target window; According to the reasonableness acquisition method of the foreground area threshold segmentation of each target window, the reasonableness of the foreground area threshold segmentation of each segmentation is obtained; When the grayscale image of blood cells The rationality of the foreground area threshold segmentation of the secondary segmentation of the background area of ​​the target window is less than or equal to the When the rationality of the foreground area threshold segmentation of the target window is The foreground area and background area divided by the target window are used as the The threshold segmentation result of the target window; when the blood cell grayscale image The rationality of the threshold segmentation of the foreground area of ​​the secondary segmentation of the background area of ​​the target window is greater than that of the When the rationality of the foreground area threshold segmentation of the target window is obtained, The foreground area and the background area of ​​the second segmentation of the background area of ​​the target window are the foreground area and the background area of ​​the third segmentation until the rationality of the foreground area threshold segmentation of any segmentation is greater than the rationality of the foreground area threshold segmentation of any segmentation after the first segmentation, and the segmentation is stopped, and the background area of ​​any segmentation and the foreground area of ​​any segmentation and all the previous segments are taken as the first segmentation. Threshold segmentation result of the target window.

6. The method for acquiring blood cell morphology contour based on microscopic images according to claim 5, characterized in that: The specific steps of obtaining the blood cell wheel morphology contour by the threshold segmentation result of each target window are as follows: Each small window that is not the target window is divided into a foreground area and a background area, and the threshold segmentation result of each small window that is not the target window is obtained. Combined with the threshold segmentation result of each target window, the grayscale value of the pixel in the foreground area of ​​the blood cell grayscale image is set to 0, and the grayscale value of the pixel in the background area is set to 1, and the final blood cell binary image is obtained. The edge of the final blood cell binary image is extracted as the blood cell wheel morphology contour.

7. A blood cell morphology profile acquisition system based on a microscopic image, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method for acquiring blood cell morphology profile based on microscopic images as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method for extracting peripheral blood leucocyte edges with application of quaternion division and graph theory optimization

    CN103150722A

  • Cell classification method and device

    CN110135271A