Cell image segmentation method and cell image segmentation device
By obtaining the outlines of cells and nuclei, determining whether they are adhesion cells, finding concave points, using probe method and grayscale distance transformation and other methods, the problem of image segmentation of adhesion cells is solved and accurate cell segmentation is achieved.
Patent Information
- Application Number
- CN202411784732.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art is difficult to accurately segment images of adhesion cells, especially in oral mucosal cell microscopy images. The overlap or cross between cells makes the segmentation of adhesion cells difficult.
By obtaining the outlines of the cells and nucleus, we can determine whether they are adhesion cells, find the concave points on the outline, use the probe method to establish the segmentation line, and complete the segmentation of adhesion cells through grayscale distance transformation and secondary watershed segmentation methods.
The accurate segmentation of adhesion cells images is achieved, the concave points can be accurately found, segmentation lines can be established, and cell contour information can be obtained. The overall outline of the segmented image is relatively accurate.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cell image segmentation, in particular to a cell image segmentation method and a cell image segmentation device. Background Art
[0002] Image segmentation plays a very important role in the task of medical microscopic cell image analysis, and adhesion cell image segmentation is a difficult and hot issue. For oral mucosal cell microscopic images, a good segmentation effect will help the subsequent identification and detection of nuclear buds, micronuclei, and medium bridges. In order to solve or improve the shortcomings or deficiencies of the existing technology, this case is proposed. The difficulty of cell image segmentation lies mainly in the segmentation of adhesion cells. There are often overlaps or intersections between cells, so the segmentation of adhesion cells is difficult. Summary of the invention
[0003] The present invention solves the technical problem by adopting the following technical solutions:
[0004] The cell image segmentation method of the present invention comprises the following steps:
[0005] Step 1: Obtain the contours of the segmented cells and cell nuclei respectively;
[0006] Step 2: Determine whether it is an adherent cell;
[0007] (1) Obtain the minimum convex polygon of each contour;
[0008] (2) area, perimeter, solidity (area ratio < 0.9), and convexity (perimeter ratio > 1.2) were used to determine whether the cells were adherent;
[0009] Step 3: Find concave points on the contour;
[0010] (1) Make a triangle with the current point and the 15th point on both sides as vertices;
[0011] (2) Whether the current point is a concave point is determined based on whether the midpoint of the diagonal side of the triangle with the current point as the vertex is outside the contour; the length of the midline with the current point as the vertex is the curvature value of the current point; and the direction from the midpoint of the diagonal side to the current point is the direction of the current point.
[0012] (3) Normalize the curvature value of each point to between 0 and 100;
[0013] (4) Calculate the weighted curvature value. The weight of each non-zero curvature point on the contour is equal to the sum of the curvatures of the 10 adjacent points centered at the point.
[0014] (5) If there are more than 10 points with weighted curvature values greater than 0 in a row, the point with the highest weighted curvature value greater than 50 in the area is a concave point;
[0015] Step 4: Use the probe method to establish the segmentation line;
[0016] Step 5: Use grayscale distance transformation to determine the maximum value of the adhesion cell area in the image with the segmentation line established, and obtain the marked image after threshold transformation;
[0017] Step 6: After setting the labeled image as a parameter, perform secondary watershed segmentation to complete the adhesion cell segmentation and obtain the final segmentation result.
[0018] In a preferred embodiment, after the medical microscopic cell image is processed by the initial segmentation, the original image is separated into background, cells and cell nuclei. In the initial segmentation result, it is not possible to determine which contours are adherent cells (nuclei). Therefore, it is necessary to judge the adherent cells (nuclei) before separation. Four criteria, namely area, perimeter, solidity and convexity, are used to judge whether a contour is an adherent cell (nucleus). The specific process is as follows: first, the area and perimeter calculation method is used for judgment. According to actual measurement and comprehensive calculation, the thresholds of cell perimeter and area are set to 400 and 10000 respectively; the thresholds of cell nucleus perimeter and area are set to 200 and 3000; contours with perimeter and area less than the threshold will be removed.
[0019] In a preferred embodiment, the method for calculating the solidity of the remaining contour is further judged, solidity = Sa / Sb, where Sa is the area of the current adhesion cell cluster region, Sb is the area of the minimum convex polygon in the region, and the value range of solidity is in the semi-closed and semi-open interval between 0 and 1. If it is an adhesion cell (nucleus), the solidity value will be obviously less than 1.
[0020] In a preferred embodiment, a method for calculating the convexity of the contour is used for final screening, and the calculation formula is convexity = Ca / Cb, where Ca is the perimeter of the current adhesion cell area; Cb is the perimeter of the minimum convex polygon in the area; the value of solidity is a positive number greater than or equal to 1; if it is an adhesion cell (nucleus), the solidity value will be significantly greater than 1.
[0021] In a preferred embodiment, the grayscale distance is obtained by adopting the following method: by adopting a computer binary image to obtain a distance transformation image D and a grayscale image G of a grayscale cell image, and then substituting into a calculation formula GDi=Di*0.8+Gi*0.2, wherein GDi represents the grayscale value of a pixel point of the grayscale distance transformation cell image, Di represents the grayscale value of a corresponding point of the transformation image D, and represents the grayscale value of a corresponding point of the grayscale image Gi.
[0022] In a preferred embodiment, the processing of secondary watershed segmentation includes: using T1 as a threshold to segment the cell nucleus, using T2 as a threshold to segment the cell, using the threshold method to segment the grayscale image, and obtaining a binary image; performing a closing operation on the binary image to fill small holes in the object and connect adjacent objects to obtain the foreground; performing a morphological expansion operation on the binary image twice with the anchor point as the center point of the structural element to connect the areas of similar color or intensity to obtain the background; merging the foreground image and the background image into a marked image; performing a watershed transformation after setting the marked image as a parameter. The watershed segmentation images of the cell nucleus and the cell are obtained respectively; the segmentation images of the cell nucleus and the cell are merged to obtain the segmentation result.
[0023] A cell image segmentation device is an electronic computing device, comprising a processing module, a storage module, a communication module and a communication serial line, wherein the processing module and the storage module and the communication module communicate with each other through the communication serial line, and the processing module is used to call the logic commands in the storage module and then adopt the cell image segmentation method steps described above, which specifically include obtaining contours, respectively taking contours of the segmented cells and cell nuclei, judging whether they are adhesion cells, finding concave points on the contours, using the probe method to establish a segmentation line, using grayscale distance transformation to determine the maximum value of the adhesion cell area for the image with the segmentation line established, obtaining a marked image after threshold transformation, and setting the marked image as a parameter to perform secondary watershed segmentation, complete adhesion cell segmentation, and obtain the final segmentation result.
[0024] The advantages and positive effects of the present invention are: it can accurately find the concave points, use the probe method to establish the segmentation line, obtain the cell (nucleus) contour information, and realize the accurate segmentation of the adhesion cell image. The proposed segmentation method can segment the adhesion cells in a targeted manner according to the different areas of different pixel points, and the overall contour of the segmented image is relatively accurate. DETAILED DESCRIPTION
[0025] The cell image segmentation method of the present invention comprises the following steps:
[0026] Step 1: Obtain the contours of the segmented cells and cell nuclei respectively;
[0027] Step 2: Determine whether it is an adherent cell;
[0028] (1) Obtain the minimum convex polygon of each contour;
[0029] (2) area, perimeter, solidity (area ratio < 0.9), and convexity (perimeter ratio > 1.2) were used to determine whether the cells were adherent;
[0030] Step 3: Find concave points on the contour;
[0031] (1) Make a triangle with the current point and the 15th point on both sides as vertices;
[0032] (2) Whether the current point is a concave point is determined based on whether the midpoint of the diagonal side of the triangle with the current point as the vertex is outside the contour; the length of the midline with the current point as the vertex is the curvature value of the current point; and the direction from the midpoint of the diagonal side to the current point is the direction of the current point.
[0033] (3) Normalize the curvature value of each point to between 0 and 100;
[0034] (4) Calculate the weighted curvature value. The weight of each non-zero curvature point on the contour is equal to the sum of the curvatures of the 10 adjacent points centered at the point.
[0035] (5) If there are more than 10 points with weighted curvature values greater than 0 in a row, the point with the highest weighted curvature value greater than 50 in the area is a concave point;
[0036] Step 4: Use the probe method to establish the segmentation line;
[0037] Step 5: Use grayscale distance transformation to determine the maximum value of the adhesion cell area for the image with the segmentation line established, and obtain the marked image after threshold transformation;
[0038] Step 6: After setting the labeled image as a parameter, perform secondary watershed segmentation to complete the adhesion cell segmentation and obtain the final segmentation result.
[0039] In a preferred embodiment, after the medical microscopic cell image is processed by the initial segmentation, the original image is separated into background, cells and cell nuclei. In the initial segmentation result, it is not possible to determine which contours are adherent cells (nuclei). Therefore, it is necessary to judge the adherent cells (nuclei) before separation. Four criteria, namely area, perimeter, solidity and convexity, are used to judge whether a contour is an adherent cell (nucleus). The specific process is as follows: first, the area and perimeter calculation method is used for judgment. According to actual measurement and comprehensive calculation, the thresholds of cell perimeter and area are set to 400 and 10000 respectively; the thresholds of cell nucleus perimeter and area are set to 200 and 3000; contours with perimeter and area less than the threshold will be removed.
[0040] In a preferred embodiment, the method for calculating the solidity of the remaining contour is further judged, solidity = Sa / Sb, where Sa is the area of the current adhesion cell cluster region, Sb is the area of the minimum convex polygon in the region, and the value range of solidity is in the semi-closed and semi-open interval between 0 and 1. If it is an adhesion cell (nucleus), the solidity value will be obviously less than 1.
[0041] In a preferred embodiment, a method for calculating the convexity of the contour is used for final screening, and the calculation formula is convexity = Ca / Cb, where Ca is the perimeter of the current adhesion cell area; Cb is the perimeter of the minimum convex polygon in the area; the value of solidity is a positive number greater than or equal to 1; if it is an adhesion cell (nucleus), the solidity value will be significantly greater than 1.
[0042] In a preferred embodiment, the grayscale distance is obtained by adopting the following method: by adopting a computer binary image to obtain a distance transformation image D and a grayscale image G of a grayscale cell image, and then substituting into a calculation formula GDi=Di*0.8+Gi*0.2, wherein GDi represents the grayscale value of a pixel point of the grayscale distance transformation cell image, Di represents the grayscale value of a corresponding point of the transformation image D, and represents the grayscale value of a corresponding point of the grayscale image Gi.
[0043] In a preferred embodiment, the processing of secondary watershed segmentation includes: using T1 as a threshold to segment the cell nucleus, using T2 as a threshold to segment the cell, using the threshold method to segment the grayscale image, and obtaining a binary image; performing a closing operation on the binary image to fill small holes in the object and connect adjacent objects to obtain the foreground; performing a morphological expansion operation on the binary image twice with the anchor point as the center point of the structural element to connect the areas of similar color or intensity to obtain the background; merging the foreground image and the background image into a marked image; performing a watershed transformation after setting the marked image as a parameter. The watershed segmentation images of the cell nucleus and the cell are obtained respectively; the segmentation images of the cell nucleus and the cell are merged to obtain the segmentation result.
[0044] A cell image segmentation device is an electronic computing device, comprising a processing module, a storage module, a communication module and a communication serial line, wherein the processing module and the storage module and the communication module communicate with each other through the communication serial line, and the processing module is used to call the logic commands in the storage module and then adopt the cell image segmentation method steps described above, which specifically include obtaining contours, respectively taking contours of the segmented cells and cell nuclei, judging whether they are adhesion cells, finding concave points on the contours, using the probe method to establish a segmentation line, using grayscale distance transformation to determine the maximum value of the adhesion cell area for the image with the segmentation line established, obtaining a marked image after threshold transformation, and setting the marked image as a parameter to perform secondary watershed segmentation, complete adhesion cell segmentation, and obtain the final segmentation result.
[0045] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive, and therefore the present invention is not limited to the embodiments described in the specific implementation manners. Any other implementation manners derived by those skilled in the art based on the technical solutions of the present invention also fall within the scope of protection of the present invention.
Claims
1. A cell image segmentation method and a cell image segmentation device, characterized in that: The following steps are involved: Step 1: Obtain the contours of the segmented cells and cell nuclei respectively; Step 2: Determine whether it is an adherent cell; (1) Obtain the minimum convex polygon of each contour; (2) area, perimeter, solidity (area ratio < 0.9), and convexity (perimeter ratio > 1.2) were used to determine whether the cells were adherent; Step 3: Find concave points on the contour; (1) Make a triangle with the current point and the 15th point on both sides as vertices; (2) Whether the current point is a concave point is determined based on whether the midpoint of the diagonal side of the triangle with the current point as the vertex is outside the contour; the length of the midline with the current point as the vertex is the curvature value of the current point; and the direction from the midpoint of the diagonal side to the current point is the direction of the current point. (3) Normalize the curvature value of each point to between 0 and 100; (4) Calculate the weighted curvature value. The weight of each non-zero curvature point on the contour is equal to the sum of the curvatures of the 10 adjacent points centered at the point. (5) If there are more than 10 points with weighted curvature values greater than 0 in a row, the point with the highest weighted curvature value greater than 50 in the area is a concave point; Step 4: Use the probe method to establish the segmentation line; Step 5: Use grayscale distance transformation to determine the maximum value of the adhesion cell area in the image with the segmentation line established, and obtain the marked image after threshold transformation; Step 6: After setting the labeled image as a parameter, perform secondary watershed segmentation to complete the adhesion cell segmentation and obtain the final segmentation result.
2. The cell image segmentation method and the cell image segmentation device according to claim 1, characterized in that: After the initial segmentation of the medical microscopic cell image, the original image is separated into background, cells and cell nuclei. In the initial segmentation results, it is not possible to determine which contours are adherent cells (nuclei). Therefore, it is necessary to judge the adherent cells (nuclei) before separation. Four criteria, namely area, perimeter, solidity and convexity, are used to judge whether a contour is an adherent cell (nucleus). The specific process is as follows: first, the area and perimeter calculation method is used for judgment. According to actual measurement and comprehensive calculation, the thresholds of cell perimeter and area are set to 400 and 10000 respectively; the thresholds of cell nucleus perimeter and area are set to 200 and 3000; contours with perimeter and area less than the threshold will be removed.
3. The cell image segmentation method and the cell image segmentation device according to claim 1, characterized in that: Further judgment is made on the method of calculating the solidity of the remaining contour, solidity = Sa / Sb, where Sa is the area of the current adhesion cell cluster region, Sb is the area of the minimum convex polygon in the region, and the value range of solidity is in the semi-closed and semi-open interval between 0 and 1. If it is an adhesion cell (nucleus), the solidity value will be obviously less than 1.
4. The cell image segmentation method and the cell image segmentation device according to claim 1, characterized in that: The final screening is carried out by calculating the convexity of the contour, and the calculation formula is convexity = Ca / Cb, where Ca is the perimeter of the current adhesion cell area; Cb is the perimeter of the smallest convex polygon in the area; the value of solidity is a positive number greater than or equal to 1; if it is an adhesion cell (nucleus), the solidity value will be significantly greater than 1.
5. The cell image segmentation method and the cell image segmentation device according to claim 1, characterized in that: The grayscale distance is obtained by adopting the following method: the distance transformation image D and the grayscale image G of the grayscale cell image are obtained by using a computer binary image, and then the calculation formula GDi=Di*0.8+Gi*0.2 is substituted, where GDi represents the grayscale value of the pixel point of the grayscale distance transformation cell image, Di represents the grayscale value of the corresponding point of the transformation image D, and represents the grayscale value of the corresponding point of the grayscale image Gi.
6. The cell image segmentation method and the cell image segmentation device according to claim 1, characterized in that: The processing of secondary watershed segmentation includes using T1 as the threshold to segment the cell nucleus, using T2 as the threshold to segment the cell, and using the threshold method to segment the grayscale image to obtain a binary image; The binary image is closed to fill small holes in the object and connect adjacent objects to obtain the foreground. The binary image is expanded twice with the anchor point as the center point of the structural element to connect the areas of similar color or intensity to obtain the background. The foreground image and the background image are merged into a marked image. After setting the marked image as a parameter, a watershed transformation is performed. The watershed segmentation images of the cell nucleus and the cell are obtained respectively. The segmentation images of the cell nucleus and the cell are merged to obtain the segmentation result.
7. A cell image segmentation device, which is an electronic computing device, and uses the cell image segmentation method described in claims 1-6 for logical operations, including a processing module, a storage module, a communication module and a communication serial line, wherein the processing module and the storage module and the communication module communicate with each other through the communication serial line, and the processing module is used to call the logic commands in the storage module and then use the cell image segmentation method described above, which specifically includes: obtaining contours, respectively taking contours of the segmented cells and cell nuclei, judging whether they are adhesion cells, finding concave points on the contours, using the probe method to establish a segmentation line, using grayscale distance transformation to determine the maximum value of the adhesion cell area for the image with the segmentation line established, obtaining a labeled image after threshold transformation, and setting the labeled image as a parameter, performing secondary watershed segmentation, completing adhesion cell segmentation, and obtaining the final segmentation result.