CN114581310A - Chromosome straightening method, chromosome straightening device, computer equipment and storage medium - Google Patents

Chromosome straightening method, chromosome straightening device, computer equipment and storage medium Download PDF

Info

Publication number
CN114581310A
CN114581310A CN202011375270.2A CN202011375270A CN114581310A CN 114581310 A CN114581310 A CN 114581310A CN 202011375270 A CN202011375270 A CN 202011375270A CN 114581310 A CN114581310 A CN 114581310A
Authority
CN
China
Prior art keywords
chromosome
image
determining
binary image
straightening
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011375270.2A
Other languages
Chinese (zh)
Inventor
许德鹏
刘晓康
王雪峰
陈齐文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Reetoo Biotechnology Co Ltd
Original Assignee
Shenzhen Reetoo Biotechnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Reetoo Biotechnology Co Ltd filed Critical Shenzhen Reetoo Biotechnology Co Ltd
Priority to CN202011375270.2A priority Critical patent/CN114581310A/en
Publication of CN114581310A publication Critical patent/CN114581310A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • G06T5/80
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/64Analysis of geometric attributes of convexity or concavity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20068Projection on vertical or horizontal image axis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A10/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE at coastal zones; at river basins
    • Y02A10/40Controlling or monitoring, e.g. of flood or hurricane; Forecasting, e.g. risk assessment or mapping

Abstract

The present application relates to a chromosome straightening method, apparatus, computer device and storage medium. The method comprises the following steps: carrying out binarization processing on the chromosome image to obtain a binary image of the chromosome; performing skeleton extraction on the binary image; determining the positive turning angle of the chromosome according to the extracted skeleton; correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image; determining the bending center of the chromosome according to the horizontal projection vector of each line in the corrected image; and straightening the chromosome in the chromosome image by taking the bending center as a reference. The method can improve the accuracy of chromosome straightening.

Description

Chromosome straightening method, chromosome straightening device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology and image processing technology, and in particular, to a chromosome straightening method, apparatus, computer device, and storage medium.
Background
In karyotyping work, it is often necessary to process and analyze chromosome images. However, longer chromosomes often bend during development due to differences in chromosome development, which adds difficulty to the karyotyping work. Therefore, it is important to straighten the chromosomes in the chromosome image.
In the conventional method, the centromere of the chromosome in the chromosome image is determined as the center of curvature, and then the chromosome arms on both sides of the centromere are rotated to be positive respectively by taking the centromere as the center, so as to realize chromosome straightening. However, it has been observed that the centromere is not necessarily the center of curvature of the chromosome, resulting in poor accuracy of this method of chromosome straightening with the centromere as the center of curvature.
Disclosure of Invention
In view of the above, it is necessary to provide a chromosome straightening method, apparatus, computer device, and storage medium capable of improving the accuracy of straightening.
A method of chromosome straightening, the method comprising:
carrying out binarization processing on the chromosome image to obtain a binary image of the chromosome;
performing skeleton extraction on the binary image;
determining the positive turning angle of the chromosome according to the extracted skeleton;
correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image;
determining the bending center of the chromosome according to the horizontal projection vector of each line in the corrected image;
and straightening the chromosome in the chromosome image by taking the bending center as a reference.
In one embodiment, the determining the correction angle of the chromosome according to the extracted skeleton includes:
determining a starting point and a final point of the extracted skeleton;
determining a connecting line of the starting point and the end point;
and determining the rotation angle of the connecting line to the vertical direction as the correcting angle of the chromosome.
In one embodiment, before the determining the center of curvature of the chromosome according to the horizontal projection vector of each line in the rotated image, the method further comprises:
determining the curvature radius of each point on the extracted skeleton;
if the curvature radius of at least one point is smaller than or equal to a preset threshold value, the chromosome is determined to be required to be straightened, the bending center of the chromosome is determined according to the horizontal projection vector of each line in the corrected image, and the subsequent steps are executed.
In one embodiment, the determining the center of curvature of the chromosome from the horizontal projection vector of each line in the rotated positive image comprises:
determining a horizontal projection vector of each line according to the corrected image;
determining a global minimum value between maximum values in two preset ranges of the positive conversion image from horizontal projection vectors of each row; the global minimum corresponds to the center of curvature.
In one embodiment, the straightening processing of the chromosome in the chromosome image with the bending center as a reference includes:
cutting the chromosome image into two chromosome arm images by taking the line where the bending center is positioned as a cutting line;
respectively correcting the chromosome arms in the two images of the chromosome arms to obtain two chromosome correction subimages;
and splicing the two chromosome positive conversion sub-images to obtain a straightened chromosome image.
In one embodiment, before the skeleton extracting the binary image, the method further includes:
preprocessing the binary image by adopting a flooding filling algorithm and an expansion corrosion algorithm to obtain a preprocessed binary image;
the skeleton extraction of the binary image comprises:
performing skeleton extraction on the preprocessed binary image;
the correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image comprises:
and correcting the chromosome in the preprocessed binary image according to the correcting angle to obtain a corrected image.
A chromosome straightening apparatus, the apparatus comprising:
the binarization module is used for carrying out binarization processing on the chromosome image to obtain a binary image of the chromosome;
the skeleton extraction module is used for carrying out skeleton extraction on the binary image;
the correcting angle determining module is used for determining the correcting angle of the chromosome according to the extracted skeleton;
the correcting module is used for correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image;
a bending center determining module, configured to determine a bending center of the chromosome according to the horizontal projection vector of each line in the rotated positive image;
and the straightening module is used for straightening the chromosome in the chromosome image by taking the bending center as a reference.
In one embodiment, the positive turning angle determining module is further configured to determine a start point and a last point of the extracted skeleton; determining a connecting line of the starting point and the end point; and determining the rotation angle of the connecting line to the vertical direction as the correcting angle of the chromosome.
A computer arrangement comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the steps of the chromosome straightening method according to embodiments of the application.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps of the chromosome straightening method according to embodiments of the application.
The chromosome straightening method, the chromosome straightening device, the computer equipment and the storage medium are characterized in that firstly, a chromosome image is subjected to binarization processing to obtain a binary image of a chromosome, then, a skeleton of the binary image is extracted, a correction angle of the chromosome is determined according to the extracted skeleton, the chromosome in the binary image is corrected according to the correction angle to obtain a corrected image, and then, a bending center of the chromosome is determined according to a horizontal projection vector of each line in the corrected image.
Drawings
FIG. 1 is a schematic flow chart of a chromosome straightening method in one embodiment;
FIG. 2 is a comparison of skeleton extraction before and after one embodiment;
FIG. 3 is a diagram illustrating a horizontal projection vector in a rectified image according to one embodiment;
FIG. 4 is a comparison of before and after straightening of a chromosome in one example;
FIG. 5 is a block diagram showing the construction of a chromosome straightening apparatus in one embodiment;
FIG. 6 is a block diagram showing a structure of a chromosome straightening apparatus in another embodiment;
FIG. 7 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a chromosome straightening method is provided, and this embodiment is exemplified by applying the method to a terminal, and it is to be understood that the method can also be applied to a server, and can also be applied to a system including the terminal and the server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
and S102, carrying out binarization processing on the chromosome image to obtain a binary image of the chromosome.
The chromosome image is an image of a chromosome that has been captured. The binarization processing is a process of setting the gray value of a pixel point on an image to be 0 or 255, namely, the whole image presents an obvious black and white effect. The binary image of the chromosome is an image obtained by binarizing the chromosome image.
In one embodiment, the chromosome image may be an image of a chromosome segmented from a cell image captured by a microscope.
It is understood that in the binary image of the chromosome, the white foreground part is a chromosome region, and the black background part is a non-chromosome region.
In one embodiment, the terminal may convert the chromosome image into a gray-scale image and then perform binarization processing on the gray-scale image.
In one embodiment, the terminal may perform binarization processing on the gray-scale image of the chromosome through threshold segmentation to obtain a binary image of the chromosome.
In one embodiment, in the binary image obtained by the binarization processing, the pixel value of the background pixel is 0, and the pixel value of the chromosome region is 255. In one embodiment, the terminal may convert the binary image obtained by the binarization processing into a binary image having a pixel value of only 0 or 1. In one embodiment, the terminal may convert the binary image with the pixel value of 0 or 255 into a binary image with the pixel value of 0 or 1 according to the following formula:
Figure BDA0002808023030000051
wherein T (x, y) is a pixel value at a pixel point (x, y) in the binary image with a pixel value of 0 or 255, and T (x, y) is a pixel value at a pixel point (x, y) in the binary image with a pixel value of 0 or 1 obtained after conversion.
In one embodiment, the terminal may perform skeleton extraction and subsequent steps on the binary image according to the converted binary image with the pixel value of 0 or 1.
And S104, performing skeleton extraction on the binary image.
The skeleton extraction is a process of extracting a skeleton of a chromosome region (i.e., a white foreground portion) in a binary image. The skeleton can be understood as a middle axis.
Specifically, the terminal can extract the skeleton of the binary image through a thinning algorithm.
In one embodiment, the terminal may perform preprocessing on 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 fill algorithm, a dilation-erosion algorithm, and the like.
It can be understood that the binary image is preprocessed firstly, and then the preprocessed binary image is subjected to skeleton extraction, so that the extracted skeleton can be prevented from generating burrs or broken joints.
As shown in fig. 2, the schematic diagram before and after skeleton extraction is performed on a binary image. The left image is a binary image, and the right image is a skeleton obtained by skeleton extraction of the binary image.
And S106, determining the correcting angle of the chromosome according to the extracted skeleton.
The positive rotation angle is a rotation angle for positive rotation of the chromosome. By orthotropic, it is meant that the chromosome is rotated to a vertical orientation.
In one embodiment, the terminal may determine the correction angle of the chromosome according to the extracted body direction of the skeleton.
In one embodiment, the terminal may determine the correction angle of the chromosome according to the direction of the connecting line of the extracted start point and the end point of the skeleton.
And S108, correcting the chromosome in the binary image according to the correction angle to obtain a corrected image.
The corrected image is a binary image obtained by correcting the chromosome in the binary image of the chromosome.
Specifically, the terminal may correct the chromosome in the binary image through affine transformation according to the correction angle to obtain a corrected image.
And S110, determining the bending center of the chromosome according to the horizontal projection vector of each line in the corrected image.
The horizontal projection vector is a projection vector obtained by projecting a certain line of pixel points in the rotated image in the horizontal direction (i.e., projecting the pixel points to the y-axis). The value of the horizontal projection vector represents the sum of the pixel values on the line to which the horizontal projection vector corresponds. The center of curvature, which is the point on the chromosome where the degree of curvature is greatest.
It will be appreciated that if the pixel values in the binary image are 0 or 1, the sum of the pixel values on a line is also the number of pixels with pixel values of 1 (i.e. white pixels) of that line. That is, if the pixel value in the binary image is 0 or 1, the value of the horizontal projection vector indicates the number of pixels (i.e., white pixels) having a pixel value of 1 on the line corresponding to the horizontal projection vector.
Specifically, the terminal may determine the center of curvature of the chromosome from the size of the horizontal projection vector of each line in the rotated image. It can be understood that the two arms of the chromosome are thicker, and the bending center between the two arms is thinner, so that 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 line in the corrected image.
As shown in fig. 3, the left graph is a rotated image, the right graph is a graph of the horizontal projection vector value of each line in the rotated image, the horizontal axis is the index of the line in the rotated image, and the vertical axis is the horizontal projection vector value. As can be seen from the graph, the horizontal projection vector value at the position marked by 302 is just at a position between the two larger horizontal projection vectors, so the row corresponding to the position 302 can be determined as the row of the bending center of the chromosome.
In one embodiment, the terminal may determine whether the chromosome needs to be straightened. In one embodiment, if straightening is needed, the terminal may perform the following steps of determining the bending center of the chromosome according to the horizontal projection vector of each line in the corrected image so as to perform straightening processing on the chromosome.
In one embodiment, if no straightening is required, the terminal may not perform the rectification processing and the straightening processing on the image of the chromosome. In another embodiment, if the straightening is not required, the terminal may also perform the step of determining a correction angle of the chromosome according to the extracted skeleton, correcting the chromosome in the binary image according to the correction angle to obtain a corrected image, so as to correct the chromosome, but the step of determining the center of curvature of the chromosome according to the horizontal projection vector of each line in the corrected image and the subsequent steps are not required, that is, the straightening process is not required.
In one embodiment, the terminal may determine whether the chromosome needs to be straightened based on the extracted skeleton.
And S112, straightening the chromosome in the chromosome image by taking the bending center as a reference.
Specifically, the terminal may rotate the chromosome arms on both sides of the bending center with the bending center as a reference, thereby achieving chromosome straightening.
As shown in fig. 4, the left image is an original chromosome image without straightening, and the right image is a straightened chromosome image.
In the chromosome straightening method, firstly, binarization processing is carried out on a chromosome image to obtain a binary image of a chromosome, then skeleton extraction is carried out on the binary image, the correction angle of the chromosome is determined according to the extracted skeleton, the chromosome in the binary image is corrected according to the correction angle to obtain a corrected image, and then the bending center of the chromosome is determined according to the horizontal projection vector of each line in the corrected image.
In one embodiment, determining the correction angle of the chromosome from the extracted skeleton comprises: determining a starting point and a final point of the extracted skeleton; determining a connecting line of the starting point and the end point; and determining the rotation angle of the connecting line to the vertical direction as the positive rotation angle of the chromosome.
The connecting line is a line segment obtained by connecting the starting point and the end point or a straight line where the line segment is located.
Specifically, the terminal may determine the starting point and the ending point of the extracted skeleton, determine a connection line between the starting point and the ending point, determine a rotation angle for rotating the connection line to the vertical direction, and determine the rotation angle as the correction angle of the chromosome.
In this embodiment, the terminal may quickly determine the correcting angle of the chromosome according to the extracted skeleton. Compared with the method with low efficiency of sequentially rotating the chromosomes at all angles and then selecting the final correcting angle from all angles according to the specific conditions of the chromosomes after rotation at all angles, the method improves the efficiency of determining the correcting angle and saves system resources.
In one embodiment, before determining the center of curvature of the chromosome from the horizontal projection vector of each line in the rectified image, the method further comprises: determining the curvature radius of each point on the extracted skeleton; if the curvature radius of at least one point is smaller than or equal to a preset threshold value, determining that the chromosome needs to be straightened, and determining the bending center of the chromosome and the subsequent steps according to the horizontal projection vector of each line in the corrected image.
The curvature radius is the radius of the arc closest to the curve at a certain point on the curve. The radius of curvature is the inverse of curvature. The curvature of the plane curve is the rotation rate of the tangent direction angle of a certain point on the curve to the arc length, and indicates the degree of deviation of the curve from a straight line.
Specifically, the terminal may determine the radius of curvature of each extracted point on the skeleton, and then determine whether the chromosome needs to be straightened (i.e., whether the chromosome is curved) according to the radius of curvature of each point on the skeleton.
In one embodiment, the terminal may determine the radius of curvature of each point on the skeleton according to the following formula:
Figure BDA0002808023030000081
wherein, (x, y) is the coordinate of any point on the skeleton, and R is the curvature radius of the point (x, y) on the skeleton.
In one embodiment, if the radius of curvature of at least one point on the skeleton is less than or equal to a preset threshold, the terminal may determine that the chromosome needs to be straightened.
In one embodiment, if the radius of curvature of any point on the skeleton is not less than or equal to the preset threshold (i.e., the radius of curvature of all points on the skeleton is greater than the preset threshold), the terminal may determine that straightening of the chromosome is not required.
In this embodiment, the terminal may accurately determine whether the chromosome needs to be straightened according to the curvature radius of the skeleton of the chromosome. Compared with a method for judging whether the chromosome needs to be straightened based on the total area of a close fitting rectangle associated with the chromosome, the method in the embodiment can more accurately determine whether the chromosome needs to be straightened according to the curvature radius of the skeleton of the chromosome when the judgment result is not accurate enough under the condition that the chromosome is short and the like.
In one embodiment, determining the center of curvature of the chromosome from the horizontal projection vector of each line in the rectified image comprises: determining a horizontal projection vector of each line according to the corrected image; determining a global minimum value between maximum values in two preset ranges of the positive transfer image from horizontal projection vectors of each row; the global minimum corresponds to the center of curvature.
Specifically, the terminal may determine, according to the alignment image, a horizontal projection vector of each line in the alignment image, and then determine, from the horizontal projection vectors of the lines, a global minimum value between maximum values in two preset ranges of the alignment image, where the line corresponding to the determined global minimum value is the line where the bending center is located. In one embodiment, the point in the middle of the foreground portion (i.e., white pixel) on the row corresponding to the global minimum is the center of curvature.
In one embodiment, the two preset ranges may be respectively within a preset area in the upper half of the positive image and a preset area in the lower half of the positive image. In one embodiment, the terminal may determine the first maximum from top to bottom for the top half of the positive image (e.g., 304 in the right graph of fig. 3), and the first maximum from bottom to top for the bottom half of the positive image (e.g., 306 in the right graph of fig. 3). The terminal may then determine a global minimum (302 in the right graph of fig. 3) between the two determined maxima as corresponding to the center of curvature.
It is understood that the range of the global minimum value is defined by two maximum values, so as to avoid erroneously determining the narrower parts (e.g. 308 in the graph of the right diagram of fig. 3) at the upper and lower ends of the chromosome as the bending center, thereby further improving the accuracy of determining the bending center.
In the embodiment, the terminal can accurately determine the bending center according to the horizontal projection vector of each line in the corrected image, so that straightening can be performed according to the accurate bending center, and the chromosome straightening accuracy is improved.
In one embodiment, the straightening processing of the chromosome in the chromosome image with the bending center as a reference comprises: cutting the chromosome image into two chromosome arm images by taking the line where the bending center is positioned as a cutting line; respectively correcting the chromosome arms in the two images of the chromosome arms to obtain two chromosome correction subimages; and splicing the two chromosome positive conversion sub-images to obtain a straightened chromosome image.
Here, the chromosome arms mean arms on both sides of the curved center of the chromosome.
Specifically, the terminal may use a line where the bending center is located (i.e., a line corresponding to the determined global minimum) as a cutting line, cut the chromosome image into two chromosome arm images, then respectively correct the chromosome arms in the two chromosome arm images to obtain two chromosome correction sub-images, and then splice the two chromosome correction sub-images to obtain a straightened chromosome image, thereby achieving chromosome straightening.
In one embodiment, the terminal may separately invert the chromosome arms in the images of the two chromosome arms by the same method as inverting the chromosomes in the binary image. Specifically, the terminal may use a line where the bending center is located as a cutting line, cut the binary image of the chromosome into two binary images of the two chromosome arms, then perform skeleton extraction on the two binary images of the two chromosome arms respectively, determine a correction angle of the chromosome arm according to the skeleton extracted from the binary image of the chromosome arm, and correct the chromosome arm in the image of the chromosome arm according to the correction angle of the chromosome arm, so as to obtain two chromosome correction sub-images.
In one embodiment, the terminal may determine the central points of the incisions of the chromosome arms in the two chromosome inversion sub-images, respectively, and then coincide the determined central points in the two chromosome inversion sub-images, so as to splice the two chromosome inversion sub-images together, thereby obtaining the straightened chromosome image. The characteristic points are selected at the chromosome cut to assist chromosome splicing, so that the unnatural situation of chromosome splicing can be effectively avoided.
As shown in fig. 4, the left image is the original chromosome image without being straightened, and the right image is the straightened chromosome image obtained by superposing the determined central points of the two chromosome positive transfer sub-images so as to splice the two chromosome positive transfer sub-images together.
In this embodiment, the terminal performs straightening processing on the chromosome in the chromosome image with the accurately determined bending center as a reference, and compared with a method for performing straightening based on a chromosome centromere, the method for performing straightening based on the bending center has higher straightening accuracy, and improves the chromosome straightening accuracy. In addition, the chromosome is cut into two parts which are respectively corrected and then spliced, so that the problem of chromosome band information loss can be effectively avoided, and the integrity of the chromosome band information in the straightened chromosome image is ensured.
In one embodiment, before performing skeleton extraction on the binary image, the method further comprises: preprocessing the binary image by adopting a flooding filling algorithm and an expansion corrosion algorithm to obtain a preprocessed binary image; the skeleton extraction of the binary image comprises the following steps: performing skeleton extraction on the preprocessed binary image; correcting the chromosome in the binary image according to the correction angle to obtain a corrected image, wherein the correction image comprises the following steps: and correcting the chromosome in the preprocessed binary image according to the correction angle to obtain a corrected image.
The flooding filling algorithm is an algorithm which gives a seed pixel point as a starting point, diffuses the seed pixel point to adjacent pixel points nearby, finds out all points with the same or similar pixel values, fills the new pixel values and forms a connected region by the points. The dilation-erosion algorithm (i.e., closed operation) is an algorithm that performs dilation operation first and then erosion operation.
Specifically, the terminal may first perform preprocessing on the binary image by using a flood filling algorithm, and then perform preprocessing on the binary image by using an expansion corrosion algorithm to obtain a preprocessed binary image. The terminal can extract the skeleton of the preprocessed binary image and determine the positive turning angle of the chromosome according to the extracted skeleton. The terminal can correct the chromosome in the preprocessed binary image according to the correction angle to obtain a corrected image.
The binary image is preprocessed by adopting a flood filling algorithm and an expansion corrosion algorithm, so that the situations of burrs, joints breaking and the like of the extracted framework can be avoided, and the quality of the binary image and the extracted framework is improved.
In this embodiment, the terminal may perform preprocessing on the binary image to improve the quality of the binary image, and then execute subsequent steps according to the preprocessed binary image, so as to perform chromosome straightening based on the binary image with higher quality, and improve the accuracy of chromosome straightening.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in FIG. 5, there is provided a chromosome straightening apparatus 500 including: a binarization module 502, a skeleton extraction module 504, a correction angle determination module 506, a correction module 508, a bending center determination module 510 and a straightening module 512, wherein:
a binarization module 502, configured to perform binarization processing on the chromosome image to obtain a binary image of the chromosome.
And a skeleton extraction module 504, configured to perform skeleton extraction on the binary image.
And a correcting angle determining module 506, configured to determine a correcting angle of the chromosome according to the extracted skeleton.
And a correcting module 508 for correcting the chromosome in the binary image by a correcting angle to obtain a corrected image.
The center of curvature determination module 510 determines the center of curvature of the chromosome based on the horizontal projection vector of each line in the rotated image.
The straightening module 512 straightens the chromosome in the chromosome image with the bending center as a reference.
In one embodiment, the positive turning angle determining module is further configured to determine a start point and a last point of the extracted skeleton; determining a connecting line of the starting point and the end point; and determining the rotation angle of the connecting line to the vertical direction as the positive rotation angle of the chromosome.
In one embodiment, the chromosome straightening device 500 further comprises:
a chromosome curvature determination module 514 for determining the radius of curvature of each point on the extracted skeleton; if the curvature radius of at least one point is smaller than or equal to the preset threshold, it is determined that the chromosome needs to be straightened, and the bending center determining module 510 is notified to determine the bending center of the chromosome and the subsequent steps according to the horizontal projection vector of each line in the corrected image.
In one embodiment, the curvature center determination module 510 is further configured to determine a horizontal projection vector for each row based on the rotated image; determining a global minimum value between maximum values in two preset ranges of the positive transfer image from horizontal projection vectors of each row; the global minimum corresponds to the center of curvature.
In one embodiment, the straightening module 512 is further configured to cut the chromosome image into two images of the chromosome arm with the line where the center of the curve is located as a cutting line; respectively correcting the chromosome arms in the two images of the chromosome arms to obtain two chromosome correction subimages; and splicing the two chromosome positive conversion sub-images to obtain a straightened chromosome image.
In one embodiment, as shown in FIG. 6, the chromosome straightening device 500 further includes:
and the image preprocessing module 516 is configured to preprocess the binary image by using a flood filling algorithm and an expansion corrosion algorithm to obtain a preprocessed binary image.
The skeleton extraction module 504 is further configured to perform skeleton extraction on the preprocessed binary image. The correcting module 508 is further configured to correct the chromosome in the preprocessed binary image according to the correcting angle, so as to obtain a corrected image.
In the chromosome straightening device, firstly, the chromosome image is subjected to binarization processing to obtain a binary image of the chromosome, then, the skeleton of the binary image is extracted, the correction angle of the chromosome is determined according to the extracted skeleton, the chromosome in the binary image is corrected according to the correction angle to obtain a corrected image, and then, the bending center of the chromosome is determined according to the horizontal projection vector of each line in the corrected image.
For specific limitations of the chromosome straightening device, reference may be made to the above limitations of the chromosome straightening method, which are not described herein again. The various modules in the above chromosome straightening device can be implemented wholly or partially by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of chromosome straightening. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of straightening a chromosome, the method comprising:
carrying out binarization processing on the chromosome image to obtain a binary image of the chromosome;
performing skeleton extraction on the binary image;
determining the positive turning angle of the chromosome according to the extracted skeleton;
correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image;
determining the bending center of the chromosome according to the horizontal projection vector of each line in the corrected image;
and straightening the chromosome in the chromosome image by taking the bending center as a reference.
2. The method of claim 1, wherein determining the alignment angle of the chromosome from the extracted skeleton comprises:
determining a starting point and a final point of the extracted skeleton;
determining a connecting line of the starting point and the end point;
and determining the rotation angle of the connecting line to the vertical direction as the correcting angle of the chromosome.
3. The method of claim 1, wherein prior to said determining a curved center of said chromosome from a horizontal projection vector of each line in said rotated image, said method further comprises:
determining the curvature radius of each point on the extracted skeleton;
if the curvature radius of at least one point is smaller than or equal to a preset threshold value, determining that the chromosome needs to be straightened, executing the horizontal projection vector of each line in the corrected image, determining the bending center of the chromosome and performing the subsequent steps.
4. The method of claim 1, wherein determining the center of curvature of the chromosome from the horizontal projection vector of each line in the rotated positive image comprises:
determining a horizontal projection vector of each line according to the corrected image;
determining a global minimum value between maximum values in two preset ranges of the positive conversion image from horizontal projection vectors of each row; the global minimum corresponds to the center of curvature.
5. The method according to claim 1, wherein the straightening the chromosome in the chromosome image with the bending center as a reference comprises:
cutting the chromosome image into two chromosome arm images by taking the line where the bending center is positioned as a cutting line;
respectively correcting the chromosome arms in the two images of the chromosome arms to obtain two chromosome correction subimages;
and splicing the two chromosome positive conversion sub-images to obtain a straightened chromosome image.
6. The method of claim 1, wherein prior to the skeleton extracting the binary image, the method further comprises:
preprocessing the binary image by adopting a flooding filling algorithm and an expansion corrosion algorithm to obtain a preprocessed binary image;
the skeleton extraction of the binary image comprises:
performing skeleton extraction on the preprocessed binary image;
the correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image comprises:
and correcting the chromosome in the preprocessed binary image according to the correction angle to obtain a corrected image.
7. A chromosome straightening apparatus, characterized in that the apparatus comprises:
the binarization module is used for carrying out binarization processing on the chromosome image to obtain a binary image of the chromosome;
the skeleton extraction module is used for carrying out skeleton extraction on the binary image;
the correcting angle determining module is used for determining the correcting angle of the chromosome according to the extracted skeleton;
the correcting module is used for correcting the chromosome in the binary image according to the correcting angle to obtain a corrected image;
a bending center determining module, configured to determine a bending center of the chromosome according to the horizontal projection vector of each line in the rotated positive image;
and the straightening module is used for straightening the chromosome in the chromosome image by taking the bending center as a reference.
8. The apparatus of claim 7, wherein the positive rotation angle determining module is further configured to determine a start point and a end point of the extracted skeleton; determining a connecting line of the starting point and the end point; and determining the rotation angle of the connecting line to the vertical direction as the correcting angle of the chromosome.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202011375270.2A 2020-11-30 2020-11-30 Chromosome straightening method, chromosome straightening device, computer equipment and storage medium Pending CN114581310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011375270.2A CN114581310A (en) 2020-11-30 2020-11-30 Chromosome straightening method, chromosome straightening device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011375270.2A CN114581310A (en) 2020-11-30 2020-11-30 Chromosome straightening method, chromosome straightening device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114581310A true CN114581310A (en) 2022-06-03

Family

ID=81767965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011375270.2A Pending CN114581310A (en) 2020-11-30 2020-11-30 Chromosome straightening method, chromosome straightening device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114581310A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114820596A (en) * 2022-06-23 2022-07-29 西湖大学 Curved chromosome image straightening method based on combined model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114820596A (en) * 2022-06-23 2022-07-29 西湖大学 Curved chromosome image straightening method based on combined model
CN114820596B (en) * 2022-06-23 2022-10-11 西湖大学 Curved chromosome image straightening method based on combined model

Similar Documents

Publication Publication Date Title
US20190171866A1 (en) Apparatus and method for data processing
WO2021169102A1 (en) Text image processing method and apparatus, and computer device and storage medium
CN112991180B (en) Image stitching method, device, equipment and storage medium
CN109753838A (en) Two-dimensional code identification method, device, computer equipment and storage medium
CN111242126A (en) Irregular text correction method and device, computer equipment and storage medium
CN110659638B (en) License plate recognition method and device, computer equipment and storage medium
CN114581310A (en) Chromosome straightening method, chromosome straightening device, computer equipment and storage medium
CN116071272A (en) Image correction method and device, electronic equipment and storage medium thereof
CN112241646A (en) Lane line recognition method and device, computer equipment and storage medium
CN113240042A (en) Image classification preprocessing method, image classification preprocessing device, image classification equipment and storage medium
CN110956133A (en) Training method of single character text normalization model, text recognition method and device
CN111832558A (en) Character image correction method, device, storage medium and electronic equipment
CN116385415A (en) Edge defect detection method, device, equipment and storage medium
CN115147389A (en) Image processing method, apparatus, and computer-readable storage medium
CN111401366B (en) Character recognition method, character recognition device, computer equipment and storage medium
CN110363723B (en) Image processing method and device for improving image boundary effect
CN113344961A (en) Image background segmentation method and device, computing equipment and storage medium
US10614560B2 (en) Apparatus and method for image processing
CN112668578A (en) Pointer instrument reading method and device, computer equipment and storage medium
CN113781295B (en) Image processing method, device, equipment and storage medium
CN112580638B (en) Text detection method and device, storage medium and electronic equipment
CN114373153B (en) Video imaging optimization system and method based on multi-scale array camera
CN118015629A (en) Image correction method and device and electronic equipment
CN117877043A (en) Model training method, text recognition method, device, equipment and medium
CN111524073A (en) Image geometric transformation method, device, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination