Stacked cell level judgment method based on contouring concavity and convexity

By quantifying convexity defects through contour extraction and convex hull calculation, and combining centroid location and spatial relationships, an attribute graph is constructed for topological sorting. This solves the shortcomings of traditional methods that rely on manual work and deep learning, and achieves low-cost, interpretable cell-level judgment.

CN121884341AActive Publication Date: 2026-04-17WUHAN MUTUAL UNITED TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN MUTUAL UNITED TECH CO LTD
Filing Date
2026-03-18
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and reliably determine the hierarchical relationships of stacked cells from cell images. Traditional methods rely on manual judgment, which is costly and highly subjective. Deep learning methods depend on high-performance equipment and have poor interpretability. Existing methods have failed to effectively utilize contour concavity features for stable inference.

Method used

By extracting contours, calculating convex hulls, and comparing features, convexity defect parameters are quantified. Combined with centroid location and spatial relationships, an attribute graph is constructed for topological sorting to generate a cell stacking hierarchy sequence.

Benefits of technology

It enables low-cost, interpretable, and automated determination of cell hierarchy relationships, applicable to various cell types, reducing technical costs, facilitating laboratory deployment, and outputting structured stacked hierarchy results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884341A_ABST
    Figure CN121884341A_ABST
Patent Text Reader

Abstract

The invention provides a stacked cell hierarchy judgment method based on contour concavity and convexity. The method comprises the following steps: performing contour extraction on a cell binary image; calculating a convex hull for the contour point set of each cell, and taking the convex hull as an ideal form reference of the cell in an unshielded state; detecting the convexity defect between the contour point set of each cell and the corresponding convex hull, and quantifying the characteristic parameter of each convexity defect; screening the convexity defects according to the characteristic parameters to determine significant recesses, marking cells with at least one significant recess as concave cells, and marking cells without significant recesses as convex cells; screening candidate cell pairs according to the spatial position relationship between the cells; according to the convex-concave attributes of the two cells in the candidate cell pair and the position relation between the coordinates of the center of mass and the remarkable concave area, the shielding relation between the two cells is judged; and constructing an attribute graph by taking each cell as a node and taking the occlusion relationship as an edge, and generating a cell stacking hierarchy sequence through topological sorting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of biological image analysis, specifically to a method for determining stacked cell hierarchies based on contour concavity and convexity. Background Technology

[0002] In the field of cell microscopy image analysis, the hierarchical relationship of stacked cells is a key indicator for revealing the spatial distribution characteristics of cells and assessing the state of cell interactions. Its accurate determination plays an important supporting role in scenarios such as tissue engineering cell distribution analysis. With the improvement of microscopy imaging technology and the demand for automated analysis, how to quickly and reliably extract stacking hierarchy information from cell images has become a core technical challenge driving the upgrade of cell analysis from two-dimensional morphological observation to three-dimensional spatial analysis.

[0003] Traditional manual judgment methods rely on cytologists to make judgments through microscopic observation or comparison of images from multiple perspectives, which requires a significant investment of time and effort from professionals and results in high labor costs. Furthermore, the judgment results are affected by factors such as personal experience and visual fatigue, making it difficult to guarantee repeatability and consistency.

[0004] The core logic of the gray-level difference method is to distinguish layers by the difference in gray level or gradient in overlapping areas, relying on the feature that the upper occluded areas have lower gray levels. However, cell images are easily affected by factors such as uneven illumination, staining differences, and equipment noise, resulting in large gray-level fluctuations within the same cell. For cell types with similar morphology and uniform staining, such as epithelial cells, the gray-level difference in the stacked areas is weak, which significantly reduces the accuracy of this method and makes it difficult to handle complex imaging scenarios.

[0005] Deep learning methods use convolutional neural networks to directly classify or combine instance segmentation to determine hierarchical levels, but they have significant drawbacks. First, these methods require large amounts of labeled datasets, resulting in high construction costs and weak generalization ability; models trained for specific cell types struggle to adapt to other sample types. Second, deep learning models have poor interpretability, only outputting results without clearly identifying the core features of hierarchical differences, which does not meet the traceability requirements of biological experiments. Furthermore, deep learning methods rely on high-performance computing equipment, making them difficult to deploy in grassroots laboratories.

[0006] Existing technologies often focus on grayscale feature extraction, pixel segmentation, or end-to-end deep learning, but neglect a core physical clue—occlusion of upper objects causes the contours of lower objects to appear concave. This principle is unaffected by imaging conditions and is directly related to the nature of stacking. However, existing technologies have not built a complete analysis method around this principle, causing the technical path to deviate from the core mechanism and making it difficult to achieve the goal of low-cost, highly robust, and interpretable judgment. Summary of the Invention

[0007] In the problem of determining the stacked cell hierarchy, existing methods either rely on manual annotation, leading to low efficiency and high subjectivity, or rely solely on surface features such as grayscale differences, resulting in weak anti-interference capabilities, or rely on deep learning models, which suffer from high data dependence and poor interpretability. Specifically, the core technical challenges include three aspects: First, it is difficult to automatically distinguish between contour depressions caused by physical occlusion between cells and depressions caused by irregular cell shapes, lacking a reliable basis for judgment; second, there is a lack of rigorous reasoning rules to combine contour depression features with geometric information such as centroid position, making it impossible to stably infer the direction of occlusion between cells; and third, it is difficult to integrate the local occlusion relationships of a large number of cell pairs into a globally consistent and logically conflict-free hierarchical order, and it is also difficult to properly handle special relationships within the same layer.

[0008] To address the aforementioned technical problems, this invention provides a method for determining stacked cell hierarchies based on contour concavity and convexity, comprising the following steps: Step S1: Extract the contours of the binary cell image, obtain the contour point set of each cell, and calculate the centroid coordinates of each cell; Step S2: Calculate the convex hull for the contour point set of each cell, and use the convex hull as the ideal shape reference of the cell in the unoccluded state; Step S3: Detect the convexity defects between the contour point set of each cell and the corresponding convex hull, and quantify the feature parameters of each convexity defect; Step S4: Screen the convexity defects according to the characteristic parameters to determine significant depressions, mark cells with at least one significant depression as concave cells, and mark cells without significant depressions as convex cells. Step S5: Screen candidate cell pairs based on the spatial relationship between cells; Step S6: Determine the occlusion relationship between the two cells based on the convexity / concavity properties of the two cells in the candidate cell pair and the positional relationship between the centroid coordinates and the significantly concave area; Step S7: Construct an attribute graph with each cell as a node and the occlusion relationship as an edge, and generate a cell stacking hierarchy sequence through topological sorting.

[0009] Preferably, the feature parameter in step S3 includes the depth of the convex defect. convex defect width convex defect area and the direction of convex defects ;in: The depth of the convex defect The perpendicular distance from the farthest point of the convex defect to the boundary of the convex hull is denoted as . The width of the convex defect It is the arc length along the boundary of the convex hull between the starting and ending points of the convex defect; The area of ​​the convex defect The area of ​​the polygon bounded by the starting point, the ending point, and the contour points within the defect region; The convex defect direction The angle between the line connecting the farthest point of the convex defect and the cell centroid and the horizontal axis.

[0010] Preferably, the screening criteria for determining significant depressions in step S4 include: The depth of the convex defect Larger than the cell's equivalent radius With the first threshold coefficient The product; The area of ​​the convex defect Larger than the cell outline area With the second threshold coefficient The product; The width of the convex defect Larger than the cell's equivalent diameter With the third threshold coefficient The product; A convex defect is identified as a significant depression only when all three conditions above are met simultaneously.

[0011] Preferably, the first threshold coefficient The value is 0.2, and the second threshold coefficient The value is 0.05, and the third threshold coefficient is... The value is 0.25.

[0012] Preferably, the method for screening candidate cell pairs based on the spatial relationship between cells in step S5 includes: For any two cells, generate a binary mask with the same size as the original image based on the coordinates of their convex hull vertices. Perform a bitwise AND operation on the binary mask of two cells and count the number of pixels with a value of 1 in the result. When the number of pixels is greater than a preset overlap threshold When two cells are identified as overlapping cell pairs, they are included as candidate cell pairs.

[0013] Preferably, the method for screening candidate cell pairs based on the spatial relationship between cells in step S5 further includes contour proximity detection, wherein the contour proximity detection step is as follows: For cell pairs determined to be non-overlapping, calculate the minimum Euclidean distance between all point pairs on their actual contours. ; When the minimum Euclidean distance Less than the preset neighbor threshold When two cells are identified as adjacent cell pairs, they are included in the candidate cell pairs.

[0014] Preferably, in step S6, the occlusion relationship between two cells is determined using a convex-concave rule, wherein the convex-concave rule is as follows: When the first cell in a candidate cell pair is a convex cell and the second cell is a concave cell, and the centroid coordinates of the first cell fall within the significant concave region of the second cell or the distance between the first cell and the boundary of the significant concave region is less than a preset distance threshold, it is determined that the first cell is located above the second cell.

[0015] Preferably, step S6, in determining the occlusion relationship between two cells, further includes the biconcave rule, wherein the biconcave rule is: When both cells in a candidate cell pair are concave cells, compare the depth of the convexity defects that are significantly concave in each of the two cells. When the difference in convexity defect depth between two cells is greater than a preset depth difference threshold, the cell with the smaller convexity defect depth is determined to be above the cell with the larger convexity defect depth. When the difference in convexity defect depth between two cells is less than or equal to a preset depth difference threshold, the number of significant depressions in the two cells is compared, and the cell with fewer significant depressions is determined to be above the cell with more significant depressions.

[0016] Preferably, determining the occlusion relationship between the two cells in step S6 further includes a biconvex rule, wherein the biconvex rule is: When both cells in a candidate cell pair are convex cells, the two cells are determined to be at the same level, and the same-level relationship is recorded.

[0017] Preferably, the specific method for constructing the attribute graph and generating the cell stacking hierarchy sequence through topological sorting in step S7 is as follows: Each cell is treated as a node, and the occlusion relationships that are determined to be upper and lower layer relationships are treated as directed edges with the direction of the edges pointing from the upper layer cell to the lower layer cell. The occlusion relationships that are determined to be same layer relationships are treated as undirected edges. Calculate the in-degree of each node, add nodes with an in-degree of zero to the queue, and iteratively perform the following operations: remove a node from the queue and add it to the level sequence, delete all outgoing edges of the node and decrement the in-degree of the node it points to, and add nodes with an in-degree of zero to the queue. Group nodes connected by undirected edges into the same level group and output a cell stacking hierarchy sequence containing level group information.

[0018] The beneficial effects of the present invention include at least the following: First, the convex hull-contour comparison occlusion depression localization strategy proposed in this invention employs a three-level linkage method: contour extraction, convex hull calculation, and feature comparison. After extracting the visible edges of the cell, convex hull calculation is used to construct an ideal contour in the unoccluded state. Then, combined with convexity defect detection, the depression depth, area, and other features are accurately located and quantified. This strategy transforms visual distortion into quantifiable parameters, effectively solving the problem of distinguishing between occluded depressions and the cell's own morphological depressions, providing a reliable basis for subsequent occlusion judgment, and is applicable to hierarchical analysis of various convex basic cells.

[0019] Second, this invention establishes progressive rules for convexity / concavity determination, centroid verification, and multi-scene adaptation, enabling stable inference of cell occlusion direction. This system distinguishes between convex and concave cell attributes based on significant indentations: for convex-concave cell pairs, the positional relationship between the centroid and the indentation is verified using a point-polygon algorithm; for concave-concave cell pairs, a comprehensive judgment is made combining indentation features and centroid position; for convex-convex cell pairs, they are directly determined to be on the same layer. This system tightly binds geometric features with occlusion rules, solving the problem of ambiguous judgments in multi-layer stacking, and the reasoning process is transparent and traceable, meeting the needs of biological experiments.

[0020] Third, this invention employs an attribute graph model to integrate local occlusion relationships and uses an improved topological sorting algorithm to process nodes on the same layer, generating a globally consistent and logically conflict-free hierarchical sequence. This method can properly handle the special case of same-layer relationships, outputting structured cell stacking hierarchy results, which facilitates subsequent analysis and application.

[0021] Fourth, this invention does not rely on a large amount of labeled data and high-performance computing equipment. It only requires morphological analysis on conventional two-dimensional cell images to obtain reliable stacking hierarchy information, which significantly reduces technical costs and facilitates laboratory deployment and application. Attached Figure Description

[0022] Figure 1 This is a flowchart of the stacked cell hierarchy determination method based on contour concavity and convexity of the present invention; Figure 2 This is a binary image output after preprocessing the cell image in this invention; Figure 3 The results of cell contour extraction, cell convex hull calculation, and concave defects are shown in the image. Figure 4 This is a flowchart of the cell occlusion relationship determination method of the present invention; Figure 5 A diagram showing a microscopic image of cell stacking and its concavity / convexity analysis. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0024] This invention proposes a method for determining the stacked cell hierarchy in a single two-dimensional cell micrograph. Its core lies in transforming the geometric distortion of cell contours into direct evidence for judging the occlusion relationship between cells. It can accurately determine which cell is on top and which is below in key areas of cell overlap or adjacency. Closely based on the intuitive and stable physical law that occlusion of upper-layer cells leads to contour depressions in lower-layer cells, this invention provides a technical path for cell spatial hierarchy analysis that aligns with the realities of biological imaging. Figure 1 As shown, the method of the present invention includes the following steps: Step S1: Extract the contours of the binary image of the cells, obtain the contour point set of each cell, and calculate the centroid coordinates of each cell.

[0025] Specifically, mature contour extraction algorithms are used to process the preprocessed binary cell images, such as... Figure 2 As shown, an independent set of contour points for each cell in the image is obtained. These contour point sets reflect the visible edges of the cell under the current two-dimensional projection, including both complete boundaries and incomplete or recessed portions caused by occlusion from upper cells.

[0026] Subsequently, the geometric centroid of each cell contour is calculated, which is the average coordinate of all its contour points, and used as the reference point for the cell's position on the two-dimensional plane.

[0027] This step is the foundation for all subsequent geometric analyses and is a routine operation after image segmentation. It does not require researchers to change the existing analysis process and can be completed directly using general image processing tools.

[0028] Step S2: Calculate the convex hull for the contour point set of each cell, and use the convex hull as the ideal shape reference of the cell in the unoccluded state.

[0029] The convex hull is the smallest convex polygon that contains all points of the outline. For a cell with a near-circular shape, its convex hull can well simulate the ideal complete shape of the cell when it is not occluded by any other cells.

[0030] By calculating the convex hull of each cell's actual contour and comparing the two, the morphological differences caused by occlusion can be visually revealed—that is, the concave areas missing from the actual contour compared to its convex hull. This step provides a crucial geometric reference for subsequent quantitative analysis, transforming the abstract problem of morphological distortion into a problem of analyzing the geometric differences between the convex hull and the actual contour. Convex hull calculation can employ established methods such as the Graham scan algorithm or the Andrew monotonic chain algorithm.

[0031] Step S3: Detect the convexity defects between the contour point set of each cell and the corresponding convex hull, and quantify the feature parameters of each convexity defect.

[0032] like Figure 3 As shown, this step transforms the visual impression of indentation into quantifiable geometric features, constructs the core dataset for occlusion relationship analysis, and realizes the transformation from qualitative observation to quantitative analysis.

[0033] During the convexity defect localization process, the input consists of the actual cell contour vertex array and the convex hull vertex array. The output is a four-tuple of data for each defect, including the defect's start point, end point, farthest point, and the distance from the farthest point to the convex hull. This function accurately identifies all inwardly concave regions by calculating the directed distance from the contour points to the convex hull edges. For each detected convex defect, the following four quantized feature parameters are extracted: Convexity defect depth Defined as the perpendicular distance from the farthest point of a convex defect to the boundary of the convex hull, it directly reflects the degree of concavity. Let the coordinates of the farthest point be ( , The convex hull starts from the starting point ( , ) and termination point ( , If the distance is determined, then the depth calculation uses the point-to-line distance formula.

[0034] convex defect width Defined as the side length along the convex hull boundary between the starting and ending points of a convex defect, reflecting the lateral extent of the depression.

[0035] Convex defect area Defined as the area of ​​a polygon bounded by the starting point, ending point, and contour points within the defect region, it comprehensively reflects the scale of the depression. The polygon area can be calculated using the shoelace formula.

[0036] Convex defect direction Defined as the angle between the line connecting the farthest point of the convex defect and the cell centroid and the horizontal axis, the orientation of the depression is determined.

[0037] These indentation features and centroid locations together constitute the core data for analyzing occlusion relationships.

[0038] Step S4: Screen for convexity defects based on characteristic parameters to identify significant depressions. Mark cells with at least one significant depression as concave cells and cells without significant depressions as convex cells.

[0039] Among the detected convex defects, some may originate from the natural morphological undulations of the cells themselves or imaging noise. Therefore, it is necessary to retain significant depressions caused by occlusion through multi-dimensional screening to improve the pertinence and reliability of subsequent judgments.

[0040] The screening process uses a relative threshold based on cell size to avoid compatibility issues with cells of different sizes when using a fixed threshold. A convex defect is identified as a significant depression only if it simultaneously meets the following three conditions: convex defect depth... Larger than the cell's equivalent radius With the first threshold coefficient The product of; the area of ​​a convex defect Larger than the cell outline area With the second threshold coefficient The product of; the width of the convex defect Larger than the cell's equivalent diameter With the third threshold coefficient The product of.

[0041] In this embodiment, the first threshold coefficient The value is 0.2, the second threshold coefficient. The value is 0.05, the third threshold coefficient. The value is 0.25. That is, the depth of the indentation must be greater than one-fifth of the cell's equivalent radius, the area of ​​the indentation must be greater than one-twentieth of the total cell area, and the width of the indentation must be greater than one-quarter of the cell's equivalent diameter.

[0042] Furthermore, comparative verification and directional analysis can be combined to further improve screening accuracy. Isolated cells in the image, confirmed manually, are selected as references. The maximum depth and area of ​​their physiological depressions are statistically analyzed. Defects to be screened are compared with these ranges; defects exceeding these ranges are prioritized as significant depressions. Simultaneously, the variance of all defect directions within the same cell is calculated. If the variance is less than 5 degrees, it indicates concentrated directions, suggesting the depression may be caused by occlusion in the same direction, and is thus classified as a significant depression. If the directions are dispersed (variance greater than 15 degrees), it is classified as a physiological depression and removed. After screening, the selected significant depressions are marked on the image, and cell identifiers, depression feature data, and centroid coordinates are associated and stored to form a table linking significant depressions to cells.

[0043] Step S5: Screen candidate cell pairs based on the spatial relationship between cells.

[0044] Cell stacking is predicated on spatial relationships, including overlapping or close adjacency. This step uses spatial relationship analysis to screen potential stacking candidate cell pairs, avoiding invalid comparisons between irrelevant cells and improving computational efficiency.

[0045] Convex hull overlap detection is the primary step in the screening process. For any two cells, a binary mask with the same size as the original image is generated based on the coordinates of their convex hull vertices. A bitwise AND operation is performed on the two cell masks, and the number of pixels with a value of 1 in the result is counted. If the number of pixels exceeds a preset overlap threshold... When two cells are identified as overlapping cell pairs, they are included in the candidate cell pairs. In this embodiment, the overlap threshold is set to 8 pixels, which can be adjusted according to the image resolution.

[0046] For cell pairs determined to be non-overlapping, further contour proximity detection is performed. The minimum Euclidean distance between all point pairs on the actual contours of the two pairs is calculated. When the minimum Euclidean distance Less than the preset neighbor threshold At that time, two cells are identified as adjacent cell pairs and included in the candidate cell pairs. If the minimum distance is less than or equal to zero, they are identified as adjacent cell pairs with contour contact; if the minimum distance is greater than zero but less than or equal to 2 pixels, and the direction of the line connecting the centroids of the two cells is consistent with the direction of a significant indentation of one of the cells, they are identified as potential adjacent cell pairs. Finally, overlapping cell pairs and potential adjacent cell pairs are integrated to form a set of potential stacked candidate cell pairs. Each cell pair is associated with and stores cell identifier pairs, spatial relationship type, convex hull information, and contour distance data, which serve as the analysis objects for subsequent occlusion relationship determination.

[0047] Step S6: Determine the occlusion relationship between the two cells based on the convexity / concavity properties of the two cells in the candidate cell pair and the positional relationship between the centroid coordinates and the significantly concave area.

[0048] like Figure 4 As shown, based on the convex and concave properties of candidate cell pairs and the positional relationship between the centroid and the concavity, inference rules are constructed according to the physical occlusion law to clarify the occlusion flow direction between cells.

[0049] First, the cell convexity / concavity attribute is determined. Based on the association table between significant indentations and cells, cells with at least one significant indentation are marked as concave cells, and cells without significant indentations are marked as convex cells.

[0050] For each pair of cells in the candidate set, the occlusion relationship is determined according to the following three rules: The convexity / concavity determination rule applies when one candidate cell is convex and the other is concave. When the first cell is convex and the second cell is concave, and the centroid coordinates of the first cell fall within the significant concave region of the second cell or the distance between the first cell and the boundary of the significant concave region is less than a preset distance threshold, the first cell is determined to be above the second cell, and the occlusion flow direction is from the first cell to the second cell. This is the most direct evidence of occlusion, reflecting the physical law that upper-layer cell occlusion causes lower-layer cell concavity.

[0051] The biconcave rule applies when both cells in a candidate cell pair are concave. In this case, the depths of the convex defects of the two cells are compared. If the difference in convex defect depths between the two cells is greater than a preset depth difference threshold, the cell with the smaller convex defect depth is determined to be above the cell with the larger convex defect depth; that is, the cell with the deeper concavity is more likely to be occluded and is classified as the lower layer cell. If the difference in convex defect depths between the two cells is less than or equal to the preset depth difference threshold (i.e., their depths are similar), the number of significant concavities in the two cells is compared, and the cell with fewer significant concavities is determined to be above the cell with more significant concavities. If both depth and number are similar, the relationship between the centroid and the concavity is determined. If the centroid of the first cell falls into the concavity of the second cell and the centroid of the second cell does not fall into the concavity of the first cell, the first cell is determined to be above; otherwise, the second cell is above.

[0052] The biconvexity rule applies when both cells in a candidate cell pair are convex. If neither cell has a significant indentation, it means that neither is occluded by the other, and they overlap or are adjacent in space. Therefore, the two cells are determined to be at the same level, and their relationship within the same level is recorded, indicating no clear occlusion flow direction.

[0053] After determining the occlusion relationship of all candidate cell pairs, a cell pair occlusion relationship table is generated, recording the identifier, occlusion flow direction, and judgment basis for each cell pair.

[0054] Step S7: Construct an attribute graph with each cell as a node and occlusion relationships as edges, and generate a cell stacking hierarchy sequence through topological sorting.

[0055] This step integrates the local occlusion relationships of all cell pairs, and generates a globally consistent, logically conflict-free stacked hierarchical sequence through attribute graph model and topological sorting, thus clarifying the spatial location of each cell.

[0056] During the attribute graph construction process, each cell is treated as a node. Node attributes include cell identifier, equivalent circle parameters (center coordinates and radius), and global average gradient value. Edge construction is differentiated based on the type of occlusion relationship: occlusion relationships determined to be upper / lower layer relationships are treated as directed edges, with the edge direction pointing from the upper layer cell to the lower layer cell, consistent with the occlusion flow direction; occlusion relationships determined to be within the same layer are treated as undirected edges. Edge attributes can include direction and color attributes, where directed edges are marked as directed, and undirected edges are marked as undirected. Blue indicates a clear occlusion relationship, and red indicates a relationship within the same layer.

[0057] Topological sorting employs a modified Kahn algorithm to accommodate nodes at the same level. First, the in-degree of each node is calculated, representing the number of directed edges pointing to that node, i.e., the number of times the cell is occluded. Then, nodes with an in-degree of zero are added to a queue; these nodes have no upper-level occlusion and are at the top level. Next, the following iterative operations are performed: a node is removed from the queue and added to the level sequence; all outgoing edges from that node are deleted, and the in-degree of the nodes it points to is decremented by one; nodes with an in-degree of zero are added to the queue. This iteration continues until all nodes are sorted.

[0058] For special cases involving cycles in the graph, such as three cells occluding each other and forming a circular dependency, the global average gradient of nodes within the cycle is calculated, and the nodes are sorted from largest to smallest gradient value, with the cell having the largest gradient value being placed in the upper layer. Finally, nodes connected by undirected edges are grouped into the same level group, and the resulting stacked cell hierarchy sequence containing the level group information is output.

[0059] The final output is a structured sequence of cell stacking hierarchy. For example, an output of [cell A, (cell B, cell D), cell C] indicates that cell A is at the top, cells B and D are in the same layer, and cell C is at the bottom. A visualization can also be output, using different colors to mark cells at each layer, visually displaying the stacking structure. Figure 5 As shown, in an actual image of stacked cells, the method of this invention can accurately determine that cell A is convex and located in the upper layer, while cell B is concave and located in the lower layer due to being occluded, with the concave direction pointing towards the area where the centroid of the upper cell is located.

[0060] Through the aforementioned sequential implementation steps, this invention adds a clear and practical morphological hierarchical analysis link to existing cell image segmentation and contour extraction methods. Researchers can directly obtain reliable stacking hierarchy information from conventional two-dimensional cell images without requiring special imaging modes or complex machine learning models, providing strong support for subsequent cell spatial distribution analysis and cell interaction studies.

[0061] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0062] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0063] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.

Claims

1. A method for determining stacked cell hierarchy based on contour concavity and convexity, characterized in that, Includes the following steps: Step S1: Extract the contours of the binary cell image, obtain the contour point set of each cell, and calculate the centroid coordinates of each cell; Step S2: Calculate the convex hull for the contour point set of each cell, and use the convex hull as the ideal shape reference of the cell in the unoccluded state; Step S3: Detect the convexity defects between the contour point set of each cell and the corresponding convex hull, and quantify the feature parameters of each convexity defect; Step S4: Screen the convexity defects according to the characteristic parameters to determine significant depressions, mark cells with at least one significant depression as concave cells, and mark cells without significant depressions as convex cells. Step S5: Screen candidate cell pairs based on the spatial relationship between cells; Step S6: Determine the occlusion relationship between the two cells based on the convexity / concavity properties of the two cells in the candidate cell pair and the positional relationship between the centroid coordinates and the significantly concave area; Step S7: Construct an attribute graph with each cell as a node and the occlusion relationship as an edge, and generate a cell stacking hierarchy sequence through topological sorting.

2. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 1, characterized in that, The characteristic parameters mentioned in step S3 include the depth of the convex defect. convex defect width convex defect area and the direction of convex defects ;in: The depth of the convex defect The perpendicular distance from the farthest point of the convex defect to the boundary of the convex hull; The width of the convex defect It is the arc length along the boundary of the convex hull between the starting and ending points of the convex defect; The area of ​​the convex defect The area of ​​the polygon bounded by the starting point, the ending point, and the contour points within the defect region; The convex defect direction The angle between the line connecting the farthest point of the convex defect and the cell centroid and the horizontal axis.

3. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 2, characterized in that, The screening criteria for determining significant depressions in step S4 include: The depth of the convex defect Larger than the cell's equivalent radius With the first threshold coefficient The product; The area of ​​the convex defect Larger than the cell outline area With the second threshold coefficient The product; The width of the convex defect Larger than the cell's equivalent diameter With the third threshold coefficient The product; A convex defect is identified as a significant depression only when all three conditions above are met simultaneously.

4. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 3, characterized in that, First threshold coefficient The value is 0.2, and the second threshold coefficient The value is 0.05, and the third threshold coefficient is... The value is 0.

25.

5. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 1, characterized in that, The method for screening candidate cell pairs based on the spatial relationship between cells in step S5 includes: For any two cells, generate a binary mask with the same size as the original image based on the coordinates of their convex hull vertices. Perform a bitwise AND operation on the binary mask of two cells and count the number of pixels with a value of 1 in the result. When the number of pixels is greater than a preset overlap threshold When two cells are identified as overlapping cell pairs, they are included as candidate cell pairs.

6. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 5, characterized in that, Step S5, the method for screening candidate cell pairs based on the spatial relationship between cells, further includes contour proximity detection, the steps of which are as follows: For cell pairs determined to be non-overlapping, calculate the minimum Euclidean distance between all point pairs on their actual contours. ; When the minimum Euclidean distance Less than the preset neighbor threshold When two cells are identified as adjacent cell pairs, they are included in the candidate cell pairs.

7. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 1, characterized in that, In step S6, the occlusion relationship between two cells is determined using a convex-concave rule, where the convex-concave rule is as follows: When the first cell in a candidate cell pair is a convex cell and the second cell is a concave cell, and the centroid coordinates of the first cell fall within the significant concave region of the second cell or the distance between the first cell and the boundary of the significant concave region is less than a preset distance threshold, it is determined that the first cell is located above the second cell.

8. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 7, characterized in that, Step S6, determining the occlusion relationship between two cells, also includes the biconcave rule, which is: When both cells in a candidate cell pair are concave cells, compare the depth of the convexity defects that are significantly concave in each of the two cells. When the difference in convexity defect depth between two cells is greater than a preset depth difference threshold, the cell with the smaller convexity defect depth is determined to be above the cell with the larger convexity defect depth. When the difference in convexity defect depth between two cells is less than or equal to a preset depth difference threshold, the number of significant depressions in the two cells is compared, and the cell with fewer significant depressions is determined to be above the cell with more significant depressions.

9. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 8, characterized in that, Step S6, determining the occlusion relationship between the two cells, also includes the biconvex rule, which is: When both cells in a candidate cell pair are convex cells, the two cells are determined to be at the same level, and the same-level relationship is recorded.

10. The method for determining stacked cell hierarchy based on contour concavity and convexity according to claim 1, characterized in that, The specific method for constructing the attribute graph and generating the cell stacking hierarchy sequence through topological sorting in step S7 is as follows: Each cell is treated as a node, and the occlusion relationships that are determined to be upper and lower layer relationships are treated as directed edges with the direction of the edges pointing from the upper layer cell to the lower layer cell. The occlusion relationships that are determined to be same layer relationships are treated as undirected edges. Calculate the in-degree of each node, add nodes with an in-degree of zero to the queue, and iteratively perform the following operations: remove a node from the queue and add it to the level sequence, delete all outgoing edges of the node and decrement the in-degree of the node it points to, and add nodes with an in-degree of zero to the queue. Group nodes connected by undirected edges into the same level group and output a cell stacking hierarchy sequence containing level group information.

Citation Information

Patent Citations

  • Image segmentation method of convex polygon contour combining concave point and concave edge

    CN112270679A

  • Algae cell statistical method and system based on deep learning and image pattern recognition

    CN116597441A

  • Method and system for detecting migration ability of blood cells

    CN119180799A

  • Method for predicting morphologies of tissue cells and blood cells of fluorescence in-situ hybridization image

    CN119850629A

  • Coal gangue X-ray image concave defect detection and segmentation method based on deep learning

    CN120976149A

Cited By

  • Stacked cell level determination method and system based on multi-focal sharpness analysis

    CN122157255A

  • Stacked cell level determination method and system based on multi-focal sharpness analysis

    CN122157255B

  • Stacked cell hierarchy determination method based on contour completion and gradient quantization

    CN122290108A