Cell counting method based on cell image, electronic equipment and storage medium

By identifying and recombining the cell profiles cut by image segmentation in the cell image segmentation technology, the problem of inaccurate cell count caused by image segmentation in the prior art is solved, and higher cell count accuracy and reliability are achieved.

CN119863482APending Publication Date: 2025-04-22HANGZHOU ALLSHENG INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411941344.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the prior art, the inaccurate cell count due to image segmentation, especially when the cells fall on the segmentation line, may be split into two halves or more parts, resulting in the AI ​​model not being able to correctly identify or repeatedly identify these incomplete cells.

Method used

By segmenting the cell images into multiple sub-images, the original cell profile of each sub-image is extracted, the boundary cell profile and its orientation are determined, and the coordination cell profile is searched in the complementary direction, the local and coordination cell profiles are combined to recombinant cell profiles, and the accurate cell counting is finally performed based on the original and recombinant cell profiles.

Benefits of technology

It improves the accuracy of cell counts, reduces cell recognition errors caused by image segmentation, and ensures the reliability of cell count data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863482A_ABST
    Figure CN119863482A_ABST
Patent Text Reader

Abstract

The invention provides a cell counting method based on a cell image, electronic equipment, a storage medium and a computer program product, and relates to the field of cell counting through an image method.The counting method comprises the steps that the cell image is segmented into a plurality of sub-images, global cell contour extraction is conducted on each sub-image, and the original cell contour of each sub-image is obtained; for the original cell contour in each sub-image, determining a boundary cell contour in the sub-image and the direction of the boundary cell contour; taking any boundary cell profile as a standard cell profile, and searching in a complementary direction according to the direction of the standard cell profile to obtain a corresponding coordination cell profile; combining the standard cell profile and the coordination cell profile to obtain a recombinant cell profile; and counting the number of cells in the cell image according to the original cell contour and the recombinant cell contour, so as to solve the problem of inaccurate cell counting caused by image segmentation in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image-based cell counting, and in particular, to a cell counting method based on cell images, an electronic device, a storage medium, and a computer program product. Background Art

[0002] In biomedical research, accurate cell counting is crucial to the reliability of experimental results, which directly affects the statistical analysis of experimental data and the validity of conclusions. In the prior art, a common method is to divide an entire microscopic image into multiple small images to increase the pixel count ratio of small cells, thereby increasing the size of each cell in the image, which is conducive to model feature recognition based on AI neural networks. However, this method also introduces new problems. When cells fall on the dividing line, they may be divided into two halves or more, causing the AI ​​model to fail to correctly identify or repeatedly identify these incomplete cells. This leads to inaccurate cell counting data, which affects subsequent cell analysis and processing. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a cell counting method, electronic device, storage medium and computer program product based on cell images, which can solve the problem of inaccurate cell counting caused by image segmentation in the prior art by accurately identifying and reorganizing the cell contours cut due to image segmentation.

[0004] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0005] In a first aspect, an embodiment of the present application provides a cell counting method based on a cell image, comprising: dividing a cell image into multiple sub-images, extracting a global cell contour for each sub-image, and obtaining an original cell contour for each sub-image; for the original cell contour in each sub-image, determining a boundary cell contour in the sub-image and a direction of the boundary cell contour; taking any boundary cell contour as a local cell contour, searching in a complementary direction according to the direction of the local cell contour, and obtaining a corresponding coordinated cell contour; combining the local cell contour and the coordinated cell contour to obtain a recombined cell contour; and counting the number of cells in the cell image according to the original cell contour and the recombined cell contour.

[0006] In one embodiment, for the original cell contour in each sub-image, determining the boundary cell contour in the sub-image includes: calculating the roundness value of each original cell contour and judging whether the original cell contour has two breakpoints; judging the original cell contour whose roundness value is less than a preset threshold and whose contour has two breakpoints as a boundary cell contour.

[0007] In one embodiment, the roundness value of each original cell outline is calculated using the following formula:

[0008]

[0009] Among them, S is the area of ​​the original cell outline, and L is the perimeter of the original cell outline.

[0010] In one embodiment, the direction of the border cell contour is determined in the following manner: identifying a first breakpoint and a second breakpoint on the same border cell contour; determining the effective vector directions of the first breakpoint and the second breakpoint by a pixel neighborhood method; and determining the direction of the border cell contour based on the effective vector directions of the second breakpoint of the first breakpoint.

[0011] In one embodiment, the determining the effective vector directions of the first breakpoint and the second breakpoint by the pixel neighborhood method includes: respectively checking, for the first breakpoint and the second breakpoint, whether the neighborhood pixel points of the first breakpoint and the second breakpoint belong to the boundary cell contour; if a neighborhood pixel point does not belong to the boundary cell contour, marking an arrow on the neighborhood pixel point; and offsetting the arrows in opposite directions, and the direction of the unoffset arrow is the effective vector direction of the first breakpoint and the second breakpoint.

[0012] In one embodiment, determining the direction of the boundary cell contour based on the effective vector direction of the second breakpoint of the first breakpoint includes: performing vector decomposition on the effective vector direction, decomposing each effective vector direction into components in multiple predetermined directions; canceling out the components of the first breakpoint and the second breakpoint in opposite directions, and superimposing the components of the first breakpoint and the second breakpoint in the same direction; and obtaining a net vector direction based on the result of canceling and superimposing the components of the first breakpoint and the second breakpoint, wherein the net vector direction is the direction of the cell contour.

[0013] In one embodiment, any boundary cell contour is taken as the local cell contour, and according to the direction of the local cell contour, a search is made in its complementary direction to obtain a corresponding coordinated cell contour, including: judging the contour type of the boundary cell contour; if the contour type is a two-cut contour, searching for the corresponding coordinated cell contour in the complementary direction according to the direction of the two-cut contour; if the contour type is a four-cut contour, performing a first search in the first complementary direction according to the direction of the four-cut contour to obtain the corresponding first coordinated cell contour; and performing a second search in the second complementary direction to obtain the corresponding second coordinated cell contour.

[0014] In one embodiment, determining the contour type of the boundary cell contour includes: performing vector decomposition on the effective vector directions of the first breakpoint and the second breakpoint of the boundary cell contour; if the components of the first breakpoint and the second breakpoint in the vertical direction can offset or superimpose each other, and the components in the horizontal direction can also offset or superimpose each other, then the boundary cell contour is a two-cut contour; if the components of the first breakpoint and the second breakpoint in the vertical direction and the components in the horizontal direction cannot offset or superimpose each other, then the boundary cell contour is a four-cut contour.

[0015] In one embodiment, the combining the native cell contour and the ligand cell contour to obtain a recombinant cell contour includes: fitting the native cell contour and the ligand cell contour to obtain a recombinant cell contour with a continuous contour; and calculating the roundness value of the recombinant cell contour.

[0016] According to a second aspect of the present application, there is provided an electronic device, including:

[0017] A processor; a memory for storing processor executable instructions; wherein the processor is configured to execute the cell counting method based on cell images described in the above embodiment.

[0018] According to a third aspect of the present application, a storage medium storing a computer program is provided, and the computer program can be executed by a processor to complete the cell counting method based on cell images described in the above embodiment.

[0019] According to a fourth aspect of the present application, a computer program / instruction is provided, which, when executed by a processor, implements the cell counting method based on cell images described in the above embodiment.

[0020] The cell counting method based on cell images, electronic device, storage medium and computer program product provided in the above embodiments improve the search efficiency and speed up the cell counting by identifying the boundary cell contours and calculating the contour direction thereof, and searching for matching cell contours according to the complementary direction. By recombining the cut cell contours and adding the recombined cell contours to the complete original cell contours for counting, the final total number of cells is obtained, which improves the accuracy of cell counting and reduces the cell recognition errors caused by image segmentation, thereby ensuring the reliability of cell counting data. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A schematic diagram of cells being segmented on a boundary line provided in an embodiment of the present application;

[0023] Figure 2 A flowchart of a cell counting method based on cell images provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of an effect of extracting global cell contours using the image method provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of the morphology of the boundary cell outline with a roundness value close to 0.65 provided in an embodiment of the present application;

[0026] Figure 5 A flow chart for determining the direction of the boundary cell outline provided in an embodiment of the present application;

[0027] Figure 6 A schematic diagram of marking the direction of contour breakpoints using the pixel neighborhood method provided in an embodiment of the present application;

[0028] Figure 7 A flow chart for determining the direction of a boundary cell outline according to an effective vector direction provided in an embodiment of the present application;

[0029] Figure 8 A schematic diagram of forming a cell contour direction by a vector decomposition method using the contour breakpoint direction provided in an embodiment of the present application;

[0030] Fig. 9 A schematic diagram showing that the cell contour direction provided in the embodiment of the present application is downward;

[0031] Fig.10 A schematic diagram showing that the cell outline direction provided in the embodiment of the present application is toward the lower right;

[0032] Fig.11 A flow chart of a directional complementary search for matching cell contours provided in an embodiment of the present application;

[0033] Fig.12 A schematic diagram of a directional complementary search for left- and right-facing cell contours provided in an embodiment of the present application;

[0034] Fig.13A schematic diagram of a complementary direction search for upward and downward cell contours provided in an embodiment of the present application;

[0035] Fig.14 A schematic diagram of a four-cut cell contour search pairing process provided in an embodiment of the present application;

[0036] Fig.15 This is a recognition effect diagram provided in the embodiment of the present application without border cell recognition and reorganization;

[0037] Fig.16 This is a recognition effect diagram after implementing border cell recognition and reorganization provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0039] Figure 1 A schematic diagram of cells being segmented on a boundary line provided in an embodiment of the present application is shown in FIG. Figure 1 As shown in FIG. 1 , in the process of dividing a whole microscopic cell image into multiple sub-images, cells located on the image cutting line are called boundary cells. However, in the cell counting method of the prior art, the boundary cells are repeatedly identified and counted, resulting in inaccurate cell counting.

[0040] In order to solve the problem of inaccurate cell counting caused by image segmentation in the prior art, the present application provides a cell counting method based on cell images. Figure 2 A flowchart of a cell counting method based on cell images provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes the following steps S1-S5:

[0041] Step S1, dividing the cell image into multiple sub-images, performing global cell contour extraction on each sub-image, and obtaining the original cell contour of each sub-image.

[0042] Step S2: for each original cell outline in each sub-image, determine the boundary cell outline and the direction of the boundary cell outline in the sub-image.

[0043] Step S3: Taking any boundary cell contour as the local cell contour, searching in the complementary direction according to the direction of the local cell contour to obtain the corresponding coordinated cell contour.

[0044] Step S4: Combine the native cell outline and the coordinated cell outline to obtain a recombinant cell outline.

[0045] Step S5: Count the number of cells in the cell image according to the original cell outline and the reconstructed cell outline.

[0046] In some embodiments, step S1 divides the cell image into multiple sub-images, performs global cell contour extraction on each sub-image, and obtains the original cell contour of each sub-image, specifically including:

[0047] First, an entire microscopic cell image is divided into multiple sub-images. The purpose of this is to increase the pixel ratio of small cells in the image, thereby increasing the size of each cell, making the cell features more obvious and facilitating subsequent identification and counting.

[0048] Then, the global cell contour is extracted from each sub-image using the image method. In the process of extracting the cell contour, a series of image preprocessing operations are used, including but not limited to conventional image operations such as image denoising, edge sharpening, image erosion and dilation, and threshold segmentation, to enhance the visibility of the cell contour, reduce the interference of image noise, and improve the clarity of the cell boundary.

[0049] Finally, a global cell contour extraction is performed to obtain the original cell contour of each sub-image. The original cell contour may include a complete cell contour, or may include a half or 1 / 4 cell contour located at the boundary. The embodiments of the present application do not specifically specify which contour extraction technology to use, as long as the cell contour can be effectively extracted.

[0050] Exemplarily, first, median filtering is selected as a denoising method to denoise the image. Median filtering is an effective nonlinear filtering technology that can remove noise while maintaining cell edge features.

[0051] In order to enhance the edge features of the cell contour, Fourier transform is further used for high-pass filtering. This method can effectively highlight the high-frequency information of the cell contour and make the edge clearer.

[0052] Then, morphological erosion and dilation operations are performed to eliminate the breakpoints of the cell contour and fill the small holes in the contour to make the cell contour more complete.

[0053] Finally, the adaptive threshold segmentation technique is used to extract the cell contour. Adaptive threshold segmentation can dynamically determine the threshold according to the characteristics of the local image, so as to more accurately separate cells and background.

[0054] Figure 3 A schematic diagram of the effect of extracting global cell contours using the image method provided in the embodiment of the present application. Figure 3 As shown, through the above steps, clear cell contours can be effectively extracted from the sub-image.

[0055] In some embodiments, after the global cell contour is extracted, step S2 is performed, and the boundary cell contour in each sub-image is determined for the original cell contour in each sub-image, specifically including the following steps S201-S202:

[0056] Step S201, calculating the roundness value of each original cell contour and determining whether the original cell contour has two breakpoints.

[0057] Specifically, the cut cell contour is identified mainly by its "roundness value" and "whether there is a breakpoint in the contour". Exemplarily, whether there is a breakpoint can be determined by checking the continuity and integrity of the contour.

[0058] Among them, the "roundness value" is a parameter used to describe the shape of the cell contour, which quantifies the degree of closeness of the cell contour to the ideal circle. The calculation formula of the roundness value is as follows:

[0059]

[0060] Among them, S is the area of ​​the original cell outline, and L is the perimeter of the original cell outline.

[0061] Step S202: The original cell contour whose roundness value is less than a preset threshold and whose contour has two breakpoints is determined as a boundary cell contour.

[0062] Exemplarily, the preset threshold of the roundness value is set to 0.65. If the roundness value of an original cell contour is less than 0.65 and there are two breakpoints in the contour, it is judged as a boundary cell contour. The boundary cell contour refers to the segmented cell contour. Figure 4 The embodiment of the present application provides a morphological schematic diagram of a boundary cell contour with a roundness value close to 0.65, so a cell contour with a roundness value less than 0.65 and two breakpoints can be considered as a boundary cell contour.

[0063] In some embodiments, Figure 5 The flowchart for determining the direction of the boundary cell outline provided in the embodiment of the present application is as follows: Figure 5 As shown, the direction of the boundary cell outline in the sub-image in step S2 is specifically determined by steps S203 to S205:

[0064] Step S203: Identify a first breakpoint and a second breakpoint on the same boundary cell contour.

[0065] Specifically, in the extracted cell contours, discontinuous points on the contours are identified, which are breakpoints, which can be achieved by analyzing the pixel neighborhood of the contours or using morphological operations.

[0066] Step S204: Determine the effective vector directions of the first breakpoint and the second breakpoint by using a pixel neighborhood method.

[0067] Among them, the pixel neighborhood method is an image processing technology based on the relationship between pixels in an image and their surrounding neighboring pixels. This method takes into account the adjacency and connectivity between pixels and is usually divided into 4 neighborhoods and 8 neighborhoods. The pixel neighborhood method involves analyzing the characteristics of a pixel and its direct neighboring pixels (including horizontal, vertical and diagonal directions) to achieve various purposes of image analysis and processing.

[0068] In some embodiments, step S204 specifically includes the following steps S2041-S2042:

[0069] Step S2041: for the first breakpoint and the second breakpoint, check whether the neighboring pixels of the first breakpoint and the second breakpoint belong to the boundary cell contour respectively; if a certain neighboring pixel does not belong to the boundary cell contour, mark an arrow away from the corresponding breakpoint on the neighboring pixel.

[0070] Step S2042: cancel out the arrows in opposite directions, and the directions of the arrows that are not canceled out are the effective vector directions of the first breakpoint and the second breakpoint.

[0071] Specifically, take 8 neighborhood pixels around a breakpoint and divide them into 8 directions (up, down, left, right, upper left, lower left, upper right, and lower right). If the neighborhood pixel has no contour, mark an arrow away from the breakpoint. Finally, the opposite directions cancel each other out, and the remaining arrow direction is the vector direction v of the breakpoint.

[0072] For example, Figure 6 A schematic diagram of the direction of marking contour breakpoints using the pixel neighborhood method provided in an embodiment of the present application, such as Figure 6 As shown in the figure, points A and B are the breakpoints of the cell contour. The 8 neighborhood pixels around breakpoints A and B are divided into 8 directions (up, down, left, right, upper left, lower left, upper right, and lower right). There is no contour direction in the neighborhood pixels of breakpoints A and B. An arrow direction is marked, and then the arrows in opposite directions cancel each other to obtain the remaining arrows that are not canceled out at breakpoint A ( Figure 6 The direction of the solid arrow shown in the figure is upward to the right, that is, the effective vector direction of breakpoint A is upward to the right; the remaining arrows ( Figure 6 The direction of the solid arrow) is downward and right, that is, the effective vector direction of breakpoint B is downward and right, and the other directions cancel each other out.

[0073] Step S205: Determine the direction of the boundary cell outline according to the effective vector direction of the second breakpoint of the first breakpoint.

[0074] In some embodiments, the cell contour direction is formed by combining the effective vector directions of the first breakpoint and the second breakpoint, and the combination of different contour breakpoint directions can generate different contour directions. Specifically, Figure 7 A flow chart for determining the direction of the boundary cell outline according to the effective vector direction provided in the embodiment of the present application, such as Figure 7 As shown, step S205 specifically includes the following steps S2051-S2053:

[0075] Step S2051: perform vector decomposition on the effective vector direction, and decompose each effective vector direction into components in a plurality of predetermined directions.

[0076] Among them, vector decomposition is a process of decomposing a vector into two or more components. Its purpose is to simplify a complex vector problem into several simple component problems, so that it is easier to calculate and analyze. For example, in a two-dimensional plane, these components can be components along the x-axis and y-axis, or components along 8 directions (up, down, left, right, upper left, lower left, upper right, lower right), or components in any other predefined directions.

[0077] For example, Figure 8 A schematic diagram of forming a cell contour direction by a vector decomposition method using the contour breakpoint direction provided in the embodiment of the present application, as shown in FIG. Figure 8 As shown, the effective vector direction of breakpoint A is upper right, and the effective vector direction of breakpoint A is vector-decomposed into a component toward the right along the x-axis and a component toward the upper part along the y-axis; the effective vector direction of breakpoint B is lower right, and the effective vector direction of breakpoint B is vector-decomposed into a component toward the right along the x-axis and a component toward the lower part along the y-axis.

[0078] Step S2052: cancel out the components of the first breakpoint and the second breakpoint in opposite directions, and superimpose the components of the first breakpoint and the second breakpoint in the same direction.

[0079] Specifically, after determining the vector components of the breakpoints, the offset and superposition operations of the components are performed. For two breakpoints on the cell contour, if their components in a certain direction are opposite, these components are offset. If their components in the same direction are the same, these components are superimposed.

[0080] For example, Figure 8 As shown, after the A and B breakpoint vectors are decomposed, the upward component of breakpoint A along the y-axis and the downward component of breakpoint B along the y-axis cancel each other out, and the rightward component of breakpoint A along the x-axis and the rightward component of breakpoint B along the x-axis are superimposed.

[0081] Step S2053: Obtain a net vector direction based on the result of canceling and superimposing the components of the first breakpoint and the second breakpoint, where the net vector direction is the direction of the cell contour.

[0082] The net vector direction is the remaining vector direction after the component cancellation and addition operations are performed. This net vector direction represents the actual direction of the cell outline in space.

[0083] For example, Figure 8 As shown, the A and B breakpoint vectors are decomposed, and after the vertical directions are offset and the horizontal directions are superimposed, a net vector direction to the right is obtained. The net vector direction is the direction of the cell outline, that is, the cell outline shape is to the right.

[0084] Furthermore, combinations of different contour breakpoint directions can generate different contour directions. Fig. 9 The schematic diagram of the cell outline direction provided in the embodiment of the present application is downward, such as Fig. 9 As shown, breakpoints A and B belong to the same cell contour. Breakpoint A is oriented to the lower left, and breakpoint B is oriented to the lower right. After the A and B breakpoint vectors are decomposed, the left and right directions cancel each other out. After vertical superposition, the net vector direction is downward, that is, the cell contour direction is downward. Fig. 9 The boundary cell outline shown can be called a bisected cell outline, that is, one cell outline is divided into two parts.

[0085] For example, Fig.10 The cell outline direction provided in the embodiment of the present application is a schematic diagram toward the lower right, such as Fig.10 As shown, breakpoint A is pointing downward, breakpoint B is pointing rightward, and the effective vector direction of breakpoint A is vector-decomposed into lower left and lower right components, and the effective vector direction of breakpoint B is vector-decomposed into upper right and lower right components. After the A and B breakpoint vectors are decomposed, the lower left and upper right components cancel each other out, and after the lower right and lower right components are superimposed, the net vector direction is toward the lower right, and it is known that the cell contour is a four-section cell contour (i.e., a cell contour is divided into four parts), and it is the upper left part.

[0086] In some embodiments, after determining the direction of the boundary cell contour, step S3 is further performed to search for matching cell contours. Fig.11 The flowchart of the directional complementary search for matching cell contours provided in the embodiment of the present application is as follows: Fig.11As shown, step S3 takes any boundary cell contour as the native cell contour, searches in the complementary direction according to the direction of the native cell contour, and obtains the corresponding coordinated cell contour. The native cell contour refers to the cell contour regarded as the starting point or reference point in the cell image search process, and the coordinated cell contour refers to the cell contour part that is complementary to the native cell contour in direction and matches it in the image. When executing the direction complementary search pairing strategy, the coordinated cell contour is the search target to ensure that the segmented cells can be correctly identified and counted.

[0087] Step S3 specifically includes the following steps S301-S303:

[0088] Step S301: Determine the contour type of the boundary cell contour.

[0089] Specifically, the contour of the boundary cell contour is determined to be a two-cut contour or a four-cut contour. In some embodiments, step S301 specifically includes steps S3012-S3013:

[0090] Step S3011, performing vector decomposition on the effective vector directions of the first breakpoint and the second breakpoint of the boundary cell contour.

[0091] Specifically, the first breakpoint and the second breakpoint of the boundary cell contour are vector-decomposed into horizontal (x-axis) and vertical (y-axis) components, or decomposed into components in multiple predefined directions.

[0092] Step S3012: If the components of the first breakpoint and the second breakpoint in the vertical direction can offset or overlap each other, and the components in the horizontal direction can also offset or overlap each other, then the boundary cell contour is a two-cut contour.

[0093] Specifically, if the components of the two breakpoints in the vertical direction can offset or superimpose each other, and the components in the horizontal direction can also offset or superimpose each other, when both conditions are met, it means that the cell contour is divided in one of the vertical or horizontal directions, then it can be inferred that the cell contour is divided into two parts, namely the two-cut contour.

[0094] For example, Figure 6 As shown, after decomposing the A and B breakpoint vectors, the upward component of breakpoint A along the y-axis and the downward component of breakpoint B along the y-axis can cancel each other out, and the rightward component of breakpoint A along the x-axis and the rightward component of breakpoint B along the x-axis can be superimposed, that is, it can be determined that the cell contour is a two-cut contour.

[0095] Step S3013: If the components in the vertical direction and the components in the horizontal direction of the first breakpoint and the second breakpoint cannot offset or superimpose each other, the boundary cell contour is a four-cut contour.

[0096] Specifically, if the components of the two breakpoints in both the vertical and horizontal directions cannot cancel or add each other, this indicates that their trends in these directions are inconsistent. This situation usually indicates that the cell contour is split in both the vertical and horizontal directions to form four parts, namely the four-cut contour. In this way, the four-cut cell contour can be accurately identified, so that different treatment measures can be taken from the two-cut contour in the search in the complementary direction.

[0097] For example, Fig.11 As shown, the direction of the cell contour vector is downward and rightward. After decomposing the A and B breakpoint vectors, the components of the A and B breakpoints in the vertical and horizontal directions cannot offset and superimpose each other, that is, it can be determined that the cell contour is a four-cut contour.

[0098] Step S302: If the contour type is a two-cut contour, then according to the direction of the two-cut contour, search for the corresponding coordinated cell contour in a complementary direction.

[0099] Specifically, according to the direction V of the cell contour on the cutting line, a "complementary" priority search pairing is implemented. If a part of a cell contour is cut in a certain direction, then its complementary part is likely to be in the opposite direction. This greatly improves the efficiency and accuracy of the cell contour search pairing and saves calculation and time consumption.

[0100] For example, Fig.12 A schematic diagram of a directional complementary search for left- and right-facing cell contours provided in an embodiment of the present application, such as Fig.12 As shown, when a cutting cell contour direction V is identified x To the right, V x When searching, we prioritize the pairing of cell contours that face left. This strategy takes advantage of the geometric properties of cell contours, that is, the cell contour part that is cut is likely to have its corresponding complementary part on the other side of the image. By prioritizing the search for complementary directions, we can locate possible paired contours more quickly, thereby accelerating the pairing process. On the contrary, if the cell contour is cut in the direction V x To the left, the cell contour pairs facing right are searched preferentially.

[0101] Fig.13 A schematic diagram of a complementary search for the upward and downward cell contours provided in an embodiment of the present application, such as Fig.13 As shown, the same principle also applies to the vertical direction. If the direction V of cutting the cell contour is x If the direction is upward, the cell contour pairing facing downward is searched first. x Direction downward, prioritize searching for cell outline pairs facing upward.

[0102] Step S303: If the contour type is a four-cut contour, a first search is performed in a first complementary direction according to the direction of the four-cut contour to obtain a corresponding first coordinated cell contour; a second search is performed in a second complementary direction to obtain a corresponding second coordinated cell contour.

[0103] Specifically, for four-cut cells, the directional characteristics of their contours are the key to identification and reconstruction. The contour directions of four-cut cells are defined as the directions of four quadrants: upper left, upper right, lower left, and lower right. The contour direction of each quadrant corresponds to its complementary direction, that is, the direction of the upper left contour is lower right, the direction of the upper right contour is lower left, the direction of the lower left contour is upper right, and the direction of the lower right contour is upper left. This directional recognition is based on the pixel neighborhood method, which is achieved by analyzing the 8-neighborhood pixels around the breakpoint.

[0104] When searching and matching the cut cell contours of the four cuts, the two-cut cell contour search and matching method needs to be repeated twice, but the search direction is slightly different each time. Fig.14 A schematic diagram of the cell contour search pairing process of four cuts provided in the embodiment of the present application, such as Fig.14 As shown in the figure, if the cell contour direction of the four-cut is upper left, then its complementary direction is lower right. In this case, the first search matching direction can be rightward, and the second search matching direction can be downward; or the first search matching direction can be downward, and the second search matching direction can be rightward. This method allows searching in multiple directions to ensure that the matching cell contour that matches the native cell contour can be found.

[0105] With this method, the outlines of four-sectioned cells can be effectively identified and reconstructed, allowing accurate cell counting even when the cell outline is segmented into multiple parts.

[0106] In some embodiments, this directional complementary search strategy can be combined with other image processing techniques, such as feature point-based pairing techniques and phase difference-based pairing techniques. Among them, the feature point pairing technique matches the same features in different images by identifying key feature points in the image (such as corners, edges, etc.) and creating descriptors for these feature points. SIFT and SURF are well-known algorithms in this type of method, which can find corresponding feature points between different images and work effectively even when the image is rotated, scaled or the lighting changes.

[0107] Phase difference-based pairing methods use the frequency information of the image, especially the phase information, to determine the correspondence between images. Phase correlation is a typical phase difference-based pairing technique that finds the best match by analyzing the Fourier transform of the image. This method is particularly useful in image stitching and stereo vision.

[0108] These technologies each have their own advantages and applicable scenarios. The embodiments of this application do not specify which pairing technology to use, but can select the most appropriate method according to specific application requirements and image characteristics, or comprehensively apply the above or other pairing technologies to improve the accuracy and efficiency of cell contour search pairing at multiple levels.

[0109] In some embodiments, step S4, combining the native cell profile and the ligand cell profile to obtain a recombinant cell profile, specifically includes the following steps S401-S402:

[0110] Step S401, fitting the native cell contour and the coordinated cell contour to obtain a recombinant cell contour with a continuous contour.

[0111] Specifically, for the paired native cell contour and the coordinated cell contour, a fitting technique is used to allow the two contours to be accurately docked in complementary directions, eliminating their pairing offset errors, to ensure that the fitted contours are as continuous and close to the actual cell shape as possible. Among them, cell contour fitting technology is an image processing method that aims to approximate and describe the shape of the cell contour through a mathematical model. The contour fitting method can use the least binary method, the asymptotic method, etc. The embodiments of the present application do not specify a specific fitting method, and the most suitable fitting technology can be selected according to the specific application requirements and image characteristics. This flexibility allows the solution of the present application to adapt to different image processing scenarios.

[0112] Step S402: Calculate the roundness value of the reconstructed cell outline.

[0113] Specifically, after fitting the paired cell contours, the roundness of the fitted cell contours needs to be checked. This not only improves the accuracy of cell recognition and segmentation, but also provides important quantitative data for cell morphology analysis, and enhances the adaptability and automation level of the algorithm. By setting an appropriate recombinant cell roundness value threshold, qualified recombinant cell contours can be effectively distinguished and identified, thereby improving the accuracy and reliability of cell counting.

[0114] The roundness value calculation formula is as follows:

[0115]

[0116] Among them, S is the contour area and L is the contour perimeter.

[0117] Exemplarily, 0.65 is used as the qualified standard for the roundness value. When the roundness value of the reconstructed cell outline is greater than 0.65, the reconstructed cell outline can be considered to be circular or nearly circular, and thus is considered to be a qualified reconstructed cell outline.

[0118] In some embodiments, step S5, count the number of cells in the cell image according to the original cell outline and the reorganized cell outline, specifically, by accurately identifying the cell outlines that are cut due to image segmentation, and effectively recombining these cut parts. In this process, the reorganized cell outline is counted as a complete cell unit, ensuring that each cell is counted only once, thereby significantly improving the accuracy of cell counting. Finally, these reorganized cell outlines are counted together with the original cell outlines that have not been cut to obtain the total number of cells in the cell image. This method ensures the accuracy of cell counting and makes the results of cell image analysis more reliable.

[0119] Fig.15 This is a recognition effect diagram provided in the embodiment of the present application without border cell recognition and reorganization. Fig.16 This is a recognition effect diagram after implementing boundary cell recognition and reorganization provided in the embodiment of the present application. The cell recognition effect can be compared Fig.15 and Fig.16 For intuitive display. Fig.15 As shown in the figure, the number of cells selected is the number of cells counted. Before using the scheme of the present application, the cut cells will be counted incorrectly or repeatedly, for example, a cut cell will be selected twice and identified as two cells; Fig.16 As shown, each independent and continuous recombinant cell outline is regarded as a complete cell and is counted only once, which significantly improves the accuracy of cell counting.

[0120] Finally, the reorganized cell outlines are added to the identified original cell outlines for counting to obtain the final total number of cells. This method can not only more accurately reflect the actual number of cells in the sample, but also solve the problem of inaccurate cell counting caused by image segmentation in the prior art. Through this method, the embodiment of the present application provides a reliable cell counting solution that can provide researchers and doctors with more accurate and reliable cell counting results, thereby supporting more precise biological analysis and clinical decision-making.

[0121] An embodiment of the present application also provides an electronic device, which may include a processor and a memory for storing instructions executable by the processor, and the processor is configured to implement the steps of the cell counting method based on cell images in any of the above embodiments.

[0122] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to complete the steps of the cell counting method based on cell images in any of the above embodiments.

[0123] An embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the cell counting method based on cell images in any of the above embodiments.

[0124] In summary, the technical solution provided by the embodiment of the present invention has the following advantages:

[0125] By accurately identifying and reorganizing the cell contours that were cut due to image segmentation, each cell is counted only once, which significantly improves the accuracy of cell counting. At the same time, the use of a directional complementary search and matching method improves the efficiency of finding matching cell contours, reduces the consumption of computing resources, and speeds up cell counting.

[0126] By using the pixel neighborhood method and vector decomposition technology, the technical solution provided by the embodiment of the present invention can accurately determine the direction of the cell contour, optimize the recognition process of the cell contour, and thus improve the quality of cell image analysis.

[0127] The technical solution provided by the embodiment of the present invention does not rely on specific cell morphology or size, has strong robustness, and can adapt to cell image analysis under different conditions, including processing large-scale image data.

[0128] The technical solution provided by the embodiment of the present invention is suitable for high-throughput cell image analysis, can process large-scale cell data sets, is applicable to the fields of drug screening, disease diagnosis, etc., and improves the speed and efficiency of data processing.

[0129] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative.

[0130] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0131] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A cell counting method based on cell images, characterized in that: The following steps are involved: The cell image is divided into multiple sub-images, and the global cell contour is extracted for each sub-image to obtain the original cell contour of each sub-image; For the original cell contour in each sub-image, determining the boundary cell contour in the sub-image and the direction of the boundary cell contour; Taking any boundary cell contour as the local cell contour, searching in the complementary direction according to the direction of the local cell contour to obtain the corresponding coordination cell contour; Combining the native cell profile and the ligand cell profile to obtain a recombinant cell profile; The number of cells in the cell image is counted according to the original cell outline and the reconstructed cell outline.

2. The method according to claim 1, characterized in that The step of determining the boundary cell contour in each sub-image for the original cell contour in the sub-image includes: Calculating the roundness value of each original cell outline and determining whether the original cell outline has two breakpoints; The original cell contour whose roundness value is less than a preset threshold and whose contour has two breakpoints is determined as a boundary cell contour.

3. The method according to claim 2, characterized in that The circularity value of each original cell outline is calculated using the following formula: Among them, S is the area of ​​the original cell outline, and L is the perimeter of the original cell outline.

4. The method according to claim 1, characterized in that: The orientation of the boundary cell outline is determined in the following way: Identify the first breakpoint and the second breakpoint on the same border cell outline; Determine the effective vector directions of the first breakpoint and the second breakpoint by using a pixel neighborhood method; The direction of the boundary cell outline is determined according to the effective vector direction of the second breakpoint of the first breakpoint.

5. The method according to claim 4, characterized in that The determining the effective vector directions of the first breakpoint and the second breakpoint by using a pixel neighborhood method comprises: For the first breakpoint and the second breakpoint, respectively, checking whether the neighboring pixel points of the first breakpoint and the second breakpoint belong to the boundary cell contour, if a certain neighboring pixel point does not belong to the boundary cell contour, marking an arrow on the neighboring pixel point; The arrows in opposite directions are offset, and the direction of the unoffset arrow is the effective vector direction of the first breakpoint and the second breakpoint.

6. The method according to claim 4, characterized in that Determining the direction of the boundary cell outline according to the effective vector direction of the second breakpoint of the first breakpoint includes: Performing vector decomposition on the effective vector direction, decomposing each effective vector direction into components in a plurality of predetermined directions; Perform a cancellation operation on the components of the first breakpoint and the second breakpoint in opposite directions, and perform a superposition operation on the components of the first breakpoint and the second breakpoint in the same direction; According to the result of canceling and superimposing the components of the first breakpoint and the second breakpoint, a net vector direction is obtained, and the net vector direction is the direction of the cell contour.

7. The method according to claim 1, characterized in that The method of taking any boundary cell contour as the local cell contour and searching in a complementary direction according to the direction of the local cell contour to obtain the corresponding coordinated cell contour comprises: Determining the contour type of the boundary cell contour; If the contour type is a two-cut contour, searching for a corresponding coordination cell contour in a complementary direction according to the direction of the two-cut contour; If the contour type is a four-cut contour, a first search is performed in a first complementary direction according to the direction of the four-cut contour to obtain a corresponding first coordinated cell contour; a second search is performed in a second complementary direction to obtain a corresponding second coordinated cell contour.

8. The method according to claim 7, characterized in that The determining of the contour type of the boundary cell contour comprises: Performing vector decomposition on the effective vector directions of the first breakpoint and the second breakpoint of the boundary cell contour; If the components of the first breakpoint and the second breakpoint in the vertical direction can offset or superimpose each other, and the components in the horizontal direction can also offset or superimpose each other, then the boundary cell contour is a two-cut contour; If the components in the vertical direction and the components in the horizontal direction of the first breakpoint and the second breakpoint cannot offset or superimpose each other, the boundary cell contour is a four-cut contour.

9. The method according to claim 1, characterized in that: The step of combining the native cell profile and the ligand cell profile to obtain a recombinant cell profile comprises: Fitting the native cell contour and the ligand cell contour to obtain a recombinant cell contour with a continuous contour; The circularity value of the reconstructed cell outline is calculated.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the cell counting method based on cell image according to any one of claims 1-9.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the cell counting method based on cell images according to any one of claims 1 to 9.

12. A computer program product, characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the cell counting method based on cell image according to any one of claims 1 to 9.