A medical image processing method
By dividing medical images into sub-images and identifying missing areas, calculating fill coefficients and performing targeted repairs, the problem of inaccurate division of missing areas in the prior art is solved, and the efficiency and accuracy of medical image processing are improved.
Patent Information
- Application Number
- CN202411563707.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-11-05
AI Technical Summary
When existing medical image processing methods identify and process missing areas, they can easily lead to inaccurate boundary division, thereby reducing the processing effect.
By dividing the original scanned image into continuous sub-images, extracting the missing features of the region, identifying the structural state, separating the missing images, marking the critical points of the region, generating the missing areas, calculating the fill coefficient, selecting the fill and repair instructions, filling and repairing the missing areas, and finally stitching the repair images in the sub-image.
It improves the accurate identification and positioning of missing areas, avoids the positional adhesion between missing areas and non-deleted areas, enhances the calculation accuracy and processing efficiency of filling and repair, and effectively avoids the phenomenon of missing areas in medical images.
Smart Images

Figure CN119444620B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more specifically, to a medical image processing method. Background Art
[0002] In the field of medical imaging, image quality is crucial for accurate clinical diagnosis and treatment planning. In medical imaging, when the medical imaging equipment is subject to excessive wear or parameter imbalance, as well as the influence of negative external environmental factors, it is easy for partial missing parts to appear in the medical imaging, which in turn causes poor quality of medical images. Therefore, it is necessary to process the missing parts of medical images.
[0003] The patent application with reference publication number CN118379185A discloses a medical image processing method, including S1: image preprocessing of input medical images; S2: using contour guidance technology to analyze the initial contour map to obtain the structural information of the medical image; S3: filling the missing areas in the medical image by a local interpolation method; S4: processing the consistency of the interpolated image in the global structure by a global consistency optimization method; S5: processing the spatial resolution of the interpolated image by a detail enhancement technology; through an intelligent contour guidance process and using the contour information of the patient's anatomical structure in the medical image, it can better retain the details of key structures, focus on the interpolation of tomographic images, and significantly improve the spatial resolution of the image by filling the information of the missing areas, which helps to reduce image artifacts;
[0004] The existing medical image processing method identifies a large number of parameters that affect the missing parts from the overall medical image, analyzes the large number of parameters, and then determines whether there is a missing phenomenon in the medical image, and finally uniformly processes the missing parts. Since the overall area of the medical image is large and the content information contained is relatively complex, the collection and analysis of a large number of parameters will increase the analysis burden on the one hand, and on the other hand, it will easily cause the boundary division of the missing parts to be adhered to other areas, resulting in the subsequent filling and repair of the missing parts. The processing effect of the medical image is reduced.
[0005] In view of this, the present invention proposes a medical image processing method to solve the above problem. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a medical image processing method, applied to an image processor, comprising:
[0007] S1: obtaining an original scanned image of a medical image, dividing the original scanned image into continuous sub-images based on a partitioning criterion, and numbering the sub-images, wherein the partitioning criterion is: the distance between two adjacent horizontal dividing lines is greater than the distance between two adjacent vertical dividing lines;
[0008] S2: extracting the region missing features from the sub-image, the region missing features include blank features, discontinuous features and concave-convex features, identifying the structural state of the sub-image, the structural state includes a complete state and a missing state, and determining whether there is a missing image in the sub-image; if there is a missing image, execute S3; if there is no missing image, repeat S1-S2;
[0009] S3: Separate the missing image from the sub-image, mark the region critical points in the missing image, and connect the region critical points to generate the missing region;
[0010] S4: Obtain comprehensive filling parameters of the missing area, the comprehensive filling parameters include area ratio, boundary sharpness and regional regularity, and calculate the filling coefficient of the missing area according to the comprehensive filling data;
[0011] S5: selecting a corresponding filling and repairing instruction according to the filling coefficient, the filling and repairing instruction including a shrinking and repairing instruction and a spreading and repairing instruction, and filling and repairing the missing area to generate a repaired image;
[0012] S6: Mark the adjacent images in the sub-image, and splice the adjacent images with the repaired image to obtain a processed scanned image.
[0013] Furthermore, the sub-image division method includes:
[0014] Scanning the medical image to obtain an original scanned image, and drawing lines along the positions of the boundaries of the original scanned image to obtain four boundary lines;
[0015] Based on the preset horizontal length, i horizontal points are marked on the two horizontal boundary lines respectively, and i vertical dividing lines are generated by connecting the i horizontal points on the two boundary lines.
[0016] The lengths of the boundary lines in the horizontal and vertical directions are measured one by one by using a scale, recorded as horizontal values and vertical values respectively, and the expansion multiples are obtained by comparing the horizontal values and the vertical values;
[0017] The expression for the expansion multiple is:
[0018]
[0019] In the formula, KZ bs is the expansion multiple, SZ z is the vertical value, SP z is the horizontal value;
[0020] After multiplying the preset horizontal length by the expansion multiple, the horizontal division length is obtained. Taking the horizontal division length as the standard, p vertical points are marked on the two vertical boundary lines respectively. After correspondingly connecting the p vertical points on the two boundary lines, p horizontal dividing lines are generated;
[0021] Using i vertical dividing lines and p horizontal dividing lines as dividing lines, the original scanned image is divided into m sub-images;
[0022] The sub-image located at the upper left corner is used as the starting point for numbering, the sub-image located at the lower right corner is used as the ending point for numbering, 1 is used as the first number, and the sub-images in each row are numbered in ascending order from left to right.
[0023] Furthermore, the extraction method of blank features, discontinuous features and concave-convex features includes:
[0024] Mark the pixels in the m sub-images one by one through pixel positioning technology, and identify the pixel values of the pixels;
[0025] Pixels whose pixel values are greater than a preset pixel threshold are recorded as target pixels, and a closed line is drawn along the outer boundary of the target pixels, and the area within the closed line is recorded as the target area;
[0026] Randomly mark n non-adjacent pixels in the target area, draw a circle with the n pixels as the center and a preset first length as the radius to obtain n detection circles, and count the number of all pixels in the n detection circles to obtain n detection values;
[0027] The pixels in the target area whose pixel values are less than the preset pixel threshold are recorded as low-value pixels, and the number of low-value pixels in the n detection circles is counted to obtain n recognition values;
[0028] Compare the n identification values with the n detection values in sequence, and record the identification values that are greater than two-thirds of the detection values as blank features;
[0029] Mark the low-value pixel points in the n detection circles one by one, and draw a circle with any low-value pixel point as the center and a preset second length as the radius to obtain a low-value circle;
[0030] The number of low-value pixels and the total number of pixels in the low-value circle are counted, and the low-value circle with the number of low-value pixels greater than half of the total number of pixels is recorded as a discontinuous feature;
[0031] Mark k detection points at equal intervals on the boundary of the target area, and connect two adjacent detection points one by one to obtain k detection lines;
[0032] Computer vision technology is used to identify the horizontality of two adjacent detection lines one by one, and the horizontality of the upper limit value of the horizontality is recorded as a concave-convex feature.
[0033] Further, the identification method of the complete state and the missing state includes:
[0034] Count the number of blank features, discontinuous features, and concave-convex features in the sub-image and record them as missing values;
[0035] When the missing value is 1, the structural state of the sub-image is identified as complete;
[0036] When the missing value is greater than 1, the structural state of the sub-image is identified as missing;
[0037] Methods for determining whether there is a missing image include:
[0038] When the structural states of the m sub-images are all complete, it is determined that there is no missing image;
[0039] When there is a missing state in the structural state of the m sub-images, it is determined that there is a missing image, and x missing images are obtained.
[0040] Furthermore, the method for generating the missing region includes:
[0041] In the target area of x missing images, all low-value pixels are marked one by one, and the positions of the low-value pixels are rendered and colored by rendering technology to obtain z rendering areas;
[0042] The center points of the z rendering areas are identified respectively by computer vision technology, and q extension lines extending to the location of the target pixel are drawn outwards with the z center points as base points and the preset interval angles as standards;
[0043] The distances from the low-value pixel points on the q extension lines to the target pixel point are measured one by one to obtain the low-eye distance, and the low-value pixel point corresponding to the minimum value of the low-eye distance is recorded as the regional critical point to obtain q regional critical points;
[0044] In a clockwise manner, the q area critical points on the z rendering areas are connected in sequence to form a wrapped area, and the wrapped area is recorded as a missing area to obtain z missing areas.
[0045] Furthermore, the method for obtaining the area ratio value includes:
[0046] Count the number of all pixels in the x missing images one by one, and record it as the total pixel value;
[0047] Count the number of low-value pixels in the z missing regions in the x missing images one by one, and record them as low-value values;
[0048] After comparing the z low-value values with the total pixel value in turn, z area proportion values are obtained;
[0049] The expression of area ratio is:
[0050]
[0051] In the formula, MJ zbxz DZ is the area ratio of the zth missing region of the xth missing image. lzxz is the low value of the zth missing region of the xth missing image, XS zlx is the total pixel value of the xth missing image.
[0052] Furthermore, the method for obtaining the edge sharpness includes:
[0053] In the z missing areas, the minimum value of the low-eye distance and the maximum value of the low-eye distance are added and averaged to obtain the scanning radius;
[0054] Draw a circle with z center points as the center and z scanning radii as the radius to obtain z scanning circles;
[0055] The low-value pixel points outside the scanning circle are recorded as sharp points, and the number of sharp points is counted to obtain the sharpness value;
[0056] Compare the z sharp values with the z low value values in turn to obtain z boundary sharpnesses;
[0057] The expression of boundary sharpness is:
[0058]
[0059] In the formula, BJ jrxz is the boundary sharpness of the zth missing region of the xth missing image, JR zxz is the sharp value of the zth missing region of the xth missing image.
[0060] Furthermore, the method for obtaining regional regularity includes:
[0061] Measure the distances between any two low-value pixels in the z missing areas one by one using a scale in the horizontal and vertical directions, and record them as the first distance value and the second distance value;
[0062] The maximum value of the first distance value and the maximum value of the second distance value are recorded as the width value and the length value respectively, and the width values and the length values of the z missing regions are compared one by one to obtain the z region regularities;
[0063] The expression of regional regularity is:
[0064]
[0065] In the formula, QY gzxz is the region regularity of the zth missing region of the xth missing image, KD zxz is the width of the zth missing region of the xth missing image, CD zxz is the length value of the zth missing region of the xth missing image;
[0066] The expression of the padding coefficient is:
[0067]
[0068] In the formula, TB xsxz is the filling coefficient of the zth missing area of the xth missing image, σ1, σ2, σ3 are weight factors, and σ1, σ2, σ3 are all greater than 0.
[0069] Furthermore, the selection method of the convergence repair instruction and the diffusion repair instruction includes:
[0070] The filling coefficient TB of the missing area xsxz With the preset filling threshold TB yz Compare;
[0071] When TB xsxz Greater than or equal to TB yz When , select the diffusion repair instruction;
[0072] When TB xsxz Less than TB yz , select the collapse repair command;
[0073] The method for generating the repaired image includes:
[0074] Draw a line along the position where the boundary of the missing area is located to obtain the missing line, and record the length corresponding to half of the first distance value as a length unit;
[0075] When the diffusion repair instruction is selected, the center point of the missing area is used as the diffusion starting point, the missing line is used as the diffusion end point, and a single diffusion of one length unit is used as the standard to diffuse and repair the missing area to generate a first diffusion area;
[0076] Mark all the pixels in the first diffusion area one by one, and adjust the pixel values of all the pixels to be greater than a preset pixel threshold until all the missing areas are filled and repaired, and obtain x repaired images;
[0077] When the shrink repair command is selected, the missing line of the missing area is used as the diffusion starting point, the center point is used as the diffusion end point, and a single diffusion of one length unit is used as the standard to diffuse and repair the missing area to generate a second diffusion area;
[0078] All the pixels in the second diffusion area are marked one by one, and the pixel values of all the pixels are adjusted to be greater than a preset pixel threshold until all the missing areas are filled and repaired, thereby obtaining x repaired images.
[0079] Furthermore, the method for splicing adjacent images and the repaired image includes:
[0080] Mark the numbers of the sub-images corresponding to the x restored images one by one to obtain x restoration numbers;
[0081] In the original scanned image, adjacent numbers located above, below, to the left and to the right of the x restoration numbers are marked one by one, and sub-images corresponding to the adjacent numbers are recorded as adjacent images;
[0082] The positions between adjacent images are recorded as import positions, and x import positions are obtained;
[0083] According to the numbering from small to large, the x repaired images are sequentially spliced into the x import positions of the original scanned image to generate a processed scanned image.
[0084] Technical effects and advantages of a medical image processing method of the present invention:
[0085] The present invention obtains an original scanned image of a medical image, divides the original scanned image into continuous sub-images based on a partitioning criterion, and numbers the sub-images, extracts regional missing features from the sub-images, identifies the structural state of the sub-images, and determines whether there is a missing image in the sub-images, separates the missing image from the sub-images, marks regional critical points in the missing image, and generates a missing region after connecting the regional critical points, obtains a comprehensive filling parameter of the missing region, calculates a filling coefficient of the missing region according to the comprehensive filling data, selects a corresponding filling and repairing instruction according to the filling coefficient, fills and repairs the missing region, generates a repaired image, marks adjacent images in the sub-images, and splices the adjacent images with the repaired image to obtain a processed scanned image; The existing technology can break down the entire original scanned image into parts through sub-image division, reduce the amount of content information contained in each sub-image, facilitate the subsequent rapid identification of missing phenomena in the sub-image, and reduce the processing burden of medical images. At the same time, the missing area is drawn in combination with the regional critical points, which can accurately identify and locate the area with missing phenomena in the sub-image, avoid the position adhesion between the missing area and the non-missing area, and thus improve the subsequent calculation accuracy of the difficulty of filling and repairing the missing area. According to the different filling and repair difficulties, each missing area can be filled and repaired in a targeted manner, thereby effectively improving the processing efficiency of medical images and avoiding the phenomenon of missing areas in medical images. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 A schematic diagram of a flow chart of a medical image processing method provided in Embodiment 1 of the present invention;
[0087] Figure 2 A schematic diagram of a medical image processing system provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0088] 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.
[0089] Example 1: Please refer to Figure 1 As shown, a medical image processing method described in this embodiment is applied to an image processor, comprising:
[0090] S1: obtaining an original scanned image of a medical image, dividing the original scanned image into continuous sub-images based on a partitioning criterion, and numbering the sub-images;
[0091] The original scanned image refers to the image obtained by directly scanning the medical image through the scanning device, and serves as the basis for subsequent image processing. When the original scanned image is obtained, the original scanned image at this time can fully represent the entire medical image, so the information content contained in the original scanned image is relatively large and complex, so it is necessary to break the original scanned image into pieces;
[0092] Sub-image refers to a part of the original scanned image with a smaller area and continuous arrangement formed after the original scanned image is divided, and it is the direct object of subsequent image processing. In order to ensure the consistency and rationality of the sub-image, it is necessary to give restrictions when dividing the original scanned image, and the restrictions are the partition criteria;
[0093] The partitioning criterion is: the distance between two adjacent horizontal dividing lines is greater than the distance between two adjacent vertical dividing lines; this can ensure that the sub-images after division maintain a rectangular structure without distortion, and also ensure that the length and width of the sub-images can be consistent in proportion with the original scanned image, achieving a constant proportion effect for each sub-image;
[0094] The sub-image division methods include:
[0095] Scanning the medical image to obtain an original scanned image, and drawing lines along the positions of the boundaries of the original scanned image to obtain four boundary lines;
[0096] Based on the preset horizontal length, i horizontal points are marked on two horizontal boundary lines respectively, and i vertical dividing lines are generated after the i horizontal points on the two boundary lines are connected correspondingly; the preset horizontal length is used to represent the length of the dividing interval in the vertical direction when dividing the sub-image, and is used as the width of the sub-image to ensure that the width of each sub-image is consistent;
[0097] The lengths of the boundary lines in the horizontal and vertical directions are measured one by one by using a scale, recorded as horizontal values and vertical values respectively, and the expansion multiples are obtained by comparing the horizontal values and the vertical values;
[0098] The expression for the expansion multiple is:
[0099]
[0100] In the formula, KZ bs is the expansion multiple, SZ z is the vertical value, SP z is the horizontal value;
[0101] After multiplying the preset horizontal length by the expansion multiple, the horizontal division length is obtained. Taking the horizontal division length as the standard, p vertical points are marked on the two vertical boundary lines respectively, and the p vertical points on the two boundary lines are connected to generate p horizontal dividing lines; it is ensured that the division interval length of the sub-image in the horizontal direction is greater than the division interval length in the vertical direction, so that the divided sub-image can be consistent with the original scanned image in terms of proportion;
[0102] Using i vertical dividing lines and p horizontal dividing lines as dividing lines, the original scanned image is divided into m sub-images;
[0103] The sub-image located at the upper left corner is used as the starting point for numbering, the sub-image located at the lower right corner is used as the ending point for numbering, 1 is used as the first number, and the sub-images in each row are numbered in ascending order from left to right.
[0104] For example, when there are 4 sub-images in the first row, the sub-images in the first row are numbered 1, 2, 3, 4 from left to right, and so on, and the sub-images in each remaining row are numbered until the last sub-image in the last row is numbered m. All the sub-images are then numbered, so that each sub-image has a unique number, and provides a comparison basis for the subsequent segmentation and splicing of sub-images.
[0105] S2: extracting the missing region features from the sub-image, identifying the structural state of the sub-image, and determining whether there is a missing image in the sub-image;
[0106] The region missing feature refers to the feature that can determine whether the missing information contained in the sub-image is complete, so as to serve as the basis for judging whether there is a missing phenomenon in the sub-image, and the complete state of the sub-image can be identified by comparing the region missing features;
[0107] The region missing features include blank features, discontinuity features and concave-convex features; the blank feature refers to the feature that the entire local area in the sub-image is blank, the discontinuity feature refers to the feature that continuous discontinuous areas appear in the sub-image, and the shadow feature refers to the feature that the local area in the sub-image is uneven;
[0108] The extraction methods of blank features, discontinuous features and concave-convex features include:
[0109] Mark the pixels in the m sub-images one by one through pixel positioning technology, and identify the pixel values of the pixels;
[0110] Pixels with pixel values greater than a preset pixel threshold are recorded as target pixels, and a closed line is drawn along the outer boundary of the target pixel, and the area within the closed line is recorded as the target area; the preset pixel threshold is the maximum value of the pixel value of the pixel belonging to the background position in the medical image, which can effectively distinguish the pixel points belonging to the background and human tissue in the sub-image, ensuring that the position of the target pixel can correspond to the human tissue;
[0111] Randomly mark n non-adjacent pixels in the target area, draw a circle with the n pixels as the center and the preset first length as the radius to obtain n detection circles, and count the number of all pixels in the n detection circles to obtain n detection values; the preset first length is used to limit the length of the radius of the area when a local complete loss occurs in the sub-image, and at the same time ensure that the number of pixels in the detection circle can be kept within a reasonable range, which is convenient for subsequent calculation operations;
[0112] The pixels in the target area whose pixel values are less than the preset pixel threshold are recorded as low-value pixels, and the number of low-value pixels in the n detection circles is counted to obtain n recognition values;
[0113] Compare the n identification values with the n detection values in sequence, and record the identification values that are greater than two-thirds of the detection values as blank features;
[0114] Low-value pixel points in the n detection circles are marked one by one, and a circle is drawn with any low-value pixel point as the center and a preset second length as the radius to obtain a low-value circle; the preset second length is used to limit the length of the radius of the area when a local part is missing in the sub-image, so as to avoid the low-value circle from being too large or too small, thereby improving the subsequent recognition accuracy of discontinuous features;
[0115] The number of low-value pixels and the total number of pixels in the low-value circle are counted, and the low-value circle with the number of low-value pixels greater than half of the total number of pixels is recorded as a discontinuous feature;
[0116] Mark k detection points at equal intervals on the boundary of the target area, and connect two adjacent detection points one by one to obtain k detection lines;
[0117] The horizontality of two adjacent detection lines is identified one by one through computer vision technology, and the horizontality of the upper limit value is recorded as a concave-convex feature. The horizontality refers to the inclination of the detection line on the sub-image with the horizontal reference line, so that the inclination of the detection line can be represented vertically and used as the basis for judging the horizontality.
[0118] After the blank features, discontinuity features and concave-convex features are obtained, the blank features, discontinuity features and concave-convex features can be used as a basis for subsequent judgment of whether the content information in the sub-image is complete, thereby identifying the structural state of the sub-image;
[0119] The structural state includes a complete state and a missing state; the complete state means that the content information in the sub-image is not missing, and the content information in the sub-image is complete; the missing state means that the content information in the sub-image is missing, and the content information in the sub-image is incomplete;
[0120] Methods for identifying complete and missing states include:
[0121] Count the number of blank features, discontinuous features, and concave-convex features in the sub-image and record them as missing values;
[0122] When the missing value is 1, the number of features in the sub-image that can cause missing content information is small, so the integrity of the sub-image is good, and the structural state of the sub-image is recognized as a complete state;
[0123] When the missing value is greater than 1, there are a large number of features in the sub-image that can cause missing content information, so the integrity of the sub-image is poor, and the structural state of the sub-image is identified as a missing state.
[0124] Missing images refer to images with missing content information in the sub-images, and are used as the objects for subsequent optimization of medical images. By determining whether missing images exist, the execution of subsequent steps can be affected;
[0125] Methods for determining whether there is a missing image include:
[0126] When the structural states of the m sub-images are all complete, there is no sub-image with missing content information among the m sub-images, and it is not necessary to optimize the medical image, and it is determined that there is no missing image;
[0127] When there is a missing state in the structural state of the m sub-images, and there is a sub-image with missing content information among the m sub-images, it is necessary to optimize the medical image, determine the presence of the missing image, and obtain x missing images.
[0128] S3: Separate the missing image from the sub-image, mark the region critical points in the missing image, and connect the region critical points to generate the missing region;
[0129] When a missing image is determined, the missing image needs to be separated from the sub-images in order to effectively distinguish different types of sub-images, and also to facilitate the subsequent accurate and independent optimization processing of the missing image. When separating the missing image, firstly, it is necessary to clarify the number corresponding to the missing image, and separate the missing image corresponding to the number from the sub-image. At the same time, according to the arrangement of the sub-images, the sub-images corresponding to the numbers that are adjacent to the number of the missing image in the upper, lower, left, and right positions are marked one by one, so that these sub-images can be used as the basis for stitching and repairing the processed missing image in the subsequent stitching.
[0130] After separating the missing image from the sub-image, it is necessary to accurately identify and mark the specific missing position and area in the missing image, so as to obtain the missing area and make the missing area serve as the precise area for subsequent medical image processing;
[0131] In order to accurately identify the missing area in the missing image, it is necessary to accurately locate the points corresponding to the boundaries of the missing area, so that these points can be used as regional critical points, and the overall construction and drawing effect of the missing area can be achieved by connecting multiple regional critical points;
[0132] The missing area generation methods include:
[0133] In the target area of x missing images, all low-value pixels are marked one by one, and the positions of the low-value pixels are rendered and colored by rendering technology to obtain z rendering areas; the missing areas can be colored obviously and directly by rendering, so that the missing areas can be clearly divided from other areas, and the precise positioning of the boundaries of the subsequent missing areas can be ensured;
[0134] The center points of the z rendering areas are identified by computer vision technology, and q extension lines extending to the location of the target pixel are drawn outwards with the z center points as base points and the preset interval angle as standard; the preset interval angle is used to represent the angle between the critical points of two adjacent areas, so as to ensure that the critical points of the two adjacent areas can maintain a certain angle and distance, and avoid the critical points of the two adjacent areas being too close or too far away, resulting in unclear and inaccurate boundary positioning and division of the missing area;
[0135] The distances from the low-value pixel points on the q extension lines to the target pixel point are measured one by one to obtain the low-eye distance, and the low-value pixel point corresponding to the minimum value of the low-eye distance is recorded as the regional critical point to obtain q regional critical points;
[0136] In a clockwise manner, the q area critical points on the z rendering areas are connected in sequence to form a wrapped area, and the wrapped area is recorded as a missing area to obtain z missing areas.
[0137] It should be noted that the number of missing areas is not unique, and the size of each missing area is not unique, and the area shape of the missing areas is also different. In order to repair the missing areas, it is necessary to conduct an overall analysis of all missing areas and select the corresponding repair method for efficient repair processing.
[0138] S4: Obtain comprehensive filling parameters of the missing area, and calculate the filling coefficient of the missing area according to the comprehensive filling data;
[0139] Comprehensive filling parameters refer to data that can comprehensively represent the shape, size and area of the missing area, and serve as a basis for determining what kind of repair treatment to take for the missing area in the future, providing a basis for the filling coefficient of the missing area;
[0140] Comprehensive filling parameters include area ratio, boundary sharpness and regional regularity;
[0141] The area ratio value refers to the ratio of the area corresponding to the missing area to the area corresponding to the missing image, which can be used to represent the area size of the missing area. When the area ratio value is larger, the ratio of the area corresponding to the missing area to the area corresponding to the missing image is larger, and the difficulty of repairing the missing area is greater, and the filling coefficient is also greater;
[0142] Methods for obtaining area ratio values include:
[0143] Count the number of all pixels in the x missing images one by one, and record it as the total pixel value;
[0144] Count the number of low-value pixels in the z missing regions in the x missing images one by one, and record them as low-value values;
[0145] After comparing the z low-value values with the total pixel value in turn, z area proportion values are obtained;
[0146] The expression of area ratio is:
[0147]
[0148] In the formula, MJ zbxzDZ is the area ratio of the zth missing region of the xth missing image. lzxz is the low value of the zth missing region of the xth missing image, XS zlx is the total pixel value of the xth missing image.
[0149] Boundary sharpness refers to the ratio of the number of sharp convex shapes appearing on the boundary of the missing area to the total number of convex shapes, which can be used to indicate the boundary sharpness of the missing area. When the boundary sharpness is greater, the ratio of the number of sharp convex shapes appearing on the boundary of the missing area to the total number of convex shapes is greater, and the difficulty of repairing the missing area is greater, and the filling coefficient is also greater;
[0150] The methods for obtaining the edge sharpness include:
[0151] In the z missing areas, the minimum value of the low-eye distance and the maximum value of the low-eye distance are added and averaged to obtain the scanning radius;
[0152] Draw a circle with z center points as the center and z scanning radii as the radius to obtain z scanning circles;
[0153] The low-value pixel points outside the scanning circle are recorded as sharp points, and the number of sharp points is counted to obtain the sharpness value;
[0154] Compare the z sharp values with the z low value values in turn to obtain z boundary sharpnesses;
[0155] The expression of boundary sharpness is:
[0156]
[0157] In the formula, BJ jrxz is the boundary sharpness of the zth missing region of the xth missing image, JR zxz is the sharp value of the zth missing region of the xth missing image.
[0158] Regional regularity refers to the ratio between the width of the missing area and the length of the missing area, which can be used to represent the regularity of the missing area. The larger the regional regularity, the larger the ratio between the width of the missing area and the length of the missing area, the more regular the missing area is, the easier it is to repair, and the smaller the filling coefficient is.
[0159] Methods for obtaining regional regularity include:
[0160] Measure the distances between any two low-value pixels in the z missing areas one by one using a scale in the horizontal and vertical directions, and record them as the first distance value and the second distance value;
[0161] The maximum value of the first distance value and the maximum value of the second distance value are recorded as the width value and the length value respectively, and the width values and the length values of the z missing regions are compared one by one to obtain the z region regularities;
[0162] The expression of regional regularity is:
[0163]
[0164] In the formula, QY gzxz is the region regularity of the zth missing region of the xth missing image, KD zxz is the width of the zth missing region of the xth missing image, CD zxz is the length of the zth missing region of the xth missing image.
[0165] After obtaining the area ratio, boundary sharpness and regional regularity, the filling coefficient of each missing area can be calculated according to the area ratio, boundary sharpness and regional regularity, so that the filling coefficient can represent the difficulty of repairing the missing area. The larger the filling coefficient, the greater the difficulty of filling and repairing the missing area.
[0166] The expression of the padding coefficient is:
[0167]
[0168] In the formula, TB xsxz is the filling coefficient of the zth missing area of the xth missing image, σ1, σ2, σ3 are weight factors, and σ1, σ2, σ3 are all greater than 0;
[0169] It should be noted that σ1+σ2+σ3=1. For example, σ1 is 0.36, σ2 is 0.32, and σ3 is 0.32.
[0170] S5: selecting a corresponding filling and repairing instruction according to the filling coefficient, and filling and repairing the missing area based on the filling and repairing instruction to generate a repaired image;
[0171] The filling and repairing instruction refers to an instruction that can fill and repair the missing area, so that the missing area in the missing area can be automatically filled and repaired, which can ensure that the missing area in the missing image can be effectively and accurately repaired. Different filling coefficients correspond to different filling and repairing difficulties, and also correspond to different filling and repairing instructions to meet diverse and multi-difficulty filling and repairing needs;
[0172] The filling and repairing instructions include the gathering and repairing instructions and the spreading and repairing instructions; the gathering and repairing instructions refer to a method of gradually gathering and filling and repairing from the outside of the missing area to the center, which can quickly fill and repair the missing area and is suitable for filling and repairing the missing area with less difficulty; the spreading and repairing instructions refer to a method of gradually spreading and filling and repairing from the center of the missing area to the outside, which can accurately fill and repair the missing area and is suitable for filling and repairing the missing area with greater difficulty;
[0173] The selection method of the convergence repair instruction and the spread repair instruction includes:
[0174] The filling coefficient TB of the missing area xsxz With the preset filling threshold TB yz Comparison; the preset filling threshold refers to the critical value of the filling coefficient corresponding to the shrinking repair instruction and the spreading repair instruction, which can accurately distinguish the specific instructions corresponding to the filling coefficient of the missing area; the preset filling threshold is obtained by collecting a large number of critical values of the filling coefficients corresponding to the shrinking repair instructions and the spreading repair instructions in history, and then calculating the average value;
[0175] When TB xsxz Greater than or equal to TB yz When , it means that the zth missing area of the xth missing image is difficult to fill and repair, and needs to be diffused from the inside to the outside, so the diffusion repair instruction is selected;
[0176] When TB xsxz Less than TB yz When , it means that the filling and repairing difficulty of the zth missing area of the xth missing image is relatively small, and it needs to be repaired by diffusing outward and inward, so the shrinking repair instruction is selected.
[0177] When the corresponding filling and repairing instruction is selected, the missing area of the missing image can be filled and repaired according to the filling and repairing instruction, so that the missing image after filling and repairing can form a repaired image, so that the repaired image can be used as the basis for subsequent sub-image stitching;
[0178] The method for generating the repaired image includes:
[0179] Draw a line along the position where the boundary of the missing area is located to obtain the missing line, and record the length corresponding to half of the first distance value as a length unit;
[0180] When the diffusion repair instruction is selected, the center point of the missing area is used as the diffusion starting point, the missing line is used as the diffusion end point, and a single diffusion of one length unit is used as the standard to diffuse and repair the missing area to generate the first diffusion area; the diffusion repair method from the inside to the outside can ensure that the missing area with greater difficulty in filling and repairing can be repaired efficiently and accurately;
[0181] Mark all the pixels in the first diffusion area one by one, and adjust the pixel values of all the pixels to be greater than a preset pixel threshold until all the missing areas are filled and repaired, and obtain x repaired images;
[0182] When the shrink repair command is selected, the missing line of the missing area is used as the diffusion starting point, the center point is used as the diffusion end point, and a single diffusion of one length unit is used as the standard to diffuse and repair the missing area to generate a second diffusion area; the diffusion repair method from outside to inside can ensure that the missing area with less difficulty in filling and repairing can be repaired efficiently and accurately;
[0183] All the pixels in the second diffusion area are marked one by one, and the pixel values of all the pixels are adjusted to be greater than a preset pixel threshold until all the missing areas are filled and repaired, thereby obtaining x repaired images.
[0184] It should be noted that when the repaired image is obtained, the missing image at this time will be converted into the repaired image, so that the repaired image can be used as an object for subsequent image stitching and can automatically fill in and repair the missing parts in the medical image.
[0185] S6: marking adjacent images in the sub-image, and splicing the adjacent images with the repaired image to obtain a processed scanned image;
[0186] The adjacent images refer to sub-images that are adjacently arranged above, below, left and right to the number of the missing image, so that the adjacent images can be correspondingly spliced with the repaired image, thereby obtaining the scanned image after the final repair process;
[0187] The stitching method of adjacent images and repaired images includes:
[0188] Mark the numbers of the sub-images corresponding to the x restored images one by one to obtain x restoration numbers;
[0189] In the original scanned image, adjacent numbers located above, below, to the left and to the right of the x restoration numbers are marked one by one, and sub-images corresponding to the adjacent numbers are recorded as adjacent images;
[0190] The position between adjacent images is recorded as the import position, and x import positions are obtained; the import position is used to accurately locate the splicing position of the repaired image to ensure that the subsequent repaired image and the adjacent image can be effectively and accurately spliced;
[0191] According to the order of numbers from small to large, the x repaired images are sequentially spliced into the corresponding import positions of the original scanned image to generate a processed scanned image.
[0192] It should be noted that when the restoration number of the xth restoration image is 3, then according to the sub-image numbering rule, the restoration image with restoration number 3 is imported between the adjacent images numbered 2 and 4. By repeating this cycle, the accurate stitching effect of all restoration images can be achieved, and finally a complete and accurate processed scanned image can be obtained.
[0193] In this embodiment, by acquiring an original scanned image of a medical image, the original scanned image is divided into continuous sub-images based on a partitioning criterion, and the sub-images are numbered, regional missing features are extracted from the sub-images, the structural state of the sub-images is identified, and it is determined whether there is a missing image in the sub-image, the missing image is separated from the sub-image, the regional critical points are marked in the missing image, and the regional critical points are connected to generate a missing area, and a comprehensive filling parameter of the missing area is obtained, and a filling coefficient of the missing area is calculated according to the comprehensive filling data, and a corresponding filling and repairing instruction is selected according to the filling coefficient, and the missing area is filled and repaired to generate a repaired image, and adjacent images are marked in the sub-image, and the adjacent images are spliced with the repaired image to obtain a processed scanned image; With the prior art, the entire original scanned image can be broken down into small pieces by dividing it into sub-images, thereby reducing the amount of content information contained in each sub-image, facilitating the subsequent rapid identification of missing phenomena in the sub-images, and reducing the processing burden of medical images. At the same time, the missing areas can be drawn in combination with regional critical points, so that the areas with missing phenomena in the sub-images can be accurately identified and located, avoiding the position adhesion between the missing areas and the non-missing areas, thereby improving the subsequent calculation accuracy of the difficulty of filling and repairing the missing areas, and can perform targeted filling and repair processing on each missing area according to different filling and repair difficulties, thereby effectively improving the processing efficiency of medical images and avoiding the phenomenon of missing areas in medical images.
[0194] Example 2: Please refer to Figure 2 As shown, the part not described in detail in this embodiment is described in the first embodiment, and a medical image processing system is provided, which is applied to an image processor and is used to implement a medical image processing method, including an image division module, an image determination module, a region generation module, a coefficient calculation module, an image restoration module and an image stitching module, wherein each module is connected via a wired or wireless network;
[0195] An image segmentation module is used to obtain an original scanned image of a medical image, and based on a partitioning criterion, divide the original scanned image into continuous sub-images and number the sub-images. The partitioning criterion is: the distance between two adjacent horizontal segmentation lines is greater than the distance between two adjacent vertical segmentation lines.
[0196] An image determination module is used to extract region missing features from a sub-image, the region missing features include blank features, discontinuity features and concave-convex features, identify the structural state of the sub-image, the structural state includes a complete state and a missing state, and determine whether there is a missing image in the sub-image;
[0197] A region generation module is used to separate the missing image from the sub-image, mark the region critical points in the missing image, and connect the region critical points to generate the missing region;
[0198] The coefficient calculation module is used to obtain the comprehensive filling parameters of the missing area. The comprehensive filling parameters include area ratio, boundary sharpness and regional regularity. The filling coefficient of the missing area is calculated based on the comprehensive filling data.
[0199] An image restoration module is used to select a corresponding filling restoration instruction according to a filling coefficient, wherein the filling restoration instruction includes a shrinking restoration instruction and a diffusing restoration instruction, and to fill and restore the missing area to generate a restored image;
[0200] The image stitching module is used to mark adjacent images in the sub-image and stitch the adjacent images with the repaired image to obtain a processed scanned image.
[0201] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A medical image processing method, applied to an image processor, characterized in that: include: S1: obtaining an original scanned image of a medical image, dividing the original scanned image into continuous sub-images based on a partitioning criterion, and numbering the sub-images, wherein the partitioning criterion is: the distance between two adjacent horizontal dividing lines is greater than the distance between two adjacent vertical dividing lines; S2: extracting the region missing features from the sub-image, the region missing features include blank features, discontinuous features and concave-convex features, identifying the structural state of the sub-image, the structural state includes a complete state and a missing state, and determining whether there is a missing image in the sub-image; if there is a missing image, execute S3; if there is no missing image, repeat S1-S2; S3: Separate the missing image from the sub-image, mark the region critical points in the missing image, and connect the region critical points to generate the missing region; S4: Obtain comprehensive filling parameters of the missing area, the comprehensive filling parameters include area ratio, boundary sharpness and regional regularity, and calculate the filling coefficient of the missing area according to the comprehensive filling data; S5: selecting a corresponding filling and repairing instruction according to the filling coefficient, the filling and repairing instruction including a shrinking and repairing instruction and a spreading and repairing instruction, and filling and repairing the missing area to generate a repaired image; S6: Mark the adjacent images in the sub-image, and splice the adjacent images with the repaired image to obtain a processed scanned image.
2. A medical image processing method according to claim 1, characterized in that: The sub-image division methods include: Scanning the medical image to obtain an original scanned image, and drawing lines along the positions of the boundaries of the original scanned image to obtain four boundary lines; Based on the preset horizontal length, i horizontal points are marked on the two horizontal boundary lines respectively, and i vertical dividing lines are generated by connecting the i horizontal points on the two boundary lines. The lengths of the boundary lines in the horizontal and vertical directions are measured one by one by using a scale, recorded as horizontal values and vertical values respectively, and the expansion multiples are obtained by comparing the horizontal values and the vertical values; The expression for the expansion multiple is: In the formula, KZ bs is the expansion multiple, SZ z is the vertical value, SP z is the horizontal value; After multiplying the preset horizontal length by the expansion multiple, the horizontal division length is obtained. Taking the horizontal division length as the standard, p vertical points are marked on the two vertical boundary lines respectively. After correspondingly connecting the p vertical points on the two boundary lines, p horizontal dividing lines are generated; Using i vertical dividing lines and p horizontal dividing lines as dividing lines, the original scanned image is divided into m sub-images; The sub-image located at the upper left corner is used as the starting point for numbering, the sub-image located at the lower right corner is used as the ending point for numbering, 1 is used as the first number, and the sub-images in each row are numbered in ascending order from left to right.
3. A medical image processing method according to claim 2, characterized in that: The extraction methods of blank features, discontinuous features and concave-convex features include: Mark the pixels in the m sub-images one by one through pixel positioning technology, and identify the pixel values of the pixels; Pixels whose pixel values are greater than a preset pixel threshold are recorded as target pixels, and a closed line is drawn along the outer boundary of the target pixels, and the area within the closed line is recorded as the target area; Randomly mark n non-adjacent pixels in the target area, draw a circle with the n pixels as the center and a preset first length as the radius to obtain n detection circles, and count the number of all pixels in the n detection circles to obtain n detection values; The pixels in the target area whose pixel values are less than the preset pixel threshold are recorded as low-value pixels, and the number of low-value pixels in the n detection circles is counted to obtain n recognition values; Compare the n identification values with the n detection values in sequence, and record the identification values that are greater than two-thirds of the detection values as blank features; Mark the low-value pixel points in the n detection circles one by one, and draw a circle with any low-value pixel point as the center and a preset second length as the radius to obtain a low-value circle; The number of low-value pixels and the total number of pixels in the low-value circle are counted, and the low-value circle with the number of low-value pixels greater than half of the total number of pixels is recorded as a discontinuous feature; Mark k detection points at equal intervals on the boundary of the target area, and connect two adjacent detection points one by one to obtain k detection lines; Computer vision technology is used to identify the horizontality of two adjacent detection lines one by one, and the horizontality of the upper limit value of the horizontality is recorded as a concave-convex feature.
4. A medical image processing method according to claim 3, characterized in that: Methods for identifying complete and missing states include: Count the number of blank features, discontinuous features, and concave-convex features in the sub-image and record them as missing values; When the missing value is 1, the structural state of the sub-image is identified as complete; When the missing value is greater than 1, the structural state of the sub-image is identified as missing; Methods for determining whether there is a missing image include: When the structural states of the m sub-images are all complete, it is determined that there is no missing image; When there is a missing state in the structural state of the m sub-images, it is determined that there is a missing image, and X missing images are obtained.
5. A medical image processing method according to claim 4, characterized in that: The missing area generation methods include: In the target area of the X missing images, all low-value pixels are marked one by one, and the positions of the low-value pixels are rendered and colored by rendering technology to obtain z rendering areas; The center points of the z rendering areas are identified respectively by computer vision technology, and q extension lines extending to the location of the target pixel are drawn outwards with the z center points as base points and the preset interval angles as standards; The distances from the low-value pixel points on the q extension lines to the target pixel point are measured one by one to obtain the low-eye distance, and the low-value pixel point corresponding to the minimum value of the low-eye distance is recorded as the regional critical point to obtain q regional critical points; In a clockwise manner, the q area critical points on the z rendering areas are connected in sequence to form a wrapped area, and the wrapped area is recorded as a missing area to obtain z missing areas.
6. A medical image processing method according to claim 5, characterized in that: Methods for obtaining area ratio values include: Count the number of all pixels in the X missing images one by one, and record it as the total pixel value; Count the number of low-value pixels in the z missing regions in the X missing images one by one, and record them as low-value values; After comparing the z low-value values with the total pixel value in turn, z area proportion values are obtained; The expression of area ratio is: In the formula, MJ zbxz DZ is the area ratio of the zth missing region in the Xth missing image. lzxz is the low value of the zth missing region of the xth missing image, XS zlx is the total pixel value of the xth missing image.
7. A medical image processing method according to claim 6, characterized in that: The methods for obtaining the edge sharpness include: In the z missing areas, the minimum value of the low-eye distance and the maximum value of the low-eye distance are added and averaged to obtain the scanning radius; Draw a circle with z center points as the center and z scanning radii as the radius to obtain z scanning circles; The low-value pixel points outside the scanning circle are recorded as sharp points, and the number of sharp points is counted to obtain the sharpness value; Compare the z sharp values with the z low value values in turn to obtain z boundary sharpnesses; The expression of boundary sharpness is: In the formula, BJ jrxz is the boundary sharpness of the zth missing region of the xth missing image, JR zxz is the sharp value of the zth missing region of the xth missing image.
8. A medical image processing method according to claim 7, characterized in that: Methods for obtaining regional regularity include: Measure the distances between any two low-value pixels in the z missing areas one by one using a scale in the horizontal and vertical directions, and record them as the first distance value and the second distance value; The maximum value of the first distance value and the maximum value of the second distance value are recorded as the width value and the length value respectively, and the width values and the length values of the z missing regions are compared one by one to obtain the z region regularities; The expression of regional regularity is: In the formula, QY gzxz is the region regularity of the zth missing region of the xth missing image, KD zxz is the width of the zth missing region of the xth missing image, CD zxz is the length value of the zth missing region of the xth missing image; The expression of the padding coefficient is: In the formula, TB xsxz is the filling coefficient of the zth missing area of the Xth missing image, σ1, σ2, σ3 are weight factors, and σ1, σ2, σ3 are all greater than 0.
9. A medical image processing method according to claim 8, characterized in that: The selection method of the convergence repair instruction and the spread repair instruction includes: The filling coefficient TB of the missing area xsxz With the preset filling threshold TB yz Compare; When TB xsxz Greater than or equal to TB yz When , select the diffusion repair instruction; When TB xsxz Less than TB yz , select the collapse repair command; The method for generating the repaired image includes: Draw a line along the position where the boundary of the missing area is located to obtain the missing line, and record the length corresponding to half of the first distance value as a length unit; When the diffusion repair instruction is selected, the center point of the missing area is used as the diffusion starting point, the missing line is used as the diffusion end point, and a single diffusion of one length unit is used as the standard to diffuse and repair the missing area to generate a first diffusion area; Mark all the pixels in the first diffusion area one by one, and adjust the pixel values of all the pixels to be greater than a preset pixel threshold until all the missing areas are filled and repaired, and obtain x repaired images; When the shrink repair command is selected, the missing line of the missing area is used as the diffusion starting point, the center point is used as the diffusion end point, and a single diffusion of one length unit is used as the standard to diffuse and repair the missing area to generate a second diffusion area; All the pixels in the second diffusion area are marked one by one, and the pixel values of all the pixels are adjusted to be greater than a preset pixel threshold until all the missing areas are filled and repaired, thereby obtaining x repaired images.
10. A medical image processing method according to claim 9, characterized in that: The stitching method of adjacent images and repaired images includes: Mark the numbers of the sub-images corresponding to the x restored images one by one to obtain X restoration numbers; In the original scanned image, adjacent numbers located above, below, to the left and to the right of the x restoration numbers are marked one by one, and sub-images corresponding to the adjacent numbers are recorded as adjacent images; The positions between adjacent images are recorded as import positions, and x import positions are obtained; According to the numbering from small to large, the X repaired images are sequentially spliced into the X import positions of the original scanned image to generate a processed scanned image.
Citation Information
Patent Citations
Medical image processing method
CN118379185A
Method for automatically filling structure information and texture information of hole area of image scene
CN102324102A
Medical segmented image concave defect filling method based on convex hull high-order power fitting
CN116596791A