Image contour recognition method and device for cell mass
Through morphological processing and image segmentation algorithm, combined with geometric feature evaluation, the problem of difficult to balance recognition accuracy and sensitivity in cell clump recognition is solved, and efficient cell clump segmentation and size measurement is achieved, adapting to a variety of image characteristics and reducing subjective errors.
Patent Information
- Application Number
- CN202510857154.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-25
AI Technical Summary
The prior art is difficult to adapt to challenges such as different image noise levels, uneven light and diverse cell shapes in cell cluster recognition, resulting in difficult to balance recognition accuracy and sensitivity, and manual measurement is inefficient and lack of standardization.
Morphological processing, expansion operation, distance transformation and marker-based image segmentation algorithm are adopted, combined with geometric feature evaluation and filtration, to achieve accurate segmentation and contour recognition of cell clusters, and converted into equivalent spherical diameters to improve recognition efficiency.
Accurate segmentation of adjacent or adhesion cell clusters is achieved, the accuracy and efficiency of cell cluster counting and size measurement is improved, and different image characteristics are adapted to and reduce subjective errors.
Smart Images

Figure CN120355736A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biological image processing, and particularly relates to a method and device for identifying the image contour of cell clusters. Background Art
[0002] In the fields of cell therapy related to stem cell differentiation research, islet transplantation, etc., researchers often need to manually measure the size and contour of cell clusters from microscope photos, and further convert them into equivalent islet equivalents (IEQ) for evaluating cell quality and quantity. This process is cumbersome and susceptible to subjective judgment, with low efficiency and lack of standardization. Although there are some image processing tools, most of them cannot flexibly adapt to challenges such as different degrees of image noise, uneven illumination, and diverse cell shapes, and it is difficult to balance recognition accuracy and sensitivity to meet the needs of scientific research and industrialization. Summary of the Invention
[0003] In view of the above defects or deficiencies in the prior art, the present invention provides a method and device for identifying the image contour of cell clusters, which can be flexibly adjusted to adapt to various image characteristics, and can efficiently complete cell cluster recognition, contour drawing, diameter measurement, and IEQ conversion, enabling the system to balance recognition accuracy and sensitivity.
[0004] In one aspect of the present invention, a method for identifying the image contour of cell clusters is provided, including the following steps: converting the input cell cluster image into a binary image, and sequentially performing morphological closing operation and morphological opening operation on the binary image; performing a dilation operation on the image after morphological operations to obtain a first image with an enlarged foreground area; performing a distance transformation on the image after morphological operations to obtain a second image containing the accurate foreground area; performing a subtraction operation on the first image and the second image to obtain a third image containing unknown areas; detecting the connected areas in the accurate foreground area according to the first image, the second image, and the third image, marking each independent connected area, background area, and unknown area to obtain a marked image; performing region segmentation on the original image based on the marked image to obtain a dividing line and the segmented marked areas, traversing each marked area, generating a corresponding binary mask image, and using the binary mask image to extract the contour of each marked area; evaluating and filtering the contour of each marked area according to geometric features to obtain the effective contour of the cell cluster; converting the size of the effective contour of each cell cluster into an equivalent spherical diameter.
[0005] On the other hand, the present invention also provides an image contour recognition device for cell clusters, comprising: a first module configured to convert an input cell cluster image into a binary image and sequentially perform morphological closing operation and morphological opening operation on the binary image; a second module configured to perform dilation operation on the image after morphological operation to obtain a first image with an enlarged foreground region; perform distance transformation on the image after morphological operation to obtain a second image containing an accurate foreground region; perform subtraction operation on the first image and the second image to obtain a third image containing unknown regions; a third module configured to detect connected regions in the accurate foreground region according to the first image, the second image and the third image, mark each independent connected region, background region and unknown region to obtain a marked image; a fourth module configured to perform region segmentation on the original image based on the marked image to obtain a dividing line and segmented marked regions, traverse each marked region, generate a corresponding binary mask image, and extract the contour of each marked region by using the binary mask image; a fifth module configured to evaluate and filter the contour of each marked region according to geometric features to obtain an effective contour of the cell cluster; a sixth module configured to convert the size of the effective contour of each cell cluster into an equivalent spherical diameter.
[0006] The image contour recognition method and device for cell clusters provided by the present invention can efficiently achieve accurate segmentation of adjacent or adhered regions in an image through algorithms such as comprehensive morphological processing, dilation operation, distance transformation, marker-based image segmentation, and recognition of effective image regions, thereby effectively separating tightly stacked cell clusters and obtaining accurate counting and size measurement of cell clusters. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments with reference to the following drawings: Figure 1 is a flowchart of an image contour recognition method for cell clusters provided by an embodiment of the present application; Figure 2 is an original image of cell clusters provided by an embodiment of the present application; Figure 3 is a binary image with high contrast provided by an embodiment of the present application; Figure 4 is a schematic diagram of the image after region segmentation provided by an embodiment of the present application; Figure 5 is a schematic diagram of the final effective marked region provided by an embodiment of the present application; Figure 6 is a schematic diagram of the continuous image processing process of the image contour recognition method for cell clusters provided by an embodiment of the present application; Figure 7 It is a schematic structural diagram of an image contour recognition device for cell clusters provided by another embodiment of the present application; Figure 8 It is a schematic structural diagram of an electronic device provided by another embodiment of the present application. Detailed implementation manners
[0008] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0009] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention are also intended to include the plural forms unless the context clearly indicates otherwise.
[0010] It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present invention to describe the acquisition modules, these acquisition modules should not be limited to these terms. These terms are only used to distinguish the acquisition modules from each other.
[0011] Depending on the context, the word "if" as used herein can be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detecting (stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".
[0012] It should be noted that the orientation terms such as "upper", "lower", "left", "right", etc. described in the embodiments of the present invention are described from the angles shown in the drawings, and should not be construed as limiting the embodiments of the present invention. In addition, in the context, it should also be understood that when it is mentioned that an element is formed "on" or "under" another element, it can not only be directly formed "on" or "under" another element, but also be indirectly formed "on" or "under" another element through an intermediate element.
[0013] An embodiment of the present application provides a method for recognizing the image contour of cell clusters. The present application takes the image recognition of islet cell clusters as an example for illustration, but the method of this embodiment is also equally applicable to the images of other types of cell clusters.
[0014] SeeFigure 1 , the method for recognizing the image contour of a cell cluster includes the following steps: Step S101, convert the input cell cluster image into a binary image, and sequentially perform morphological closing operation and morphological opening operation on the binary image.
[0015] Figure 2 is the original image of the cell cluster. To enhance the boundary of the input microscopic image of the cell cluster, reduce noise, and improve the contrast between cell clusters, this step converts the input image into a high-contrast binary image suitable for subsequent segmentation algorithms, such as Figure 3 shown, the specific processing algorithm is as follows: Convert the original RGB or BGR three-channel color image into a single-channel grayscale image to prepare for threshold processing and blurring operations; Perform global binarization on the single-channel grayscale image, only retaining pixels with brightness higher than a specified threshold, and excluding background or weak signal regions; Perform Gaussian smoothing on the binarized image to suppress random noise in the image and improve the stability and effect of subsequent adaptive threshold segmentation; Determine the window size parameter for local threshold calculation, set the window size to an odd number, and dynamically set it according to a preset length ratio (usually 1 / 20 of the smaller side length of the image); then set the threshold adjustment constant for controlling the segmentation sensitivity between the foreground and the background, and calculate the dynamic threshold of the local window where each pixel point in the image is located based on the Gaussian weighting algorithm; compare the current pixel grayscale value with the dynamic threshold, and generate a binary image according to the comparison result. For example, when the pixel value is lower than the dynamic threshold, output a grayscale value of 255 (white), and when it is higher than the dynamic threshold, output a grayscale value of 0 (black).
[0016] It should be noted that the above binarization algorithm is for images with uneven illumination. By locally dynamically calculating the threshold for binarization processing, different from the global threshold method, it can better retain the details of different brightness regions.
[0017] Furthermore, in this embodiment, morphological operations are introduced to enhance the segmentation quality and boundary clarity of islet cell clusters in images. The structural kernel size is one of the core parameters in morphological operations, which determines the scope of action and scale sensitivity of morphological operations. In this embodiment, this size is set by the user, and the system generates an elliptical structural element of the corresponding size through the structural kernel size to adapt to different-sized cell image regions. Generally, a larger kernel size means that in morphological operations, the coverage range of each erosion and dilation is wider, which is suitable for processing the connection of cell clusters or noise removal in large-range areas. If the structural kernel is too small, the closing operation may not be able to effectively connect adjacent cell clusters; conversely, if the structural kernel is too large, multiple independent cells may be wrongly connected, or the true edge may be over-smoothed. Therefore, an appropriate kernel size should be selected according to the average size of cell clusters in the target image to achieve the best morphological effect. In this embodiment, the structural element is set to an ellipse, which is more suitable for circular or irregularly shaped cell structures in biological images. The size of the structural element is set to an odd number, such as 3, 5, 7, etc., to maintain the central symmetry of the convolution.
[0018] Furthermore, first perform a morphological closing operation on the binary image. The closing operation first performs a dilation process and then an erosion process, which is used to connect adjacent but not fully contacted cell cluster regions. For example: after thresholding, there may be broken edges or small gaps, and the closing operation can effectively fill these gaps to ensure that cell clusters are recognized as a whole. Then, perform a morphological opening operation, that is, erode first and then dilate, which is used to remove small noise points or artifacts in the image while keeping the main cell cluster structure unchanged. This can further improve the accuracy of subsequent contour extraction.
[0019] Step S102: Perform a dilation operation on the image after morphological operations to obtain a first image with an enlarged foreground region; perform a distance transformation on the image after morphological operations to obtain a second image containing the accurate foreground region; perform a subtraction operation on the first image and the second image to obtain a third image containing unknown regions.
[0020] Specifically, taking a simple 5×5 binary image pixel matrix as an example: [0 0 0 0 0] [0 255 255 0 0] [0 255 255 0 0] [0 0 0 255 255] [0 0 0 255 255] Here, 255 represents the gray value of suspected foreground pixels (object part), and 0 represents the gray value of suspected background pixels (non-object part).
[0021] First, perform denoising processing and dilation operation on the above binary image to obtain the first image. The dilation operation expands a part of the above foreground pixel region towards the background pixel region to enlarge the area of the suspected foreground pixel region (255 pixel value region), so as to include all foreground pixels as much as possible when separating foreground pixels subsequently.
[0022] The pixel matrix after the dilation operation is as follows: [255 255 255 0 0] [255 255 255 255 0] [255 255 255 255 0] [0 255 255 255 255] [0 0 255 255 255] Next, obtain the determined foreground region through distance transformation to get the second image. Specifically, calculate the distance between each 255 pixel point (foreground) in the binary image pixel matrix and the nearest 0 pixel point (background). If the calculated distance value of a certain 255 pixel point is greater than the preset threshold, then retain this pixel point as a foreground pixel; otherwise, set this 255 pixel point to 0 (i.e., become a background pixel). The purpose of the above distance transformation is to only retain those pixel points that are far enough from the background as foreground pixels, and they are more likely to be the real object itself, so as to finally obtain a more accurate foreground mask matrix as shown in the following figure: [0 0 0 0 0 ] [0 0 255 0 0 ] [0 0 255 0 0 ] [0 0 0 255 0] [0 0 0 0 0 ] Finally, perform an element-by-element subtraction operation on the first image and the second image to obtain the third image containing unknown regions. The unknown region refers to the region that is uncertain whether it is an object or a background. The pixel matrix of the third image is as follows: [255 255 255 0 0] [255 255 0 255 0] [255 255 0 255 0] [0 255 255 0 255] [0 0 255 255 255] The 255 pixel points in the above pixel matrix are unknown regions, that is: neither obvious foreground nor obvious background, but a region surrounding the edge of the object.
[0023] Step S103: Detect the connected regions in the accurate foreground region according to the first image, the second image, and the third image, mark each independent connected region, background region, and unknown region to obtain a marked image.
[0024] Specifically, all mutually connected foreground regions in the image are regarded as independent connected regions, and each connected region is given a unique mark, such as integer marks 2 and 3. Then, each background region is assigned the mark 1, and each unknown region is assigned the mark 0. This embodiment does not limit the type of the mark, and other numbers or characters can also be used as unique marks.
[0025] Exemplarily, the marked image matrix is as follows: [0 0 0 1 1] [0 0 2 0 1] [0 0 2 0 1] [1 0 0 3 0] [1 1 0 0 0] In the above matrix, label 1 is the background, label 2 is an independent connected region, label 3 is another independent connected region, and label 0 is the unknown region.
[0026] Step S104: Perform region segmentation on the original image based on the marked image to obtain the dividing line and the segmented marked regions, traverse each marked region, generate a corresponding binary mask image, and extract the contour of each marked region using the binary mask image.
[0027] Specifically, starting from the local minimum pixel value points in each independent connected region, expand to the pixels in adjacent regions and gradually expand to the unknown region. When the expansion regions starting from different starting points meet, the meeting pixel points form the dividing line between the two expansion regions. In other words, starting from the marked accurate foreground and accurate background, expand to adjacent pixels according to the principle that the smaller the pixel value, the higher the priority. Whichever region reaches this pixel first belongs to that marked region until two different regions reach a certain pixel simultaneously, obtaining the dividing line between the accurate foreground and the accurate background, or the dividing line between accurate foregrounds. The unknown region precisely obtains the boundary between each cell mass image by gradually filling the pixels between the accurate foreground and the accurate background regions or between each accurate foreground region.
[0028] Mark the dividing line as -1, thus obtaining the following array: [ 0, 0, 0, 1, 1] [ 0, 0, 2, -1, 1 ] [ 0, -1, 2, -1, 1] [ 1, -1, -1, 3, 0] [1, 1, 0, 0, 0] From the above array, the segmented marked regions can be seen. These segmented marked regions also correspond to the segmented binary images, as Figure 4 shown. Since the structural details of the cell mass are relatively complex, the contour cannot usually be directly extracted from the segmented binary image. Therefore, in this embodiment, each of the marked regions is traversed, and a corresponding binary mask image is generated according to the label number, and the contour of each marked region (corresponding to the segmented binary image) is extracted by using the binary mask image. Since each mask image is a very clean binary image that only shows the shape of one object, using this mask to extract the contour will be more reliable than directly extracting the contour on the entire image.
[0029] Exemplarily, the process of obtaining the binary mask image is as follows: Assume that the marked image array is: [1 1 1 1 1] [1 2 2 3 1] [1 2 2 3 1] [1 4 4 3 1] [1 1 1 1 1] Among them, 1 represents the background region, the connected region formed by 2 represents the marked region A, the connected region formed by 3 represents the marked region B, and the connected region formed by 4 represents the marked region C; Then, the mask array of the marked region A can be expressed as: [0 0 0 0 0] [0 255 255 0 0] [0 255 255 0 0] [0 0 0 0 0] [0 0 0 0 0] The mask array of the marked region B can be expressed as: [0 0 0 0 0] [0 0 0 255 0] [0 0 0 255 0] [0 0 0 255 0] [0 0 0 0 0] The mask array of the marked region C can be expressed as: [0 0 0 0 0] [0 0 0 0 0] [0 0 0 0 0] [0 255 255 0 0] [ 0 0 0 0 0 ] Step S105, evaluate and filter the contour of each marked area according to geometric features to obtain the effective contour of the cell mass.
[0030] This step combines multi-dimensional geometric features such as area, perimeter, roundness, aspect ratio, and linearity to filter and eliminate the invalid contours of the cell mass caused by real biological contours, edge noise, and cropping residues, and obtain the effective contour of the cell mass, as Figure 5 shown.
[0031] Specifically, the filtering and elimination algorithm includes: Calculate the contour area of each marked area. If the contour area is outside the preset threshold range, it means that the contour does not conform to the size of the cell mass, and the marked area is eliminated.
[0032] Calculate the contour perimeter of each marked area, and eliminate the marked areas with the contour perimeter lower than the preset threshold. For example, eliminate the contour with a perimeter of 0.
[0033] Calculate the contour roundness of each marked area according to the following formula. When the contour roundness is lower than the preset threshold, eliminate the marked area: where represents roundness, represents the contour area, represents the contour perimeter. This step eliminates stretched lines of non-natural shapes, background fragments, etc.
[0034] Obtain the minimum bounding rectangle of the contour of each marked area, extract the aspect ratio of the rectangle. If the aspect ratio is higher than the preset threshold, it means that the shape is too stretched and does not conform to the expected natural contour feature. Therefore, eliminate the marked area.
[0035] Simplify the contour of each marked area. If the number of vertices of the simplified contour is lower than the preset threshold, eliminate the marked area. For example, if the number of vertices is less than 6, it means that the contour shape is too simple and may be an artificial edge.
[0036] Detect the proximity of the contour points of each marked area to the four sides of the minimum bounding rectangle. If more than the preset proportion of the contour points are closer to a certain side of the minimum bounding rectangle and these contour points have a small coordinate variance, it means that it conforms to the edge cropping feature, that is, the cell mass is not complete but a cropped image. Therefore, eliminate the marked area.
[0037] Calculate the included angle for consecutive line segments on the contour of each marked region. If the number of consecutive line segments with an included angle reaching 180° is greater than the preset threshold, then fit the contour of the marked region into a straight line, and determine whether the number of contour points whose distance from the fitted straight line is less than the preset threshold is higher than the preset ratio, such as 80%. If so, it indicates that the contour is more likely to be an artificial straight line, so the marked region is removed.
[0038] The above-mentioned contour recognition and filtering scheme of this embodiment can effectively remove the residual contours of edge truncation, background debris in non-target regions, and shapes that are bionic but do not have structural complexity.
[0039] Step S106, convert the size of the effective contour of each cell cluster into an equivalent spherical diameter.
[0040] Since researchers often need to manually measure the size and contour of cell clusters from microscope photos, this process is very cumbersome and error-prone. To overcome this technical problem, this embodiment uses the equivalent spherical diameter as the representative diameter index of cell clusters, which can enable the computer to quickly calculate the size of each cell cluster.
[0041] Specifically, calculate the equivalent spherical diameter ESD of the cell cluster contour according to the following formula: ESD = where, represents the area of the effective contour. The unit of ESD is μm.
[0042] Furthermore, if the cell cluster is an islet cell cluster, then according to the conversion relationship between the equivalent spherical diameter and the islet equivalent, convert cell clusters of different sizes into corresponding islet equivalents. Specifically, the conversion relationship between the equivalent spherical diameter (unit: μm) and the islet equivalent unit (islet equivalent) is shown in the following table: The calculation parameters (including number, area, ESD, IEQ, roundness, and position information) of all cell clusters in this embodiment can be exported in a structured CSV file format, supporting subsequent quality control and data analysis processes. At the same time, this embodiment also supports image annotation output, which can intuitively display the position and number of each cell cluster in the image.
[0043] Figure 6 is a schematic diagram of the continuous image processing process corresponding to the above steps, which more completely reflects the contour recognition process of the cell cluster image.
[0044] The method for recognizing the image contour of cell clusters provided by the present invention can efficiently achieve the accurate segmentation of adjacent or adhered regions in the image through algorithms such as comprehensive morphological processing, dilation operation, distance transformation, marker-based image segmentation, and recognition of effective image regions. Thus, it can effectively distinguish tightly stacked cell clusters and obtain an accurate count of cell clusters.
[0045] See Figure 7 , another embodiment of the present invention further provides an image contour recognition device 200 for cell clusters, which at least includes: a first module 201, a second module 202, a third module 203, a fourth module 204, a fifth module 205, and a sixth module 206. The image contour recognition device 200 for cell clusters can execute the method for recognizing the image contour of cell clusters in the method embodiment.
[0046] Specifically, the image contour recognition device 200 for cell clusters includes: The first module 201 is configured to convert the input cell cluster image into a binary image and sequentially perform morphological closing operation and morphological opening operation on the binary image; The second module 202 is configured to perform a dilation operation on the image after morphological operation to obtain a first image with an enlarged foreground region; perform a distance transformation on the image after morphological operation to obtain a second image containing the accurate foreground region; perform a subtraction operation on the first image and the second image to obtain a third image containing unknown regions; The third module 203 is configured to detect the connected regions in the accurate foreground region according to the first image, the second image, and the third image, mark each independent connected region, background region, and unknown region to obtain a marked image; The fourth module 204 is configured to perform region segmentation on the original image based on the marked image to obtain the segmented marked regions, traverse each of the marked regions, generate corresponding binary mask images, and extract the contours of each marked region using the binary mask images; The fifth module 205 is configured to evaluate and filter the contours of each marked region according to geometric features to obtain the effective contours of cell clusters; The sixth module 206 is configured to convert the size of the effective contour of each cell cluster into an equivalent spherical diameter.
[0047] It should be noted that the image contour recognition device 200 for cell clusters provided in this embodiment can be used to execute the technical solutions of the method embodiments. Its implementation principle and technical effects are similar to those of the method, and will not be elaborated here.
[0048] See Figure 8, Another embodiment of the present invention further provides a schematic structural diagram of an electronic device 300, which is used to implement the method for identifying the image contour of cell clusters in the method embodiments. The electronic device 300 in the embodiments of the present invention may include, but is not limited to, a smart phone, a PDA, a PC, a laptop computer, and a server. Figure 8 The illustrated electronic device 300 is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0049] As Figure 8 shown, the electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage device 308 into the random access memory (RAM) 303 to implement the method of the embodiments described in the present invention. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other through a bus 305. The input / output (I / O) interface 304 is also connected to the bus 305.
[0050] Generally, the following devices may be connected to the I / O interface 304: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 8 the illustrated electronic device 300 has various devices, it should be understood that it is not required to implement or include all the illustrated devices. Instead, more or fewer devices may be implemented or included.
[0051] The above description is only a preferred embodiment of the present invention. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present invention.
Claims
1. An image contour recognition method for cell clusters, characterized in that, The steps include: Converting the input cell cluster image into a binary image, and sequentially performing a morphological closing operation and a morphological opening operation on the binary image; Performing a dilation operation on the image after the morphological operation to obtain a first image after the foreground area is enlarged; performing a distance transform on the image after the morphological operation to obtain a second image containing an accurate foreground area; performing a subtraction operation on the first image and the second image to obtain a third image containing an unknown area; According to the first image, the second image and the third image, the connected regions in the accurate foreground region are detected, and each independent connected region, background region and unknown region is marked to obtain a marked image; Based on the marked image, the original image is segmented into regions to obtain a boundary line and a segmented marked region, each of the marked regions is traversed to generate a corresponding binary mask image, and the contour of each marked region is extracted using the binary mask image; The contour of each marked area is evaluated and filtered according to the geometric features to obtain the valid contour of the cell cluster; The dimensions of the effective contour of each cell cluster were converted to an equivalent spherical diameter.
2. The method for recognizing the image contour of a cell mass according to claim 1, wherein The step of converting the input cell cluster image into a binary image comprises: Convert the input original three-channel color image into a single-channel grayscale image; Perform global binarization on the single-channel grayscale image, retaining only pixels with brightness higher than a preset threshold; Perform Gaussian smoothing on the image after global binarization to suppress random noise in the image; Dynamically set the window size parameters for calculating the local threshold of each pixel, calculate the local dynamic threshold of each pixel in the image based on the Gaussian weighted algorithm according to the threshold adjustment constant, compare the gray value of the current pixel with the local dynamic threshold, and generate a binary image based on the comparison result.
3. The method for identifying the image contour of a cell mass according to claim 1, wherein, The step of evaluating and filtering the contour of each marked area according to the geometric features to obtain the effective contour of the cell cluster comprises: Calculate the contour area of each marked area, and if the contour area is outside a preset threshold range, remove the marked area; Calculate the contour perimeter of each marked area, and remove the marked areas whose contour perimeter is lower than a preset threshold; The contour circularity of each marked area is calculated according to the following formula, and the marked area is removed when the contour circularity is lower than the preset threshold: Among them, represents roundness, represents the profile area, represents the profile perimeter; Obtain the minimum circumscribed rectangle of the outline of each marked area, extract the aspect ratio of the rectangle, and if the aspect ratio is higher than a preset threshold, remove the marked area; Simplify the outline of each marked area, and if the number of vertices of the simplified outline is lower than a preset threshold, the marked area is removed; Detect the proximity between the contour points of each marked area and the four sides of the minimum circumscribed rectangle. If more than a preset proportion of contour points are closer to a side of the minimum circumscribed rectangle and these contour points have a smaller coordinate variance, the marked area is removed. Further, calculate the included angle for consecutive line segments on the contour of each marked region. If the number of consecutive line segments with an included angle reaching 180° is greater than a preset threshold, fit the contour of the marked region into a straight line, and determine whether the number of contour points with a distance less than the preset threshold from the fitted straight line is higher than the preset ratio. If so, eliminate the marked region.
4. The method for identifying the image contour of a cell mass according to claim 3, characterized in that, The step of converting the size of the effective contour of each cell mass into an equivalent spherical diameter includes: Calculate the equivalent spherical diameter ESD according to the following formula: ESD = Among them, represents the contour area.
5. The method for recognizing the image contour of a cell mass according to claim 4, wherein It further includes: If the cell mass is an islet cell mass, convert islet cell masses of different sizes into corresponding islet equivalents according to the conversion relationship between the equivalent spherical diameter and the islet equivalent.
6. An image contour recognition device for cell clusters, characterized in that, It includes: A first module configured to convert an input cell mass image into a binary image, and sequentially perform a morphological closing operation and a morphological opening operation on the binary image; A second module configured to perform a dilation operation on the image after morphological operations to obtain a first image with an enlarged foreground region; perform a distance transformation on the image after morphological operations to obtain a second image containing the accurate foreground region; Perform a subtraction operation on the first image and the second image to obtain a third image containing unknown regions; A third module configured to detect connected regions in the accurate foreground region according to the first image, the second image, and the third image, mark each independent connected region, background region, and unknown region to obtain a marked image; A fourth module configured to perform region segmentation on the original image based on the marked image to obtain a boundary line and the segmented marked regions, traverse each marked region, generate a corresponding binary mask image, and extract the contour of each marked region using the binary mask image; A fifth module configured to evaluate and filter the contour of each marked region according to geometric features to obtain the effective contour of the cell mass; A sixth module configured to convert the size of the effective contour of each cell mass into an equivalent spherical diameter.
7. The image contour recognition device for a cell mass according to claim 6, characterized in that, The first module is further configured to: Convert an input original three-channel color image into a single-channel grayscale image; Perform global binarization processing on the single-channel grayscale image, and only retain pixels with a brightness higher than a preset threshold; Perform Gaussian smoothing processing on the image after global binarization processing to suppress random noise in the image; Dynamically set the window size parameter for calculating the local threshold of each pixel point, calculate the local dynamic threshold of each pixel point in the image based on the threshold adjustment constant using the Gaussian weighting algorithm, compare the gray value of the current pixel point with the local dynamic threshold, and generate a binarized image according to the comparison result.
8. An image contour recognition device for a cell mass according to claim 6, characterized in that, The fifth module is further configured to: Calculate the contour area of each marked region. If the contour area is outside the preset threshold range, eliminate the marked region; Calculate the contour perimeter of each marked region, and eliminate the marked regions with a contour perimeter lower than the preset threshold; Calculate the contour roundness of each marked region according to the following formula, and eliminate the marked region when the contour roundness is lower than the preset threshold: Among them, represents roundness, represents profile area, represents profile perimeter; Obtain the minimum circumscribed rectangle of the contour of each marked region, extract the aspect ratio of the rectangle. If the aspect ratio is higher than the preset threshold, eliminate the marked region; Simplify the contour of each marked region. If the number of vertices of the simplified contour is lower than a preset threshold, then eliminate the marked region; Detect the proximity of the contour points of each marked region to the four sides of the minimum bounding rectangle. If more than a preset proportion of the contour points are closer to a certain side of the minimum bounding rectangle and these contour points have a small coordinate variance, then eliminate the marked region; Moreover, calculate the included angle of consecutive line segments on the contour of each marked region. If the number of consecutive line segments with an included angle reaching 180° is greater than a preset threshold, then fit the contour of the marked region to a straight line, and determine whether the number of contour points with a distance less than a preset threshold from the fitted straight line is higher than a preset proportion. If so, then eliminate the marked region.
9. An image contour recognition device for a cell mass according to claim 8, characterized in that The sixth module is further configured to: Calculate the equivalent spherical diameter ESD according to the following formula: ESD = Among them, represents the contour area.
10. An image contour recognition device for a cell mass according to claim 9, characterized in that, It further includes: A seventh module, configured to, if the cell mass is an islet cell mass, convert islet cell masses of different sizes into corresponding islet equivalents according to the conversion relationship between the equivalent spherical diameter and the islet equivalent.
Citation Information
Patent Citations
Image segmentation method based on watershed algorithm and morphological marker
CN103914843A
A plot extraction method and an apparatus for a remote sensing image
CN109409176A
Image processing method and device, storage medium and electronic equipment
CN114972020A
Cervical liquid-based cell segmentation method and system based on watershed
CN115511815A
FISH microscopic image cell segmentation method
CN118379734A
Cited By
Standardized equivalent automatic calculation method and system for iPSC-source islet cells
CN122415611A
Standardized equivalent automatic calculation method and system for iPSC-derived pancreatic islet cells
CN122415611B
