Chromosome straightening method, device, computer equipment and storage medium

By binarizing chromosome images and skeleton extraction, the curved center of the chromosome is accurately determined and straightened with this as a benchmark, the straightening problem of inaccurate straightening caused by inaccurate filamentation points in traditional methods is solved, and the accuracy and completeness of chromosome straightening are improved.

CN114581310BActive Publication Date: 2025-04-04SHENZHEN REETOO BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011375270.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-04-04
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

In traditional chromosome straightening methods, the threading point may not be the curved center of the chromosome, resulting in low accuracy of straightening.

Method used

By performing binarization and skeleton extraction on the chromosome image, the positive angle of the chromosome is determined and the positive image is turned on. The bending center is determined based on the horizontal projection vector of each row in the positive image, and the straightening process is performed based on this.

Benefits of technology

Improve the accuracy of chromosome straightening and ensure the integrity of chromosome band information in straightened chromosome images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114581310B_ABST
    Figure CN114581310B_ABST
Patent Text Reader

Abstract

The present application relates to a chromosome straightening method, device, computer equipment and storage medium. The method comprises: binarizing a chromosome image to obtain a binary image of the chromosome; extracting a skeleton from the binary image; determining the rotation angle of the chromosome according to the extracted skeleton; rotating the chromosome in the binary image according to the rotation angle to obtain a rotated image; determining the bending center of the chromosome according to the horizontal projection vector of each row in the rotated image; and straightening the chromosome in the chromosome image based on the bending center. The method can improve the accuracy of chromosome straightening.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology and image processing technology, and in particular to a chromosome straightening method, apparatus, computer equipment and storage medium. Background Art

[0002] In the work of chromosome karyotype analysis, it is often necessary to process and analyze chromosome images. However, due to the different development of chromosomes, longer chromosomes often bend during development, which increases the difficulty of chromosome karyotype analysis. Therefore, it is very important to straighten the chromosomes in the chromosome image.

[0003] In traditional methods, the centromere of the chromosome in the chromosome image is generally determined as the bending center, and then the chromosome arms on both sides of the centromere are straightened with the centromere as the center to achieve chromosome straightening. However, it has been observed that the centromere is not necessarily the bending center of the chromosome, resulting in low accuracy of this method of using the centromere as the bending center for chromosome straightening. Summary of the invention

[0004] Based on this, it is necessary to provide a chromosome straightening method, device, computer equipment and storage medium that can improve the accuracy of straightening in response to the above technical problems.

[0005] A chromosome straightening method, the method comprising:

[0006] Binarization is performed on the chromosome image to obtain a binary image of the chromosome;

[0007] Performing skeleton extraction on the binary image;

[0008] Determining the rotation angle of the chromosome according to the extracted skeleton;

[0009] The chromosomes in the binary image are normalized according to the normalization angle to obtain a normalized image;

[0010] Determining the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image;

[0011] The chromosomes in the chromosome image are straightened based on the bending center.

[0012] In one embodiment, determining the rotation angle of the chromosome according to the extracted skeleton comprises:

[0013] Determine the starting and ending points of the extracted skeleton;

[0014] Determine a line connecting the starting point and the ending point;

[0015] The angle at which the connecting line is rotated to a vertical direction is determined as the rotation angle of the chromosome.

[0016] In one embodiment, before determining the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image, the method further includes:

[0017] Determine the radius of curvature of each point on the extracted skeleton;

[0018] If the curvature radius of at least one point is less than or equal to a preset threshold, it is determined that the chromosome needs to be straightened, and the bending center of the chromosome and subsequent steps are determined according to the horizontal projection vector of each row in the straightened image.

[0019] In one embodiment, determining the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image comprises:

[0020] Determine a horizontal projection vector of each row according to the normalized image;

[0021] A global minimum value between two maximum values ​​within a preset range of the normalized image is determined from the horizontal projection vectors of each row; the global minimum value corresponds to the bending center.

[0022] In one embodiment, the straightening of the chromosomes in the chromosome image based on the bending center includes:

[0023] Using the row where the bending center is located as a cutting line, the chromosome image is cut into two images of chromosome arms;

[0024] The chromosome arms in the two chromosome arm images are respectively normalized to obtain two normalized chromosome sub-images;

[0025] The two chromosome-corrected sub-images are spliced ​​together to obtain a straightened chromosome image.

[0026] In one of the embodiments, before extracting the skeleton of the binary image, the method further comprises:

[0027] Preprocessing the binary image using a flood filling algorithm and an expansion erosion algorithm to obtain a preprocessed binary image;

[0028] The skeleton extraction of the binary image comprises:

[0029] Performing skeleton extraction on the preprocessed binary image;

[0030] The step of normalizing the chromosomes in the binary image according to the normalization angle to obtain a normalized image comprises:

[0031] According to the rotation angle, the chromosomes in the preprocessed binary image are rotated to obtain a normalized image.

[0032] A chromosome straightening device, comprising:

[0033] A binarization module is used to perform binarization processing on the chromosome image to obtain a binary image of the chromosome;

[0034] A skeleton extraction module, used for performing skeleton extraction on the binary image;

[0035] A rotation angle determination module, used to determine the rotation angle of the chromosome according to the extracted skeleton;

[0036] A rotation module, used for rotating the chromosomes in the binary image according to the rotation angle to obtain a normalized image;

[0037] A bending center determination module, used to determine the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image;

[0038] The straightening module is used to straighten the chromosomes in the chromosome image based on the bending center.

[0039] In one embodiment, the rotation angle determination module is also used to determine the starting point and the end point of the extracted skeleton; determine the line connecting the starting point and the end point; rotate the line to a vertical angle, and determine it as the rotation angle of the chromosome.

[0040] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps in the chromosome straightening method described in each embodiment of the present application.

[0041] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor executes the steps in the chromosome straightening method described in each embodiment of the present application.

[0042] The above-mentioned chromosome straightening method, device, computer equipment and storage medium first binarize the chromosome image to obtain a binary image of the chromosome, then extract the skeleton of the binary image, determine the rotation angle of the chromosome according to the extracted skeleton, and rotate the chromosome in the binary image according to the rotation angle to obtain a rotated image, and then determine the bending center of the chromosome according to the horizontal projection vector of each row in the rotated image. Since the bending center of the chromosome is the narrowest point between the two arms of the chromosome, the bending center of the chromosome can be accurately determined according to the horizontal projection vector of each row, so that the chromosome in the chromosome image is straightened based on the accurately determined bending center, thereby improving the accuracy of chromosome straightening. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a schematic diagram of a chromosome straightening method in one embodiment;

[0044] Figure 2 A comparison diagram before and after skeleton extraction in one embodiment;

[0045] Figure 3 is a schematic diagram of a horizontal projection vector in a normalized image in one embodiment;

[0046] Figure 4 A comparison diagram of chromosomes before and after straightening in one embodiment;

[0047] Figure 5 is a structural block diagram of a chromosome straightening device in one embodiment;

[0048] Figure 6 is a structural block diagram of a chromosome straightening device in another embodiment;

[0049] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] In one embodiment, Figure 1 As shown, a chromosome straightening method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0052] S102, binarizing the chromosome image to obtain a binary image of the chromosome.

[0053] Among them, the chromosome image is the image of the chromosome taken. Binarization processing is the process of setting the gray value of the pixel points on the image to 0 or 255, that is, the whole image presents an obvious black and white effect. The chromosome binary image is the image obtained after the chromosome image is binarized.

[0054] In one embodiment, the chromosome image may be an image of chromosomes segmented from a cell image captured by a microscope.

[0055] It can be understood that in the binary image of chromosomes, the white foreground part is the chromosome area, and the black background part is the non-chromosome area.

[0056] In one embodiment, the terminal may first convert the chromosome image into a grayscale image, and then perform binarization processing on the grayscale image.

[0057] In one embodiment, the terminal may perform binarization processing on the grayscale image of the chromosome by threshold segmentation to obtain a binary image of the chromosome.

[0058] In one embodiment, in the binary image obtained by the binarization process, the pixel value of the background pixel is 0, and the pixel value of the chromosome region is 255. In one embodiment, the terminal can convert the binary image obtained by the binarization process into a binary image with pixel values ​​of only 0 or 1. In one embodiment, the terminal can convert the binary image with pixel values ​​of 0 or 255 into a binary image with pixel values ​​of 0 or 1 according to the following formula:

[0059]

[0060] Among them, t(x,y) is the pixel value at the pixel point (x,y) in the binary image with a pixel value of 0 or 255, and T(x,y) is the pixel value at the pixel point (x,y) in the binary image with a pixel value of 0 or 1 after conversion.

[0061] In one embodiment, the terminal may perform skeleton extraction and subsequent steps on the binary image according to the binary image with pixel values ​​of 0 or 1 obtained after the conversion.

[0062] S104, extracting the skeleton of the binary image.

[0063] Among them, skeleton extraction is a process of extracting the skeleton of the chromosome region (ie, the white foreground part) in the binary image. The skeleton can be understood as the central axis.

[0064] Specifically, the terminal may perform skeleton extraction on the binary image through a thinning algorithm.

[0065] In one embodiment, the terminal may preprocess the binary image to optimize the quality of the binary image, and then perform skeleton extraction on the preprocessed binary image. In one embodiment, the terminal may preprocess the binary image by at least one of a flood filling algorithm and an expansion corrosion algorithm.

[0066] It can be understood that preprocessing the binary image first and then performing skeleton extraction on the preprocessed binary image can avoid burrs or broken sections in the extracted skeleton.

[0067] like Figure 2 , which is a schematic diagram of a binary image before and after skeleton extraction. The left picture is a binary image, and the right picture is a skeleton obtained after skeleton extraction of the binary image.

[0068] S106, determining the rotation angle of the chromosome according to the extracted skeleton.

[0069] The rotation angle is the rotation angle of the chromosome. Rotation means rotating the chromosome to a vertical direction.

[0070] In one embodiment, the terminal may determine the rotation angle of the chromosome according to the main direction of the extracted skeleton.

[0071] In one embodiment, the terminal may determine the rotation angle of the chromosome according to the direction of the line connecting the starting point and the end point of the extracted skeleton.

[0072] S108, rotating the chromosomes in the binary image according to the rotation angle to obtain a normalized image.

[0073] The normalized image is a binary image obtained by normalizing the chromosomes in the binary image of the chromosomes.

[0074] Specifically, the terminal may perform an affine transformation according to the rotation angle to rotate the chromosomes in the binary image to obtain a rotated image.

[0075] S110, determining the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image.

[0076] The horizontal projection vector is the projection vector obtained by projecting the pixels of a row in the normalized image horizontally (i.e., projecting onto the y-axis). The value of the horizontal projection vector represents the sum of the pixel values ​​on the row corresponding to the horizontal projection vector. The bending center is the point on the chromosome with the greatest degree of bending.

[0077] It can be understood that if the pixel value in the binary image is 0 or 1, the sum of the pixel values ​​on the row is also the number of pixels (i.e., white pixels) with a pixel value of 1 in the row. That is, if the pixel value in the binary image is 0 or 1, the value of the horizontal projection vector represents the number of pixels (i.e., white pixels) with a pixel value of 1 in the row corresponding to the horizontal projection vector.

[0078] Specifically, the terminal can determine the bending center of the chromosome according to the size of the horizontal projection vector of each row in the normalized image. It can be understood that the two arms of the chromosome are relatively thick, and the bending center between the two arms is relatively thin. Therefore, the terminal can determine the thinnest part between the two arms of the chromosome as the bending center of the chromosome according to the size of the horizontal projection vector of each row in the normalized image.

[0079] like Figure 3 As shown, the left figure is a normalized image, and the right figure is a curve chart of the horizontal projection vector value of each row in the normalized image, the horizontal axis is the index of the row in the normalized image, and the vertical axis is the horizontal projection vector value. It can be seen from the curve chart that the horizontal projection vector value at the position marked by 302 is just located between the positions where the horizontal projection vectors on both sides are relatively large, so the row corresponding to the position 302 can be determined as the row where the bending center of the chromosome is located.

[0080] In one embodiment, the terminal can determine whether the chromosome needs to be straightened. In one embodiment, if straightening is required, the terminal can perform the following steps to determine the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image to straighten the chromosome.

[0081] In one embodiment, if straightening is not required, the terminal may not perform straightening and straightening processing on the chromosome image. In another embodiment, if straightening is not required, the terminal may also perform the steps of determining the rotation angle of the chromosome according to the extracted skeleton, and straightening the chromosome in the binary image according to the rotation angle to obtain a straightened image to straighten the chromosome, but there is no need to perform the steps of determining the bending center of the chromosome according to the horizontal projection vector of each row in the straightened image and subsequent steps, that is, there is no need to perform straightening processing.

[0082] In one embodiment, the terminal may determine whether the chromosome needs to be straightened based on the extracted skeleton.

[0083] S112, taking the bending center as a reference, straightening the chromosomes in the chromosome image.

[0084] Specifically, the terminal can use the bending center as a reference to straighten the chromosome arms on both sides of the bending center, thereby achieving chromosome straightening.

[0085] like Figure 4As shown, the left picture is the original chromosome image without straightening, and the right picture is the chromosome image after straightening.

[0086] In the above-mentioned chromosome straightening method, the chromosome image is first binarized to obtain a binary image of the chromosome, and then the binary image is subjected to skeleton extraction. The rotation angle of the chromosome is determined based on the extracted skeleton, and the chromosome in the binary image is rotated according to the rotation angle to obtain a rotated image. Then, the bending center of the chromosome is determined based on the horizontal projection vector of each row in the rotated image. Since the bending center of the chromosome is the narrowest point between the two arms of the chromosome, the bending center of the chromosome can be accurately determined based on the horizontal projection vector of each row, so that the chromosome in the chromosome image is straightened based on the accurately determined bending center, thereby improving the accuracy of chromosome straightening.

[0087] In one embodiment, determining the rotation angle of a chromosome based on an extracted skeleton includes: determining the starting point and the end point of the extracted skeleton; determining a line connecting the starting point and the end point; and rotating the line to a vertical angle to determine the rotation angle of the chromosome.

[0088] The connecting line is a line segment obtained by connecting the starting point and the ending point or a straight line where the line segment is located.

[0089] Specifically, the terminal can first determine the starting point and the end point of the extracted skeleton, then determine the line connecting the starting point and the end point, and then determine the rotation angle of the line to the vertical direction, and determine the rotation angle as the rotation angle of the chromosome.

[0090] In this embodiment, the terminal can quickly determine the rotation angle of the chromosome according to the extracted skeleton. Compared with the inefficient method of rotating the chromosome at various angles in turn and then selecting the final rotation angle from various angles according to the specific conditions of the chromosome after rotation at various angles, the efficiency of determining the rotation angle is improved and system resources are saved.

[0091] In one embodiment, before determining the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image, the method also includes: determining the radius of curvature of each point on the extracted skeleton; if the radius of curvature of at least one point is less than or equal to a preset threshold, it is determined that the chromosome needs to be straightened, and the bending center of the chromosome and subsequent steps are determined according to the horizontal projection vector of each row in the normalized image.

[0092] The radius of curvature is the radius of the arc closest to the curve at a certain point on the curve. The radius of curvature is the reciprocal of the curvature. The curvature of a plane curve is the rotation rate of the tangent direction angle at a certain point on the curve to the arc length, indicating the degree to which the curve deviates from a straight line.

[0093] Specifically, the terminal may first determine the radius of curvature of each point on the extracted skeleton, and then determine whether the chromosome needs to be straightened (ie, whether the chromosome is bent) based on the radius of curvature of each point on the skeleton.

[0094] In one embodiment, the terminal may determine the radius of curvature of each point on the skeleton according to the following formula:

[0095]

[0096] Among them, (x, y) is the coordinate of any point on the skeleton, and R is the radius of curvature at the point (x, y) on the skeleton.

[0097] In one embodiment, if there is at least one point on the skeleton whose radius of curvature is less than or equal to a preset threshold, the terminal may determine that the chromosome needs to be straightened.

[0098] In one embodiment, if there is no point on the skeleton whose curvature radius is less than or equal to a preset threshold (ie, the curvature radius of all points on the skeleton is greater than the preset threshold), the terminal can determine that the chromosome does not need to be straightened.

[0099] In this embodiment, the terminal can accurately determine whether the chromosome needs to be straightened based on the radius of curvature of the chromosome skeleton. Compared with the method of judging whether the chromosome needs to be straightened based on the total area of ​​the tightly fitted rectangle associated with the chromosome, the judgment result is not accurate enough in the case of a short chromosome, etc. The method in this embodiment can more accurately determine whether the chromosome needs to be straightened based on the radius of curvature of the chromosome skeleton.

[0100] In one embodiment, determining the bending center of the chromosome based on the horizontal projection vector of each row in the normalized image includes: determining the horizontal projection vector of each row based on the normalized image; determining the global minimum value between the maximum values ​​within two preset ranges of the normalized image from the horizontal projection vectors of each row; the global minimum value corresponds to the bending center.

[0101] Specifically, the terminal may first determine the horizontal projection vector of each row in the normalized image according to the normalized image, and then determine the global minimum value between the maximum values ​​in two preset ranges of the normalized image from the horizontal projection vectors of each row, and the row corresponding to the determined global minimum value is the row where the bending center is located. In one embodiment, the point at the middle position of the foreground part (i.e., white pixel) on the row corresponding to the global minimum value is the bending center.

[0102] In one embodiment, the two preset ranges may be respectively within a preset area in the upper half of the normalized image and within a preset area in the lower half of the normalized image. In one embodiment, the terminal may determine the first maximum value from top to bottom of the upper half of the normalized image (e.g. Figure 3 304 in the right graph of the image), and the first maximum value from bottom to top in the lower half of the normalized image (such as Figure 3 Then, the terminal can convert the global minimum value (such as 306 in the right graph of ) between the two determined maximum values ​​into Figure 3 302) in the right graph of the figure is determined to correspond to the bending center.

[0103] It can be understood that the range of the global minimum is limited by two maximum values ​​in order to avoid the narrower parts at the upper and lower ends of the chromosome (for example: Figure 3 308 in the right graph of the figure is mistakenly determined as the bending center, thereby further improving the accuracy of determining the bending center.

[0104] In this embodiment, the terminal can accurately determine the bending center according to the horizontal projection vector of each row in the normalized image, so that straightening can be performed according to the accurate bending center, thereby improving the accuracy of chromosome straightening.

[0105] In one embodiment, the chromosomes in the chromosome image are straightened based on the bending center, including: cutting the chromosome image into two chromosome arm images using the row where the bending center is located as a cutting line; respectively straightening the chromosome arms in the two chromosome arm images to obtain two chromosome straightening sub-images; and splicing the two chromosome straightening sub-images to obtain a straightened chromosome image.

[0106] Among them, chromosome arms refer to the arms on both sides of the bending center of the chromosome.

[0107] Specifically, the terminal can use the row where the bending center is located (i.e., the row corresponding to the determined global minimum value) as the cutting line to cut the chromosome image into two chromosome arm images, and then respectively rotate the chromosome arms in the two chromosome arm images to obtain two chromosome-corrected sub-images, and then splice the two chromosome-corrected sub-images to obtain the straightened chromosome image, thereby achieving chromosome straightening.

[0108] In one embodiment, the terminal can use the same method as the method of correcting the chromosomes in the binary image to correct the chromosome arms in the two chromosome arm images. Specifically, the terminal can use the line where the bending center is located as a cutting line to cut the binary image of the chromosome into two binary images of the chromosome arms, and then extract the skeletons of the two binary images of the chromosome arms respectively, and then determine the rotation angle of the chromosome arm based on the skeleton extracted from the binary image of the chromosome arm, and correct the chromosome arm in the chromosome arm image according to the rotation angle of the chromosome arm to obtain two chromosome correction sub-images.

[0109] In one embodiment, the terminal can determine the center point of the cut of the chromosome arm in the two chromosome conversion sub-images respectively, and then overlap the determined center points in the two chromosome conversion sub-images, so as to splice the two chromosome conversion sub-images together to obtain a straightened chromosome image. Selecting feature points at the chromosome cut to assist chromosome splicing can effectively avoid unnatural chromosome splicing.

[0110] like Figure 4 As shown, the left picture is the original chromosome image that has not been straightened, and the right picture is the straightened chromosome image obtained by overlapping the determined center points in the two chromosome normalization sub-images, thereby splicing the two chromosome normalization sub-images together.

[0111] In this embodiment, the terminal uses the accurately determined bending center as a reference to straighten the chromosomes in the chromosome image. Compared with the method of straightening based on the chromosome centromere, the straightening based on the bending center is more accurate, which improves the accuracy of chromosome straightening. In addition, the problem of chromosome band information loss can be effectively avoided by cutting the chromosome into two parts and straightening them separately and then splicing them, ensuring the integrity of the chromosome band information in the chromosome image after straightening.

[0112] In one embodiment, before skeleton extraction is performed on a binary image, the method further includes: preprocessing the binary image using a flood filling algorithm and an expansion erosion algorithm to obtain a preprocessed binary image; skeleton extraction on the binary image includes: skeleton extraction on the preprocessed binary image; normalizing chromosomes in the binary image according to a rotation angle to obtain a normalized image includes: normalizing chromosomes in the preprocessed binary image according to a rotation angle to obtain a normalized image.

[0113] Among them, the flood filling algorithm is an algorithm that gives a seed pixel point as the starting point, diffuses to nearby adjacent pixel points, finds all points with the same or similar pixel values, fills in new pixel values, and forms these points into a connected area. The expansion and erosion algorithm (i.e., closing operation) is an algorithm that first performs expansion operation and then erosion operation.

[0114] Specifically, the terminal may first preprocess the binary image using a flood filling algorithm, and then continue to preprocess the binary image using an expansion corrosion algorithm to obtain a preprocessed binary image. The terminal may perform skeleton extraction on the preprocessed binary image, and determine the rotation angle of the chromosome according to the extracted skeleton. The terminal may rotate the chromosomes in the preprocessed binary image according to the rotation angle to obtain a rotated image.

[0115] It can be understood that preprocessing the binary image using the flood filling algorithm and the dilation erosion algorithm can avoid burrs or broken sections in the extracted skeleton, thereby improving the quality of the binary image and the extracted skeleton.

[0116] In this embodiment, the terminal can preprocess the binary image to improve the quality of the binary image, and then execute subsequent steps based on the preprocessed binary image, so as to perform chromosome straightening based on the higher quality binary image, which can improve the accuracy of chromosome straightening.

[0117] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0118] In one embodiment, Figure 5 As shown, a chromosome straightening device 500 is provided, comprising: a binarization module 502, a skeleton extraction module 504, a rotation angle determination module 506, a rotation module 508, a bending center determination module 510 and a straightening module 512, wherein:

[0119] The binarization module 502 is used to perform binarization processing on the chromosome image to obtain a binary image of the chromosome.

[0120] The skeleton extraction module 504 is used to extract the skeleton of the binary image.

[0121] The rotation angle determination module 506 is used to determine the rotation angle of the chromosome according to the extracted skeleton.

[0122] The rotation module 508 rotates the chromosomes in the binary image at a rotation angle to obtain a normalized image.

[0123] The bending center determination module 510 determines the bending center of the chromosome according to the horizontal projection vector of each row in the normalized image.

[0124] The straightening module 512 straightens the chromosomes in the chromosome image based on the bending center.

[0125] In one embodiment, the rotation angle determination module is also used to determine the starting point and the end point of the extracted skeleton; determine the line connecting the starting point and the end point; rotate the line to a vertical rotation angle, and determine it as the rotation angle of the chromosome.

[0126] In one embodiment, the chromosome straightening device 500 further includes:

[0127] The chromosome bending determination module 514 is used to determine the curvature radius of each point on the extracted skeleton; if the curvature radius of at least one point is less than or equal to a preset threshold, it is determined that the chromosome needs to be straightened, and the bending center determination module 510 is notified to execute the determination of the chromosome bending center and subsequent steps based on the horizontal projection vector of each row in the straightened image.

[0128] In one embodiment, the bending center determination module 510 is also used to determine the horizontal projection vector of each row based on the normalized image; determine the global minimum value between the maximum values ​​within two preset ranges of the normalized image from the horizontal projection vectors of each row; the global minimum value corresponds to the bending center.

[0129] In one embodiment, the straightening module 512 is also used to cut the chromosome image into two chromosome arm images using the row where the bending center is located as a cutting line; respectively rotate the chromosome arms in the two chromosome arm images to obtain two chromosome-corrected sub-images; and splice the two chromosome-corrected sub-images to obtain a straightened chromosome image.

[0130] In one embodiment, Figure 6 As shown, the chromosome straightening device 500 also includes:

[0131] The image preprocessing module 516 is used to preprocess the binary image using a flood filling algorithm and a dilation erosion algorithm to obtain a preprocessed binary image.

[0132] The skeleton extraction module 504 is also used to extract the skeleton of the pre-processed binary image. The normalization module 508 is also used to normalize the chromosomes in the pre-processed binary image according to the normalization angle to obtain a normalized image.

[0133] In the above-mentioned chromosome straightening device, the chromosome image is first binarized to obtain a binary image of the chromosome, and then the binary image is subjected to skeleton extraction. The rotation angle of the chromosome is determined based on the extracted skeleton, and the chromosome in the binary image is rotated according to the rotation angle to obtain a rotated image. Then, the bending center of the chromosome is determined based on the horizontal projection vector of each row in the rotated image. Since the bending center of the chromosome is the narrowest point between the two arms of the chromosome, the bending center of the chromosome can be accurately determined based on the horizontal projection vector of each row, so that the chromosome in the chromosome image is straightened based on the accurately determined bending center, thereby improving the accuracy of chromosome straightening.

[0134] The specific definition of the chromosome straightening device can be found in the above definition of the chromosome straightening method, which will not be repeated here. Each module in the above chromosome straightening device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0135] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a chromosome straightening method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0136] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0137] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0139] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0141] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A chromosome straightening method, characterized in that: The method comprises: Binarization is performed on the chromosome image to obtain a binary image of the chromosome; Performing skeleton extraction on the binary image; Determine the starting point and the end point of the extracted skeleton, and determine the line connecting the starting point and the end point; The connecting line is rotated to a vertical angle, and the rotation angle is determined as the rotation angle of the chromosome; The chromosomes in the binary image are normalized according to the normalization angle to obtain a normalized image; Determine a horizontal projection vector of each row according to the normalized image; Determine the global minimum value between the maximum values ​​within two preset ranges of the normalized image from the horizontal projection vectors of each row; the global minimum value corresponds to the bending center of the chromosome; The chromosomes in the chromosome image are straightened based on the bending center.

2. The method according to claim 1, characterized in that Before determining the horizontal projection vector of each row according to the normalized image, the method further includes: Determine the radius of curvature of each point on the extracted skeleton; If the curvature radius of at least one point is less than or equal to a preset threshold, it is determined that the chromosome needs to be straightened, and the steps of determining the horizontal projection vector of each row based on the straightened image and subsequent steps are performed.

3. The method according to claim 1, characterized in that The straightening of the chromosomes in the chromosome image based on the bending center includes: Using the row where the bending center is located as a cutting line, the chromosome image is cut into two images of chromosome arms; The chromosome arms in the two chromosome arm images are respectively normalized to obtain two normalized chromosome sub-images; The two chromosome-corrected sub-images are spliced ​​together to obtain a straightened chromosome image.

4. The method according to claim 1, characterized in that: Before extracting the skeleton of the binary image, the method further includes: Preprocessing the binary image using a flood filling algorithm and an expansion erosion algorithm to obtain a preprocessed binary image; The skeleton extraction of the binary image comprises: Performing skeleton extraction on the preprocessed binary image; The step of normalizing the chromosomes in the binary image according to the normalization angle to obtain a normalized image comprises: According to the rotation angle, the chromosomes in the preprocessed binary image are rotated to obtain a normalized image.

5. A chromosome straightening device, characterized in that: The device comprises: A binarization module is used to perform binarization processing on the chromosome image to obtain a binary image of the chromosome; A skeleton extraction module, used for performing skeleton extraction on the binary image; A rotation angle determination module is used to determine the starting point and the end point of the extracted skeleton, determine the line connecting the starting point and the end point; rotate the line to a rotation angle in a vertical direction, and determine it as the rotation angle of the chromosome; A rotation module, used for rotating the chromosomes in the binary image according to the rotation angle to obtain a normalized image; A bending center determination module is used to determine the horizontal projection vector of each row according to the normalized image; determine the global minimum value between the maximum values ​​within two preset ranges of the normalized image from the horizontal projection vectors of each row; the global minimum value corresponds to the bending center of the chromosome; The straightening module is used to straighten the chromosomes in the chromosome image based on the bending center.

6. The device according to claim 5, characterized in that The chromosome straightening device also includes: The chromosome curvature determination module is used to determine the curvature radius of each point on the extracted skeleton; If the curvature radius of at least one point is less than or equal to a preset threshold, it is determined that the chromosome needs to be straightened, and the bending center determination module is notified to execute the steps of determining the horizontal projection vector of each row according to the straightened image and subsequent steps.

7. The device according to claim 5, characterized in that The straightening module is also used to cut the chromosome image into two chromosome arm images using the row where the bending center is located as a cutting line; respectively straighten the chromosome arms in the two chromosome arm images to obtain two chromosome straightening sub-images; and splice the two chromosome straightening sub-images to obtain a straightened chromosome image.

8. The device according to claim 5, characterized in that The chromosome straightening device also includes: An image preprocessing module, used for preprocessing the binary image by using a flood filling algorithm and an expansion corrosion algorithm to obtain a preprocessed binary image; The skeleton extraction module is further used to perform skeleton extraction on the preprocessed binary image; The rotation module is further used to rotate the chromosomes in the preprocessed binary image according to the rotation angle to obtain a normalized image.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Crowdsourcing and deep learning based segmenting and karyotyping of chromosomes

    CN109285174A

  • Curved chromosome image straightening model generation method, application of model, system, readable storage medium and computer equipment

    CN111612744A