Synthesis method of metaphase splitting phase image of chromosome
By extracting and splicing chromosomes from chromosome images that have been completed karyotyping analysis, high-quality synthetic images are generated, and the problem of low accuracy of existing automated karyotyping analysis methods is solved, and the effect of improving the quality of training data and automated analysis accuracy is achieved.
Patent Information
- Application Number
- CN202311013676.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-25
AI Technical Summary
The existing automated chromosomal karyotyping analysis methods are not very accurate, mainly due to the low manual labeling efficiency required for the training algorithm, resulting in insufficient training data scale.
By extracting individual chromosomes and noise from the metaphase cleavage phase images of chromosomes that have been completed karyotyping, depositing them into chromosome libraries and noise libraries, and stitching them into cross and adhesion chromosome images, a large number of synthetic images of known positions, profiles, and categories are generated for training segmentation and classification methods.
It realizes the generation of a large number of high-quality chromosomal images in a short time, improves the scale and quality of the training data, avoids complicated manual annotation work, and improves the accuracy of automated karyotype analysis.
Smart Images

Figure CN119515663A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing, in particular to a method for synthesizing chromosome metaphase images. Background Art
[0002] As a basic method of genetic research, chromosome karyotype analysis has important application value in the diagnosis of prenatal genetic diseases. At present, the main method of karyotype analysis is for clinicians to manually complete the cutting and identification of chromosome metaphase images. Since normal human chromosomes have 46 and the chromosomes are cross-linked with each other, this traditional method is not only time-consuming and labor-intensive, but its accuracy is also heavily dependent on the doctor's personal experience and subjective judgment. In recent years, a number of automated staining karyotype analysis algorithms based on machine learning algorithms have been launched, which can automatically segment and classify cross-linked chromosomes, and physicians only need to review and modify the results of segmentation and identification, thereby greatly improving the efficiency of karyotype analysis.
[0003] However, compared with manual methods, the accuracy of these automatic karyotyping methods still needs to be improved. One of the main reasons for the low accuracy is that the data for training these algorithms requires a large number of physicians to manually annotate, including the location, category, and outline of chromosomes and noise. The low efficiency of manual annotation leads to insufficient scale of training data, making it difficult for the algorithm to segment and identify chromosomes with different appearances. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, one of the objects of the present invention is to provide a method for synthesizing chromosome metaphase images. The method is based on a certain number of chromosomes that have completed karyotype analysis, and generates a large number of metaphase synthetic images with known chromosome positions, contours, and categories in a short period of time for training segmentation and classification methods. The method is fast and has realistic effects, and the distribution of chromosomes can be adjusted at will according to the needs of actual conditions, thereby avoiding complicated manual labeling work.
[0005] One of the purposes of the present invention is achieved by the following technical solution:
[0006] A method for synthesizing a chromosome metaphase image comprises the following steps:
[0007] S1: Extracting individual chromosomes from the metaphase image of chromosomes that have completed karyotype analysis, and storing the extracted individual chromosomes into a chromosome library;
[0008] S2: Convert the chromosome metaphase image into a binary image, extract the noise image from the metaphase image according to the noise position in the binary image, and save it into the noise library;
[0009] S3: Splice the single chromosomes in the chromosome library into crossover chromosomes, splice the single chromosomes in the chromosome library into adhesion chromosomes, put the single chromosomes, crossover chromosomes, adhesion chromosomes and noise in the noise library into the same image, and complete the synthesis of the metaphase image.
[0010] Furthermore, step S1 specifically includes the following steps:
[0011] S11: The karyotype analysis image is segmented using the Otsu method to remove the background of the image, and the pixel value of the unremoved area is set to 1 to convert the original image into a binary image;
[0012] S12: setting a sequence number for each independent connected domain, and removing the connected domains whose area is smaller than a threshold;
[0013] S13: according to the distribution law of the karyotype analysis graph, obtaining the chromosome category corresponding to each connected domain in the binary graph;
[0014] S14: extracting chromosomes from the prokaryotype analysis map according to the position and category of the chromosomes in the binary map, and storing them in a chromosome library;
[0015] S15: Repeat steps S11-S14 until all chromosomes in the obtained karyotype analysis map are extracted.
[0016] Furthermore, step S2 specifically includes the following steps:
[0017] S21: Perform triangular threshold segmentation on the metaphase image and convert it into a binary image;
[0018] S22: setting a sequence number for each independent connected domain, and removing the connected domains whose area is smaller than a threshold, and the connected domains that are not removed are regarded as the locations where noises are located;
[0019] S23: Perform distance transformation on each connected domain and invert it. The closer to the center of the connected domain, the larger the value.
[0020] S24: performing secondary threshold segmentation on the distance transformation graph, the distance value less than the threshold t is set to 0, and the distance value greater than the threshold t is set to 1. Since the chromosomes adhering to the noise are too far from the center and have a small distance value, they are removed at this time;
[0021] S25: dilate the binary image, and the dilation amplitude should be equal to or similar to the threshold t to ensure that the area of each connected domain after dilation is similar to the area of the corresponding connected domain in S22;
[0022] S26: Calculate the ratio of the perimeter of each connected domain in the binary graph to the perimeter of the circle with the same area. If the ratio is greater than a preset value, it is regarded as noise; otherwise, it is regarded as a chromosome with a large area of adhesion and removed.
[0023] S27: according to the noise position described in the binary image, extract the noise image at the position in the original metaphase image and save it into the noise library;
[0024] S28: Repeat steps S21-S27 until the noise in all acquired metaphase images is extracted.
[0025] Furthermore, in step S3, the single chromosomes, the crossed chromosomes, and the adhered chromosomes are from the same karyotype analysis map, and the noise is randomly selected.
[0026] Furthermore, in step S3, when individual chromosomes in the chromosome library are spliced into crossover chromosomes, the crossover center is randomly generated at 1 / 5 to 4 / 5 of each chromosome skeleton, and the crossover angle is the angle that minimizes the overlapping area of the crossover chromosomes to avoid large-scale obstruction of the underlying chromosomes.
[0027] Furthermore, when the number of chromosomes is greater than two and the crossover center is not unique, the crossover of two chromosomes is first realized, and the chromosomes after the crossover are regarded as a whole and then spliced with the new chromosomes added until all the selected chromosomes are processed.
[0028] Furthermore, when there are multiple combinations of crossover chromosomes, a list of serial numbers is generated, and each set of serial numbers is processed in turn in an iterative manner, thereby generating multiple sets of crossover chromosomes.
[0029] Furthermore, in step S3, the individual chromosomes in the chromosome library are spliced into adhered chromosomes as follows: two chromosomes are randomly rotated by a certain angle and then translated to the same position, and the translation is stopped when the overlapping area between the two is greater than a preset value. When the number of chromosomes is greater than two, the two chromosomes are first adhered, and then the adhered chromosomes are regarded as a whole and continue to be adhered with the new chromosomes added later until all selected chromosomes are processed.
[0030] Furthermore, step S3 also includes chromosome grayscale transformation, which transforms the grayscale of single chromosomes, cross chromosomes, and adhesion chromosomes to simulate chromosomes with different grayscale levels. The transformation formula is: S = cr γ ,γ min ≤γ≤γ max , r is the pixel of the input image, c is the scaling factor, the default value is 1, and γ is the gamma value, which is used to control the amplitude of the transformation, which is γ min and γ max A random value between min and γ max It needs to be set manually. All chromosomes in the same synthetic image share the same γ to complete the grayscale transformation, and the γ is different when generating different synthetic images.
[0031] Furthermore, when the individual chromosomes, the cross chromosomes, the adhesion chromosomes and the noise in the noise library are placed into the same image, the individual chromosomes, the cross chromosomes and the adhesion chromosomes are rotated.
[0032] Furthermore, in step S3, when individual chromosomes, crossed chromosomes, adhered chromosomes and noise in the noise library are placed into the same image, a convex polygon of a preset area is generated in the all-zero image M, and when the chromosomes are placed in the image, the coordinates of the chromosome center point are within the polygon.
[0033] Furthermore, in step S3, when individual chromosomes, cross chromosomes, adhesion chromosomes and noise in the noise library are placed into the same image, the distribution position parameters of the chromosomes are set. The distribution position parameters are used to control the positions of individual, adhesion and cross chromosomes in the image. The parameters are an N×2 matrix, where N is equal to the total number of individual, cross and adhesion chromosomes to be placed in the image. Each row of the matrix is the coordinate at the time of placement, corresponding to the center of the chromosome. When the distribution position parameter is empty, the chromosomes are placed in order from large to small in area, and the coordinates of the chromosome center do not exceed the distribution area of the polygon in M. If secondary adhesion or crossing occurs during placement, the placement position of the chromosome is changed.
[0034] Further, in step S3, the noise quantity and adhesion list parameters are set, and after the chromosome is placed, the placed image I is replaced with zero. ′ Expand to I″, generate points with the same number as the noise and random positions at the border of image I″, connect each point with the center point of the image to form a line segment, select a noise, place its center on one of the line segments, and translate it from the inside to the outside until the noise does not overlap with the placed chromosome but is adhered to it. The adhesion list is used to control which noise is adhered to the chromosome. The noise not in the list will randomly stay at a certain position of the line segment after translating out of the chromosome distribution area, and perform center segmentation on I″ to obtain I″′.
[0035] Furthermore, the median filtering algorithm is used to smooth the contours of chromosomes and background, and between chromosomes in I″′, avoiding the appearance of some background pixels due to inaccurate segmentation, and completing the synthesis of a single metaphase image.
[0036] Furthermore, when synthesizing the metaphase image, the contour coordinates and categories of each chromosome and noise are synchronously recorded, and a labeling file in a specified format is generated for training the segmentation and classification algorithms.
[0037] Compared with the prior art, the synthesis method of the chromosome metaphase image of the present invention is based on a certain number of chromosomes that have completed karyotype analysis. Individual chromosomes are extracted from the chromosome metaphase images that have completed karyotype analysis, and the extracted individual chromosomes are stored in a chromosome library; the chromosome metaphase image is converted into a binary image, and according to the noise position in the binary image, a noise image is extracted from the metaphase image and stored in a noise library; the individual chromosomes in the chromosome library are spliced into cross chromosomes, and the individual chromosomes in the chromosome library are spliced into adhesion chromosomes, and the individual chromosomes, cross chromosomes, adhesion chromosomes and noise in the noise library are placed in the same image to complete the synthesis of the metaphase image, and a large number of metaphase synthetic images with known chromosome positions, contours and categories are generated in a short time for training segmentation and classification methods. The method is fast and has realistic effects, and the distribution of chromosomes can be adjusted at will according to the needs of actual conditions, thereby avoiding complicated manual labeling work. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of the method for synthesizing the chromosome metaphase image of the present invention;
[0039] Figure 2 is a flow chart of step S3;
[0040] Figure 3 This is a real chromosome metaphase image;
[0041] Figure 4 is the karyotype analysis diagram;
[0042] Figure 5 Image 1 synthesized by the method for synthesizing chromosome metaphase images of the present invention;
[0043] Figure 6 Image 2 synthesized by the method for synthesizing chromosome metaphase images of the present invention;
[0044] Figure 7 Image 3 synthesized by the method for synthesizing chromosome metaphase images of the present invention;
[0045] Figure 8 Image 4 is synthesized by the method for synthesizing chromosome metaphase images of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] It should be noted that when a component is referred to as being "fixed to" another component, it may be directly on the other component or there may be another intermediate component through which it is fixed. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may be another intermediate component at the same time. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be another intermediate component at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0049] Figure 1 The flowchart of the method for synthesizing a chromosome metaphase image of the present invention is as follows. The method for synthesizing a chromosome metaphase image of the present invention comprises three parts: extraction of chromosomes in a karyotype analysis image, extraction of noise in a real metaphase image, and generation of a synthesized image. Specifically, the method comprises the following steps:
[0050] S1: Extracting individual chromosomes from the metaphase image of chromosomes that have completed karyotype analysis, and storing the extracted individual chromosomes into a chromosome library;
[0051] S2: Convert the chromosome metaphase image into a binary image, extract the noise image from the metaphase image according to the noise position in the binary image, and save it into the noise library;
[0052] S3: Splice the single chromosomes in the chromosome library into crossover chromosomes, splice the single chromosomes in the chromosome library into adhesion chromosomes, put the single chromosomes, crossover chromosomes, adhesion chromosomes and noise in the noise library into the same image, and complete the synthesis of the metaphase image.
[0053] Specifically, step S1 is to simulate the chromosomes distributed in the real metaphase image, and the chromosomes need to be extracted from the karyotype analysis diagram. The karyotype analysis diagram is as follows: Figure 4 As shown, the specific steps include:
[0054] S11: The karyotype analysis image is segmented using the Otsu method to remove the background of the image, and the pixel value of the unremoved area is set to 1 to convert the original image into a binary image;
[0055] S12: setting a sequence number for each independent connected domain, and removing the connected domains whose area is smaller than a threshold;
[0056] S13: according to the distribution law of the karyotype analysis graph, obtaining the chromosome category corresponding to each connected domain in the binary graph;
[0057] S14: extracting chromosomes from the prokaryotype analysis map according to the position and category of the chromosomes in the binary map, and storing them in a chromosome library;
[0058] S15: Repeat steps S11-S14 until all chromosomes in the obtained karyotype analysis map are extracted.
[0059] In step S12 , the area threshold is 300.
[0060] Specifically, step S2 is to simulate the noise distributed in the real metaphase image. It is necessary to first extract the noise from the real metaphase image. The real metaphase image is as follows: Figure 3 As shown, the chromosomes adhering to the noise are removed. Step S2 specifically includes the following steps:
[0061] S21: Perform triangular threshold segmentation on the metaphase image and convert it into a binary image;
[0062] S22: setting a sequence number for each independent connected domain, and removing the connected domains whose area is smaller than a threshold, and the connected domains that are not removed are regarded as the locations where noises are located;
[0063] S23: Perform distance transformation on each connected domain and invert it. The closer to the center of the connected domain, the larger the value.
[0064] S24: performing secondary threshold segmentation on the distance transformation graph, the distance value less than the threshold t is set to 0, and the distance value greater than the threshold t is set to 1. Since the chromosomes adhering to the noise are too far from the center and have a small distance value, they are removed at this time;
[0065] S25: dilate the binary image, and the dilation amplitude should be equal to or similar to the threshold t to ensure that the area of each connected domain after dilation is similar to the area of the corresponding connected domain in S22;
[0066] S26: Calculate the ratio of the perimeter of each connected domain in the binary graph to the perimeter of the circle with the same area. If the ratio is greater than a preset value, it is regarded as noise; otherwise, it is regarded as a chromosome with a large area of adhesion and removed.
[0067] S27: according to the noise position described in the binary image, extract the noise image at the position in the original metaphase image and save it into the noise library;
[0068] S28: Repeat steps S21-S27 until the noise in all acquired metaphase images is extracted.
[0069] Specifically, in step S22, the area threshold is 3000, and in step S26, the preset value of the ratio is 0.7.
[0070] Specifically, step S3 places the extracted chromosomes and noise into image I ′ middle. I ′ The size is 1200×1600, and the pixel value is 255. The inserted chromosomes must come from the same karyotype analysis map, and the noise is randomly selected.
[0071] Please continue reading Figure 2 , in step S3, the sequence number of the crossover chromosome is included, that is, the individual chromosomes in the chromosome library are spliced into crossover chromosomes. The sequence number represents which chromosomes are spliced into crossover chromosomes. The crossover center is randomly generated at 1 / 5 to 4 / 5 of each chromosome skeleton, and the crossover angle is the angle that minimizes the overlapping area of the crossover chromosomes to avoid large-scale obstruction of the underlying chromosomes. If the number of sequence numbers is greater than two and the crossover center is not unique, the crossover of the two chromosomes is first achieved, and the chromosomes after the crossover are regarded as a whole, and then new chromosomes are added to repeat the above process until all selected sequence numbers are processed. If there are multiple combinations of crossover chromosomes, a sequence number list can be generated, and each group of sequence numbers is processed in turn in an iterative manner to generate multiple groups of cross-adhesive chromosomes.
[0072] In step S3, the sequence number and the maximum overlapping area of the adhesion chromosomes are included, that is, the individual chromosomes in the chromosome library are spliced into adhesion chromosomes. The sequence number represents which chromosomes are spliced into adhesion chromosomes, the maximum overlapping area represents the degree of adhesion, and 0 is the minimum value, which represents that the chromosomes are adhered but not overlapped. Specifically: after the two chromosomes are randomly rotated by a certain angle, they are translated to the same position, and the translation is stopped when the overlapping area of the two is greater than the preset value. When the number of chromosomes is greater than two, the adhesion of the two chromosomes is first achieved, and then the chromosomes after adhesion are regarded as a whole and the new chromosomes are added later to continue adhesion until all selected chromosomes are processed.
[0073] Step S3 also includes chromosome grayscale transformation, which transforms the grayscale of single chromosomes, cross chromosomes, and adhesion chromosomes to simulate chromosomes with different grayscale levels. The transformation formula is: S = cr γ ,γ min ≤γ≤γ max , r is the pixel of the input image, c is the scaling factor, the default value is 1, and γ is the gamma value, which is used to control the amplitude of the transformation, which is γ min and γ max A random value between min and γmax It needs to be set manually. All chromosomes in the same synthetic image share the same γ to complete the grayscale transformation, and the γ is different when generating different synthetic images.
[0074] In step S3, when the individual chromosomes, the cross chromosomes, the adhesion chromosomes and the noise in the noise library are placed into the same image, the individual chromosomes, the cross chromosomes and the adhesion chromosomes are rotated.
[0075] In step S3, when individual chromosomes, crossed chromosomes, adhered chromosomes and noise in the noise library are placed in the same image, a convex polygon of a preset area is generated in the 1200×1600 all-zero image M. When the chromosomes are placed in the image, the coordinates of the chromosome center point are within the polygon.
[0076] In step S3, when placing single chromosomes, cross chromosomes, adhesion chromosomes and noise in the noise library into the same image, the distribution position parameters of the chromosomes are set. The distribution position parameters are used to control the positions of single, adhesion and cross chromosomes in the image. The parameters are an N×2 matrix, where N is equal to the total number of single, cross and adhesion chromosomes to be placed in the image. Each row of the matrix is the coordinate when placed, corresponding to the center of the chromosome. When the distribution position parameter is empty, the chromosomes are placed in order from large to small in area, and the coordinates of the chromosome center do not exceed the distribution area of the polygon in M. If secondary adhesion or crossing occurs during placement, the placement position of the chromosome is changed.
[0077] In step S3, the noise quantity and adhesion list parameters are set, and after the chromosome is placed, the placed image I is replaced with zero. ′ Expand to 1400×1800 to get I″. Generate points with the same number and random positions as the noise at the border of image I″. Connect each point to the center point of the image to form a line segment. Select a noise, place its center on one of the line segments, and translate it from the inside to the outside until the noise does not overlap with the placed chromosome but is adhered to it. The adhesion list is used to control which noise is adhered to the chromosome. The noise not in the list will randomly stay at a certain position of the line segment after translating out of the chromosome distribution area. Perform center segmentation on I″ with a segmentation size of 1200×1600 to get I″′.
[0078] After generating I″′, the median filtering algorithm is used to smooth the contours of chromosomes and background, and between chromosomes in I″′, avoiding the appearance of some background pixels due to inaccurate segmentation, and completing the synthesis of a single metaphase image. Since the placement process is random, the same group of chromosomes can generate any number of synthetic images, such as Figures 5 to 8 shown.
[0079] Furthermore, when synthesizing the metaphase image, the contour coordinates and categories of each chromosome and noise are synchronously recorded, and a labeling file in a specified format is generated for training the segmentation and classification algorithms.
[0080] Compared with the prior art, the synthesis method of the chromosome metaphase image of the present invention is based on a certain number of chromosomes that have completed karyotype analysis. Individual chromosomes are extracted from the chromosome metaphase images that have completed karyotype analysis, and the extracted individual chromosomes are stored in a chromosome library; the chromosome metaphase image is converted into a binary image, and according to the noise position in the binary image, a noise image is extracted from the metaphase image and stored in a noise library; the individual chromosomes in the chromosome library are spliced into cross chromosomes, and the individual chromosomes in the chromosome library are spliced into adhesion chromosomes, and the individual chromosomes, cross chromosomes, adhesion chromosomes and noise in the noise library are placed in the same image to complete the synthesis of the metaphase image, and a large number of metaphase synthetic images with known chromosome positions, contours and categories are generated in a short time for training segmentation and classification methods. The method is fast and has realistic effects, and the distribution of chromosomes can be adjusted at will according to the needs of actual conditions, thereby avoiding complicated manual labeling work.
[0081] The above embodiments only express several implementation methods of the present invention, 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 ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which are equivalent modifications and improvements made to the above embodiments based on the essential technology of the present invention, and all of them belong to the protection scope of the present invention.
Claims
1. A method for synthesizing a chromosome metaphase image, characterized in that: The following steps are involved: S1: Extracting individual chromosomes from the metaphase image of chromosomes that have completed karyotype analysis, and storing the extracted individual chromosomes into a chromosome library; S2: Convert the chromosome metaphase image into a binary image, extract the noise image from the metaphase image according to the noise position in the binary image, and save it into the noise library; S3: Splice the single chromosomes in the chromosome library into crossover chromosomes, splice the single chromosomes in the chromosome library into adhesion chromosomes, put the single chromosomes, crossover chromosomes, adhesion chromosomes and noise in the noise library into the same image, and complete the synthesis of the metaphase image.
2. The method for synthesizing a chromosome metaphase image according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11: The karyotype analysis image is segmented using the Otsu method to remove the background of the image, and the pixel value of the unremoved area is set to 1 to convert the original image into a binary image; S12: setting a sequence number for each independent connected domain, and removing the connected domains whose area is smaller than a threshold; S13: according to the distribution law of the karyotype analysis graph, obtaining the chromosome category corresponding to each connected domain in the binary graph; S14: extracting chromosomes from the prokaryotype analysis map according to the position and category of the chromosomes in the binary map, and storing them in a chromosome library; S15: Repeat steps S11-S14 until all chromosomes in the obtained karyotype analysis map are extracted.
3. The method for synthesizing a chromosome metaphase image according to claim 1, characterized in that: Step S2 specifically includes the following steps: S21: Perform triangular threshold segmentation on the metaphase image and convert it into a binary image; S22: setting a sequence number for each independent connected domain, and removing the connected domains whose area is smaller than a threshold, and the connected domains that are not removed are regarded as the locations where noises are located; S23: Perform distance transformation on each connected domain and invert it. The closer to the center of the connected domain, the larger the value. S24: performing secondary threshold segmentation on the distance transformation graph, the distance value less than the threshold t is set to 0, and the distance value greater than the threshold t is set to 1. Since the chromosomes adhering to the noise are too far from the center and have a small distance value, they are removed at this time; S25: dilate the binary image, and the dilation amplitude should be equal to or similar to the threshold t to ensure that the area of each connected domain after dilation is similar to the area of the corresponding connected domain in S22; S26: Calculate the ratio of the perimeter of each connected domain in the binary graph to the perimeter of the circle with the same area. If the ratio is greater than a preset value, it is regarded as noise; otherwise, it is regarded as a chromosome with a large area of adhesion and removed. S27: according to the noise position described in the binary image, extract the noise image at the position in the original metaphase image and save it into the noise library; S28: Repeat steps S21-S27 until the noise in all acquired metaphase images is extracted.
4. The method for synthesizing a chromosome metaphase image according to claim 1, characterized in that: In step S3, single chromosomes, crossed chromosomes, and adhered chromosomes are from the same karyotype analysis map, and the noise is randomly selected.
5. The method for synthesizing chromosome metaphase images according to claim 1, characterized in that: In step S3, when individual chromosomes in the chromosome library are spliced into crossover chromosomes, the crossover center is randomly generated at 1 / 5 to 4 / 5 of each chromosome skeleton, and the crossover angle is the angle that minimizes the overlapping area of the crossover chromosomes to avoid large-scale obstruction of the underlying chromosomes.
6. The method for synthesizing chromosome metaphase images according to claim 5, characterized in that: When the number of chromosomes is greater than two and the crossover center is not unique, the crossover of two chromosomes is realized first, and the chromosomes after the crossover are regarded as a whole and then spliced with the new chromosomes added later until all the selected chromosomes are processed.
7. The method for synthesizing chromosome metaphase images according to claim 6, characterized in that: When there are multiple combinations of crossover chromosomes, a list of serial numbers is generated, and each set of serial numbers is processed in turn in an iterative manner, thereby generating multiple sets of crossover chromosomes.
8. The method for synthesizing chromosome metaphase images according to claim 1, characterized in that: In step S3, the individual chromosomes in the chromosome library are spliced into glued chromosomes as follows: two chromosomes are randomly rotated by a certain angle and then translated to the same position, and the translation is stopped when the overlapping area between the two is greater than a preset value. When the number of chromosomes is greater than two, the two chromosomes are glued together first, and then the glued chromosomes are regarded as a whole and continue to be glued together with the new chromosomes added later until all selected chromosomes are processed.
9. The method for synthesizing chromosome metaphase images according to claim 1, characterized in that: Step S3 also includes chromosome grayscale transformation, which transforms the grayscale of single chromosomes, cross chromosomes, and adhesion chromosomes to simulate chromosomes with different grayscale levels. The transformation formula is: S = cr γ ,γ min ≤γ≤γ max , r is the pixel of the input image, c is the scaling factor, the default value is 1, and γ is the gamma value, which is used to control the amplitude of the transformation, which is γ min and γ max A random value between min and γ max It needs to be set manually. All chromosomes in the same synthetic image share the same γ to complete the grayscale transformation, and the γ is different when generating different synthetic images.
10. The method for synthesizing chromosome metaphase images according to claim 1, characterized in that: When placing individual chromosomes, crossover chromosomes, adhered chromosomes, and noise from the noise library into the same image, the individual chromosomes, crossover chromosomes, and adhered chromosomes are rotated.
11. The method for synthesizing chromosome metaphase images according to claim 1, characterized in that: In step S3, when individual chromosomes, cross chromosomes, adhesion chromosomes and noise in the noise library are placed in the same image, a convex polygon of a preset area is generated in the all-zero image M. When the chromosomes are placed in the image, the coordinates of the chromosome center point are within the polygon.
12. The method for synthesizing chromosome metaphase images according to claim 11, characterized in that: In step S3, when placing single chromosomes, cross chromosomes, adhesion chromosomes and noise in the noise library into the same image, the distribution position parameters of the chromosomes are set. The distribution position parameters are used to control the positions of single, adhesion and cross chromosomes in the image. The parameters are an N×2 matrix, where N is equal to the total number of single, cross and adhesion chromosomes to be placed in the image. Each row of the matrix is the coordinate when placed, corresponding to the center of the chromosome. When the distribution position parameter is empty, the chromosomes are placed in order from large to small in area, and the coordinates of the chromosome center do not exceed the distribution area of the polygon in M. If secondary adhesion or crossing occurs during placement, the placement position of the chromosome is changed.
13. The method for synthesizing chromosome metaphase images according to claim 1, characterized in that: In step S3, the noise quantity and adhesion list parameters are set, and after the chromosome is placed, the placed image I is replaced with zero. ′ Expand to I″, generate points with the same number as the noise and random positions at the border of image I″, connect each point with the center point of the image to form a line segment, select a noise, place its center on one of the line segments, and translate it from the inside to the outside until the noise does not overlap with the placed chromosome but is adhered to it. The adhesion list is used to control which noise is adhered to the chromosome. The noise not in the list will randomly stay at a certain position of the line segment after translating out of the chromosome distribution area, and perform center segmentation on I″ to obtain I″′.
14. The method for synthesizing chromosome metaphase images according to claim 13, characterized in that: The median filter algorithm is used to smooth the contours of chromosomes and background, and between chromosomes in I″′, avoiding the appearance of some background pixels due to inaccurate segmentation, and completing the synthesis of a single metaphase image.
15. The method for synthesizing chromosome metaphase images according to claim 14, characterized in that: When synthesizing metaphase images, the contour coordinates and categories of each chromosome and noise are recorded synchronously, and a labeling file in a specified format is generated for training segmentation and classification algorithms.