Contour line processing method and device of medical image, medical image system and equipment
By segmenting and downsampling the contour lines of medical images, the problem of jagged distortion is solved, the display effect of contour lines is improved, and it is suitable for various image parameters.
Patent Information
- Application Number
- CN202310643639.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-10
AI Technical Summary
After the prior art amplifies the contour lines of medical images, jagged distortion is prone to occur, affecting the display effect.
By obtaining the original serrated contour lines and image parameters of the target image, dividing them into multiple contour lines, and downsampling each segment to obtain multiple sampling points, and then obtaining smooth contour lines to avoid the influence of serrated distortion.
The smoothing processing of jagged distortion profiles is achieved, which improves the display effect, is suitable for images with different parameters, and is not affected by image resolution and magnification.
Smart Images

Figure CN119107463A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical technology, and in particular to a method, device, medical imaging system and equipment for processing contours of medical images. Background Art
[0002] Multi-Planar Reformation (MPR) refers to the reconstruction of the original three-dimensional medical image to obtain the cross-sectional, sagittal and coronal two-dimensional images of the original three-dimensional medical image.
[0003] In the reconstruction process, the contour lines in the reconstructed two-dimensional image can be extracted by edge extraction, morphological processing or voxel data segmentation, and different parts of the image can be divided by the extracted contour lines. However, after the extracted contour lines are enlarged, the contour lines will appear jagged, affecting the display effect of the contour lines.
[0004] Therefore, there is an urgent need for a method for processing contour lines with jagged distortion. Summary of the invention
[0005] Based on this, it is necessary to provide a medical image contour processing method, device, medical imaging system and equipment to address the above technical problems, which can process jagged contour lines and ensure the display effect of the contour lines.
[0006] In a first aspect, the present application provides a contour processing method, the method comprising:
[0007] Obtaining the original sawtooth contour line of the target image and the image parameters of the target image;
[0008] According to the image parameters of the target image, the original sawtooth contour line is divided into a plurality of contour line segments;
[0009] Downsampling each contour segment to obtain multiple sampling points;
[0010] Based on each sampling point, a smooth contour line corresponding to the original jagged contour line is obtained.
[0011] In one embodiment, the original sawtooth contour line is divided into a plurality of contour line segments according to image parameters of the target image, including:
[0012] According to the image parameters of the target image, the number of segments of the original sawtooth contour line is determined;
[0013] Based on the number of segments, the original sawtooth contour is divided into multiple contour segments.
[0014] In one embodiment, the image parameters include image height, image display viewport height, image resolution, and the contour perimeter of the original sawtooth contour line; and determining the number of segments of the original sawtooth contour line according to the image parameters of the target image includes:
[0015] Obtain the image scaling factor according to the image height and the image display viewport height, obtain the shortest curve length according to the contour perimeter and the contour coefficient; and obtain the smoothing scale coefficient of the original jagged contour line;
[0016] The number of segments of the original jagged contour line is determined according to the smoothing scale coefficient of the original jagged contour line, the image resolution, the shortest curve length and the image scaling factor.
[0017] In one embodiment, downsampling is performed on each contour segment to obtain a plurality of sampling points, including:
[0018] Obtain position information of multiple pixel points on the contour segment;
[0019] According to the position information of each pixel point, the sampling point of the contour segment is determined.
[0020] In one embodiment, determining the sampling point of the contour segment according to the position information of each pixel point includes:
[0021] According to the position information of each pixel point, the center pixel point of the contour segment is determined from each pixel point;
[0022] The central pixel point is determined as the sampling point of the contour segment.
[0023] In one embodiment, obtaining a smooth contour line corresponding to the original sawtooth contour line based on each sampling point includes:
[0024] Get the shortest curve length on the original sawtooth contour line;
[0025] According to the shortest curve length on the original sawtooth contour line, a plurality of interpolation points are determined on the contour line;
[0026] Connect each sampling point with each interpolation point in sequence to obtain a smooth contour line corresponding to the original sawtooth contour line.
[0027] In one embodiment, a plurality of interpolation points are determined on the contour line according to the shortest curve length of the original sawtooth contour line, including:
[0028] Get the number of sampling points at each sampling point;
[0029] According to the shortest curve length and the number of sampling points, multiple interpolation points of the contour line are determined.
[0030] In a second aspect, the present application further provides a contour processing device, the device comprising:
[0031] A first acquisition module is used to acquire an original sawtooth contour line of a target image and image parameters of the target image;
[0032] A division module, used for dividing the original sawtooth contour line into a plurality of contour line segments according to image parameters of the target image;
[0033] A processing module, used for downsampling each contour segment to obtain multiple sampling points;
[0034] The second acquisition module is used to acquire a smooth contour line corresponding to the original sawtooth contour line based on each sampling point.
[0035] In a third aspect, the present application further provides a medical imaging system, the medical imaging system comprising a server, the server comprising a processor;
[0036] The processor is used to obtain the original sawtooth contour line of the target image and the image parameters of the target image; according to the image parameters of the target image, the original sawtooth contour line is divided into a plurality of contour line segments; each contour line segment is downsampled to obtain a plurality of sampling points; based on each sampling point, a smooth contour line corresponding to the original sawtooth contour line is obtained.
[0037] In a fourth aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the content of any one embodiment of the method for processing contours of medical images in the first aspect is implemented.
[0038] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the content of any one embodiment of the method for processing contours of medical images in the first aspect.
[0039] In a sixth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the content of any one embodiment of the method for processing contours of medical images in the first aspect.
[0040] The above-mentioned contour processing method, device, medical imaging system and equipment of medical images obtain the original sawtooth contour of the target image and the image parameters of the target image, divide the original sawtooth contour into multiple contour segments according to the image parameters of the target image, downsample each contour segment to obtain multiple sampling points, and obtain the smooth contour corresponding to the original sawtooth contour based on each sampling point. The method adaptively divides the original sawtooth contour according to the image parameters of the target image, that is, for images with different parameters, the division method is different, so that the division process can be applied to images with various different parameters, then downsamples the multiple contour segments obtained by division, and determines the smooth contour corresponding to the original sawtooth contour based on the result of the downsampling process, that is, the contour processing method can be applied to the original sawtooth contour in images with different parameters; at the same time, the original sawtooth contour with sawtooth distortion is processed, and the sawtooth in the original sawtooth contour is smoothed, and the obtained smooth contour will not be affected by the enlargement of the target image, and its display effect is better, which ensures the display effect of the contour in the target image. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1a is a schematic diagram of a jagged distorted contour line in a target image in one embodiment;
[0042] Figure 1b is a schematic diagram of a jagged distorted contour line in one embodiment;
[0043] Figure 2 A diagram showing an application environment of a contour processing method for medical images in one embodiment;
[0044] Figure 3 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0045] Figure 4 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0046] Figure 5 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0047] Figure 6 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0048] Figure 7 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0049] Figure 8 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0050] Fig. 9 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0051] Fig.10 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0052] Fig.11 is a schematic flow chart of a method for processing contours of medical images in one embodiment;
[0053] Fig.12 is a schematic diagram of a smooth contour line in a target image in one embodiment;
[0054] Fig.13 FIG. 4 is a structural block diagram of a contour processing device for medical images in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] Before introducing the technical solution of the present application, a brief introduction to the background technology of the embodiments of the present application is first given.
[0057] Before processing the contour lines, it is necessary to extract the contour lines in the target image. In one method, the traditional image processing method can be used to perform edge extraction, morphological processing, etc. on the target image to extract the contour lines in the target image. However, the implementation process of extracting contour lines using traditional image processing methods is simple, but the accuracy of the extracted contour lines is low and it is difficult to adapt to different tissues. In another method, the voxel data segmentation method can also be used to extract the contour lines of the target image. During the extraction process, the three-dimensional volume data in the target image is classified using a neural network model, and then the edge of the target tissue is projected onto a two-dimensional plane. However, the accuracy of this type of method will be affected by the training accuracy of the neural network model. When the training accuracy of the neural network model is high, it can achieve a very accurate segmentation effect and can adapt to the segmentation of various tissues.
[0058] After the contours of multiple tissues of the target image are extracted using traditional image processing methods or voxel data segmentation methods, when the target image is magnified, jagged distortion will appear at the edges of the contours. The greater the magnification of the image, the more obvious the jaggedness will be, which will affect the display effect of the contours. Figure 1a and Figure 1bA schematic diagram showing the jagged contour lines in a target image. The closed areas formed by the jagged contour lines are areas corresponding to different tissues in the target image. A target image may include jagged contour lines corresponding to one tissue or may include jagged contour lines corresponding to multiple tissues.
[0059] In order to process the jagged contour lines, the present application provides a contour line processing method for medical images, which performs segmentation processing on the jagged contour lines, and performs downsampling processing based on the contour lines after segmentation processing, and obtains the processed smooth contour lines according to the multiple sampling points obtained by downsampling. The processed smooth contour lines will not be affected by the image resolution and magnification of the target image, and the contour lines are all displayed in the form of smooth contour lines, and the display effect is better. Next, the specific content of the contour line processing method for medical images of the present application is introduced.
[0060] The contour processing method provided in the embodiment of the present application can be applied to Figure 2 In the application environment shown. For example, the computer device may be a server, a personal computer, a laptop, a smart phone, a tablet computer, a smart mobile phone, etc. The computer device may include a processor, a memory and a network interface connected by a system bus or wirelessly. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data in the contour processing process of medical images. The network interface of the computer device is used to communicate with an external terminal through a network connection, and the computer program is executed by the processor to implement a contour processing method for medical images. Among them, the computer device can be implemented by an independent computer device or a computer device cluster composed of multiple computer devices. It should be noted that the memory of the computer device is not limited to the above-mentioned memory, and may also include a high-speed random access memory, a volatile solid-state memory, etc. In addition, the composition architecture of the computer device is not limited to the above-mentioned situation, and some components may be added or omitted.
[0061] In one embodiment, Figure 3 As shown, a method for processing contour lines of medical images is provided, and the method is applied to Figure 2 The computer device in the example is used to illustrate, including the following steps:
[0062] S101, obtaining an original sawtooth contour line of a target image and image parameters of the target image.
[0063] The image parameters may include information such as image height, image display viewport height, image resolution, and the contour perimeter of the original sawtooth contour line. The image height indicates the vertical distance of the target image, and the image display viewport height indicates the vertical distance of the target image in the display terminal. For example, the image height may be 100 pixels, and the image display viewport height may be 80 pixels, indicating that the image is not fully displayed in the display terminal. Image resolution refers to the amount of information stored in the target image, including image height and image width. For example, if the image height is 100 pixels and the image width is 80 pixels, the image resolution is 100*80. The contour of the original sawtooth contour line can be referenced. Figure 1a , Figure 1a The figure contains three tissue outlines, namely No. 1, No. 2 and No. 3. Figure 1b for Figure 1a The enlarged schematic diagram of the tissue outline in No. 1 is from Figure 1b The jagged contour of tissue 1 can be clearly observed in the figure. The perimeter of the contour can be calculated by the number of pixels where the contour is located.
[0064] In this embodiment, the computer device can analyze the target image using a traditional image processing method or a neural network model, extract the contour lines of all tissues in the target image, and amplify the target image and the contour lines until the contour lines are jagged, and use all the jagged contour lines as the original jagged contour lines of the target image. In addition, the computer device can search for image parameters corresponding to the target image from an image information database based on the identification information of the target image. Alternatively, the computer device can also analyze the target image to obtain image parameter information of the target image. This embodiment does not limit the method for obtaining the image parameters of the target image.
[0065] S102, dividing the original sawtooth contour line into a plurality of contour line segments according to image parameters of the target image.
[0066] In this embodiment, when smoothing the original sawtooth contour line, the original sawtooth contour line needs to be segmented. Different original sawtooth contour lines correspond to different numbers of contour line segments. The more the number of contour line segments, the better the smoothing effect of the smoothed contour line; the fewer the number of contour line segments, the worse the smoothing effect of the smoothed contour line. For any original sawtooth contour line, the computer device can determine the number of contour line segments that the original sawtooth contour line needs to be divided into according to the image parameters of the target image, and divide the original sawtooth contour line into multiple contour line segments based on the number of contour line segments. The lengths of the multiple contour line segments can be the same or different.
[0067] S103, performing downsampling processing on each contour line segment to obtain a plurality of sampling points.
[0068] The downsampling process refers to extracting some pixels on each contour line segment. The purpose of the downsampling process is to filter out the high-frequency jitter in the original sawtooth contour line. After the downsampling process, a series of isolated points on the original sawtooth contour line are obtained.
[0069] In this embodiment, for any contour segment, the computer device can select one or more pixel points in the contour segment, and use all the obtained pixel points as sampling points. When selecting a pixel point in the contour segment as a sampling point, the center point in the contour segment can be selected as the sampling point using the average downsampling method, and each sampling point represents the position information of the contour segment. It should be noted that in order to ensure the rationality of sampling, the intervals between the sampling points need to be the same, or the intervals between the sampling points need to be within a preset interval range.
[0070] S104: Based on each sampling point, a smooth contour line corresponding to the original sawtooth contour line is obtained.
[0071] In this embodiment, after obtaining the sampling points corresponding to the plurality of contour segments, the computer device may smoothly connect the sampling points in the order of the sampling points, and use the smooth curve obtained by the connection as the smooth contour line corresponding to the original sawtooth contour line. It should be noted that the smooth connection is to calculate a plurality of interpolation points between the sampling points, and sequentially connect the plurality of interpolation points with the sampling points to obtain the smooth contour line corresponding to the original sawtooth contour line.
[0072] In the above-mentioned contour processing method of medical images, the original sawtooth contour of the target image and the image parameters of the target image are obtained, and the original sawtooth contour is divided into multiple contour segments according to the image parameters of the target image, and each contour segment is downsampled to obtain multiple sampling points, and based on each sampling point, a smooth contour corresponding to the original sawtooth contour is obtained. The method adaptively divides the original sawtooth contour according to the image parameters of the target image, that is, for images with different parameters, the division method is different, so that the division process can be applied to images with various different parameters, and then the multiple contour segments obtained by division are downsampled, and based on the results of the downsampling process, the smooth contour corresponding to the original sawtooth contour is determined, that is, the contour processing method can be applied to the original sawtooth contour in images with different parameters; at the same time, the original sawtooth contour with sawtooth distortion is processed, and the sawtooth in the original sawtooth contour is smoothed, and the obtained smooth contour will not be affected by the enlargement of the target image, and its display effect is better, which ensures the display effect of the contour in the target image.
[0073] Based on the above embodiments, this embodiment is to Figure 3The relevant contents of step S102 "dividing the original sawtooth contour into multiple contour segments according to the image parameters of the target image" are introduced and explained. Figure 4 As shown, as a non-limiting example, the above step S102 may include the following content:
[0074] S201, determining the number of segments of the original sawtooth contour line according to image parameters of the target image.
[0075] In this embodiment, the computer device can calculate the number of segments of the original sawtooth contour line in the target image using a calculation formula of the number of segments and image parameters. Alternatively, the computer device can also train a neural network model using image parameters and corresponding numbers of segments of multiple images, input the image parameters of the target image into the trained neural network model, analyze the image parameters through the neural network model, and determine the number of segments of the original sawtooth contour line.
[0076] S202: Divide the original sawtooth contour line into a plurality of contour line segments based on the number of segments.
[0077] In this embodiment, after the computer device obtains the number of segments of the original sawtooth contour line, it can obtain the circumference of the original sawtooth contour line, use the ratio of the circumference of the original sawtooth contour line to the number of segments as the length of each contour line segment, use any point of the original sawtooth contour line as the starting point, and divide the contour line segment in sequence according to the length of the contour line segment from the starting point to obtain multiple contour line segments.
[0078] In the above-mentioned contour processing method of medical images, the number of segments of the original sawtooth contour line is determined according to the image parameters of the target image, and the original sawtooth contour line is divided into a plurality of contour line segments based on the number of segments. The method can determine a more reasonable number of segments of the original sawtooth contour line through the image parameters of the target image, so that the original sawtooth contour line can be divided more accurately based on the segmentation data, so that the obtained plurality of contour line segments are more accurate.
[0079] Based on the above embodiment, the image parameters include image height, image display viewport height, image resolution and the contour perimeter of the original sawtooth contour line. Figure 4 The relevant contents of step S201 "determining the number of segments of the original sawtooth contour line according to the image parameters of the target image" are introduced and explained. Figure 5 As shown, as a non-limiting example, the above step S201 may include the following content:
[0080] S301, obtaining an image scaling factor according to an image height and an image display viewport height, obtaining a shortest curve length according to a contour perimeter and a contour coefficient; and obtaining a smoothing scale coefficient of an original sawtooth contour line.
[0081] In this embodiment, the image zoom factor represents the ratio of image magnification, and the image zoom factor is the ratio of the image display viewport height to the image height. The computer device can calculate the ratio of the image display viewport height to the image height, and determine the ratio as the image zoom factor.
[0082] When all the teeth of the original sawtooth contour are isosceles right triangles, the hypotenuse of the isosceles right triangle is the shortest. The shortest curve length refers to the hypotenuse corresponding to each tooth in the sawtooth contour. That is, the shortest curve length corresponding to the contour perimeter can be calculated according to the formula for calculating the hypotenuse of the isosceles right triangle. When the contour perimeter is C, the shortest curve length is It is about 0.7, which is the minimum value that does not lose the main inflection point information of the original sawtooth contour line at a specified scale. In practice, it can be any value in [0.7, 1]. The value selected in this interval theoretically does not change significantly. However, since the smaller the number of segments, the smaller the amount of calculation, the minimum value of 0.7 is preferred, that is, the shortest curve length is 0.7C.
[0083] The smoothing scale coefficient indicates the degree of smoothing of the jagged contour line. The selection of the smoothing scale coefficient is related to the content of the target image. The finer the tissue, the smaller the value of the smoothing scale coefficient is required, which can prevent information loss caused by transition smoothing. The computer device can select the smoothing scale coefficient corresponding to the original jagged contour line according to the fineness of the tissue in the target image. It should be noted that after the smoothing scale coefficient is determined, the resolution, size and contour perimeter of the image are not related to the smoothing effect.
[0084] S302, determining the number of segments of the original sawtooth contour line according to the smoothing scale coefficient of the original sawtooth contour line, the image resolution, the shortest curve length and the image scaling coefficient.
[0085] In this embodiment, the computer device can bring the smoothing scale coefficient, image resolution, shortest curve length and image scaling coefficient of the original sawtooth contour line into the calculation formula of the number of segments, and calculate the number of segments of the original sawtooth contour line through the calculation formula of the number of segments. The calculation formula of the number of segments can be expressed as:
[0086]
[0087] Where N is the number of segments; 0.7C is the shortest curve length; k is the smoothing scale factor of the original sawtooth contour; p is the image resolution; h is the image height; H is the image viewport height; It represents the inverse of the image scaling factor. The larger the image scaling factor, the smaller the number of segments.
[0088] In the above-mentioned contour processing method of medical images, the image scaling factor is obtained according to the image height and the image display viewport height, and the shortest curve length is obtained according to the contour perimeter and the contour factor; and the smoothing scale factor of the original sawtooth contour is obtained, and the number of segments of the original sawtooth contour is determined according to the smoothing scale factor, image resolution, shortest curve length and image scaling factor of the original sawtooth contour. The method accurately calculates the image scaling factor and the shortest curve length through the image parameters of the target image, and accurately calculates the number of segments based on the obtained image scaling factor, shortest curve length, smoothing scale factor and image resolution, so that the original sawtooth contour can be accurately processed in segments based on the number of segments.
[0089] Based on the above embodiments, this embodiment is to Figure 3 The relevant contents of step S103 "downsampling each contour line segment to obtain multiple sampling points" are introduced and explained. Figure 6 As shown, as a non-limiting example, the above step S103 may include the following content:
[0090] S401, obtaining position information of a plurality of pixel points on a contour segment.
[0091] In this embodiment, for any contour segment, the computer device can obtain the position information of each pixel point on the contour segment in the image coordinate system, or, it can also use any point in the target image as a reference point to obtain the relative position information of each pixel point on the contour segment relative to the reference point.
[0092] S402: Determine the sampling point of the contour segment according to the position information of each pixel point.
[0093] In this embodiment, after the computer device obtains the position information of each pixel point, it can calculate the position information of the central pixel point of each pixel point according to the position information of each pixel point, and determine the central pixel point as the sampling point of the contour segment. Alternatively, the computer device can also arrange the pixels according to the position information of each pixel point, and use the pixel point arranged in the middle position as the sampling point of the contour segment.
[0094] In the above-mentioned contour processing method of medical images, for any contour segment, the position information of multiple pixel points on the contour segment is obtained, and the sampling point of the contour segment is determined according to the position information of each pixel point. This method can accurately determine the sampling point in the contour segment by obtaining the position information of multiple pixel points in a contour segment and based on the position information of each pixel point.
[0095] Based on the above embodiments, this embodiment is to Figure 6The relevant contents of step S402 "determining the sampling points of the contour segment according to the position information of each pixel point" are introduced and explained. Figure 7 As shown, as a non-limiting example, the above step S402 may include the following content:
[0096] S501, determining the central pixel point of the contour segment from the pixels according to the position information of the pixels.
[0097] In this embodiment, the computer device may calculate the average value of the position information of each pixel point, and use the obtained average value as the coordinate of the central pixel point among the pixels. The coordinate of the central pixel point can be expressed as:
[0098]
[0099] in, Indicates the center pixel; Indicates the coordinate information of the center pixel; N i Indicates the number of pixels; (x n ,y n ) represents the position information of each pixel.
[0100] S502: Determine the central pixel point as the sampling point of the contour segment.
[0101] In this embodiment, the central pixel point is located at the center of the contour segment and can better represent the characteristics of the contour segment. Therefore, the central pixel point can be used as the sampling point of the contour segment.
[0102] In the above-mentioned contour processing method of medical images, the central pixel of the contour segment is determined from each pixel according to the position information of each pixel, and the central pixel is determined as the sampling point of the contour segment. Based on the position information of each pixel, this method can accurately filter out the central pixel from each pixel, and use the central pixel as the sampling point of the contour segment, thereby improving the accuracy of the downsampling process.
[0103] Based on the above embodiments, this embodiment is to Figure 3 The relevant contents of step S104 "obtaining a smooth contour line corresponding to the original sawtooth contour line based on each sampling point" are introduced and explained. Figure 8 As shown, as a non-limiting example, the above step S104 may include the following content:
[0104] S601, obtaining the shortest curve length on the original sawtooth contour line.
[0105] In this embodiment, when all the saw teeth of the original sawtooth contour line are isosceles right triangles, the hypotenuse of the isosceles right triangle is the shortest distance, and the computer device can use the formula for calculating the hypotenuse of the isosceles right triangle to calculate the shortest curve length on the original sawtooth contour line. This method is the same as the method in step S301, and will not be described in detail here. The shortest curve length is 0.7C.
[0106] S602: Determine a plurality of interpolation points on the contour line according to the shortest curve length on the original sawtooth contour line.
[0107] In this embodiment, since the original sawtooth contour line is downsampled, the intervals between the sampling points are large, and it is necessary to determine interpolation points between the sampling points. For any two adjacent sampling points, the interpolation point between the two adjacent sampling points can be determined according to the shortest curve length. It should be noted that the distance between the two adjacent interpolation points is the same, and the distance between the adjacent interpolation point and the sampling point is the same as the distance between the two adjacent interpolation points.
[0108] S603, connecting each sampling point and each interpolation point in sequence to obtain a smooth contour line corresponding to the original sawtooth contour line.
[0109] In this embodiment, after inserting multiple interpolation points between each sampling point, the distance between two adjacent points is small. Therefore, the computer device can connect the adjacent sampling points and the interpolation points in sequence according to the order of each sampling point and each interpolation point, and use the connected curve as the smooth contour line corresponding to the original sawtooth contour line.
[0110] In the above-mentioned contour processing method of medical images, the shortest curve length on the original sawtooth contour line is obtained, and multiple interpolation points are determined on the contour line according to the shortest curve length on the original sawtooth contour line, and each sampling point is sequentially connected with each interpolation point to obtain a smooth contour line corresponding to the original sawtooth contour line. This method obtains the shortest curve length on the original sawtooth contour line, and based on the shortest curve length, multiple interpolation points on the contour line can be accurately determined, and the error between the connected smooth contour line and the original sawtooth contour line is smaller, thereby ensuring the accuracy of the smooth contour line.
[0111] Based on the above embodiments, this embodiment is to Figure 8 The relevant contents of step S602 "determining multiple interpolation points on the contour line according to the shortest curve length of the original sawtooth contour line" are introduced and explained. Fig. 9 As shown, as a non-limiting example, the above step S602 may include the following content:
[0112] S701, obtaining the number of sampling points of each sampling point.
[0113] In this embodiment, each contour segment only selects the central pixel point among the pixels as the sampling point during the downsampling process, that is, each contour segment has only one sampling point, and the computer device can obtain the number of contour segments and use the number of contour segments as the number of sampling points. For example, when the number of contour segments is 10, the number of sampling points of each sampling point is also 10.
[0114] S702, determining multiple interpolation points of the contour line according to the shortest curve length and the number of sampling points.
[0115] In this embodiment, the computer device can calculate the number of all points of the original sawtooth contour line using an interpolation algorithm based on the shortest curve length, the shortest curve length is 0.7C, and the number of all points is also 0.7C. The interpolation algorithm can be a third-order Bessel interpolation method, a cubic spline interpolation method, or a Lagrange interpolation method. It should be noted that the number of all points includes all sampling points and interpolation points, and the number of interpolation points is the difference between the number of all points and the number of sampling points. For example, when the number of all points is 100 and the number of sampling points is 10, the number of multiple interpolation points is 90.
[0116] In the above-mentioned contour processing method of medical images, the number of sampling points of each sampling point is obtained, and multiple interpolation points of the contour line can be accurately determined according to the shortest curve length and the number of sampling points, so that a more accurate smooth contour curve can be obtained based on the interpolation points and the sampling points.
[0117] In one embodiment, the contour processing method of medical images is described in detail below. Fig.10 As shown, as a non-limiting example, the method may include:
[0118] S801, obtaining an original sawtooth contour line of a target image, and obtaining an image height, an image display viewport height, an image resolution, and a contour perimeter of the original sawtooth contour line of the target image;
[0119] S802, obtaining an image scaling factor according to the image height and the image display viewport height, obtaining a shortest curve length according to the contour perimeter and the contour coefficient; and obtaining a smoothing scale coefficient of the original sawtooth contour line;
[0120] S803, determining the number of segments of the original sawtooth contour line according to the smoothing scale coefficient of the original sawtooth contour line, the image resolution, the shortest curve length and the image scaling coefficient;
[0121] S804, dividing the original sawtooth contour line into a plurality of contour line segments based on the number of segments;
[0122] S805, obtaining position information of a plurality of pixel points on the contour segment;
[0123] S806, determining the center pixel point of the contour segment from the pixels according to the position information of the pixels;
[0124] S807, determining the central pixel point as the sampling point of the contour segment;
[0125] S808, obtaining the shortest curve length on the original sawtooth contour line;
[0126] S809, obtaining the number of sampling points of each sampling point;
[0127] S810, determining multiple interpolation points of the contour line according to the shortest curve length and the number of sampling points;
[0128] S811, connecting each sampling point and each interpolation point in sequence to obtain a smooth contour line corresponding to the original sawtooth contour line.
[0129] Fig.11 The figure is a schematic diagram of a contour processing method of a medical image in an embodiment, and the processing method includes: S901: adaptively segmenting the original sawtooth contour to obtain multiple contour segments. The adaptive segmentation is based on the image parameters of the target image, and the segmentation process is different for different image parameters; S902: performing mean downsampling processing on each contour segment obtained by segmentation to obtain multiple sampling points; S903: performing smooth interpolation processing on each sampling point to obtain a smooth contour curve corresponding to the original sawtooth contour.
[0130] Fig.12 is a schematic diagram of a smooth contour curve. Fig.12 The target image is the same as that in Figure 1. The contour line in Figure 1 is the original sawtooth contour line. Fig.12 is the smooth contour curve after processing.
[0131] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0132] Based on the same inventive concept, the embodiment of the present application also provides a medical image contour processing device for implementing the medical image contour processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more medical image contour processing device embodiments provided below can refer to the limitations of the medical image contour processing method above, and will not be repeated here.
[0133] In one embodiment, Fig.13 As shown, a medical image contour processing device is provided, comprising: a first acquisition module 11, a division module 12, a processing module 13 and a second acquisition module 14, wherein:
[0134] A first acquisition module 11 is used to acquire an original sawtooth contour line of a target image and image parameters of the target image;
[0135] A dividing module 12, for dividing the original sawtooth contour into a plurality of contour segments according to image parameters of the target image;
[0136] A processing module 13 is used to perform downsampling processing on each contour line segment to obtain multiple sampling points;
[0137] The second acquisition module 14 is used to acquire a smooth contour line corresponding to the original sawtooth contour line based on each sampling point.
[0138] In one embodiment, the above-mentioned division module 12 includes: a determination unit and a division unit, wherein:
[0139] A first determining unit, used for determining the number of segments of the original sawtooth contour line according to image parameters of the target image;
[0140] The dividing unit is used for dividing the original sawtooth contour line into a plurality of contour line segments based on the number of segments.
[0141] In one embodiment, the image parameters include image height, image display viewport height, image resolution and contour circumference of the original sawtooth contour line; the above-mentioned determination unit is also used to obtain the image scaling factor according to the image height and the image display viewport height, and obtain the shortest curve length according to the contour circumference and the contour coefficient; and obtain the smoothing scale coefficient of the original sawtooth contour line; determine the number of segments of the original sawtooth contour line according to the smoothing scale coefficient of the original sawtooth contour line, the image resolution, the shortest curve length and the image scaling coefficient.
[0142] In one embodiment, the processing module 13 includes: an acquisition unit and a second determination unit, wherein:
[0143] A first acquisition unit, used to acquire position information of a plurality of pixel points on a contour segment;
[0144] The second determining unit is used to determine the sampling point of the contour segment according to the position information of each pixel point.
[0145] In one embodiment, the second determining unit is further configured to determine a central pixel point of the contour segment from each pixel point according to position information of each pixel point; and determine the central pixel point as a sampling point of the contour segment.
[0146] In one embodiment, the second acquisition module 14 includes: a second acquisition unit, a third determination unit and a connection unit, wherein:
[0147] The second acquisition unit is used to acquire the shortest curve length on the original sawtooth contour line;
[0148] A third determining unit is used to determine a plurality of interpolation points on the contour line according to the shortest curve length on the original sawtooth contour line;
[0149] The connection unit is used to connect each sampling point with each interpolation point in sequence to obtain a smooth contour line corresponding to the original sawtooth contour line.
[0150] In one embodiment, the third determining unit is further used to obtain the number of sampling points of each sampling point; and determine multiple interpolation points of the contour line according to the shortest curve length and the number of sampling points.
[0151] Each module in the above-mentioned contour processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0152] Based on the same inventive concept, the embodiment of the present application also provides a medical imaging system for implementing the above-mentioned contour processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the medical imaging system embodiment provided below can refer to the limitations of the contour processing method above, and will not be repeated here.
[0153] In one embodiment, a medical imaging system is provided, the medical imaging system comprising a medical imaging acquisition device and a server.
[0154] The medical image acquisition device is used to acquire a target image and send the target image and image parameters of the target image to a server;
[0155] The server is used to receive a target image and image parameters of the target image, obtain an original sawtooth contour line of the target image according to the target image; divide the original sawtooth contour line into a plurality of contour line segments according to the image parameters of the target image; perform downsampling processing on each contour line segment to obtain a plurality of sampling points; and obtain a smooth contour line corresponding to the original sawtooth contour line based on each sampling point.
[0156] In addition, the server in the medical imaging system may include a display, and the display is used to display an original sawtooth contour line of the target image and a smooth contour line corresponding to the original sawtooth contour line.
[0157] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the content of any one of the embodiments of the above-mentioned medical image contour processing method is implemented.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the content of any one of the embodiments of the above-mentioned medical image contour processing method is implemented.
[0159] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the content of any one of the embodiments of the above-mentioned method for processing contours of medical images.
[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0162] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for processing contour lines of medical images. It is characterized in that The method comprises: Acquire an original sawtooth contour line of a target image and image parameters of the target image; Dividing the original sawtooth contour line into a plurality of contour line segments according to image parameters of the target image; Downsampling each of the contour line segments to obtain a plurality of sampling points; Based on each of the sampling points, a smooth contour line corresponding to the original sawtooth contour line is obtained.
2. The method according to claim 1, It is characterized in that The step of dividing the original sawtooth contour line into a plurality of contour line segments according to the image parameters of the target image comprises: Determining the number of segments of the original sawtooth contour line according to image parameters of the target image; Based on the segment number, the original sawtooth contour is divided into a plurality of contour segments.
3. The method according to claim 2, It is characterized in that The image parameters include image height, image display viewport height, image resolution, and the contour perimeter of the original sawtooth contour line; determining the number of segments of the original sawtooth contour line according to the image parameters of the target image includes: Acquire an image scaling factor according to the image height and the image display viewport height, acquire a shortest curve length according to the contour perimeter and the contour coefficient; and acquire a smoothing scale coefficient of the original sawtooth contour line; The number of segments of the original jagged contour line is determined according to the smoothing scale coefficient of the original jagged contour line, the image resolution, the shortest curve length and the image scaling coefficient.
4. The method according to any one of claims 1 to 3, It is characterized in that The downsampling process is performed on each of the contour line segments to obtain a plurality of sampling points, including: Obtaining position information of a plurality of pixel points on the contour segment; The sampling point of the contour segment is determined according to the position information of each pixel point.
5. The method according to claim 4, It is characterized in that The step of determining the sampling point of the contour segment according to the position information of each pixel point includes: Determine the central pixel point of the contour segment from the pixel points according to the position information of the pixel points; The central pixel point is determined as the sampling point of the contour segment.
6. The method according to any one of claims 1 to 3, It is characterized in that The step of obtaining a smooth contour line corresponding to the original sawtooth contour line based on each of the sampling points includes: Obtain the shortest curve length on the original sawtooth contour line; Determining a plurality of interpolation points on the contour line according to the shortest curve length on the original sawtooth contour line; Each of the sampling points and each of the interpolation points are connected in sequence to obtain a smooth contour line corresponding to the original sawtooth contour line.
7. The method according to claim 6, It is characterized in that The step of determining a plurality of interpolation points on the contour line according to the shortest curve length of the original sawtooth contour line comprises: Obtaining the number of sampling points of each sampling point; A plurality of interpolation points of the contour line are determined according to the shortest curve length and the number of sampling points.
8. A contour processing device for medical images, It is characterized in that The device comprises: A first acquisition module, used for acquiring an original sawtooth contour line of a target image and image parameters of the target image; A division module, used for dividing the original sawtooth contour line into a plurality of contour line segments according to image parameters of the target image; A processing module, used for downsampling each of the contour segments to obtain a plurality of sampling points; The second acquisition module is used to acquire a smooth contour line corresponding to the original sawtooth contour line based on each of the sampling points.
9. A medical imaging system, It is characterized in that The medical imaging system includes a medical imaging acquisition device and a server; The medical image acquisition device is used to acquire a target image and send the target image and image parameters of the target image to the server; The server is used to receive the target image and the image parameters of the target image, obtain the original sawtooth contour line of the target image according to the target image; divide the original sawtooth contour line into multiple contour line segments according to the image parameters of the target image; downsample each of the contour line segments to obtain multiple sampling points; and obtain a smooth contour line corresponding to the original sawtooth contour line based on each of the sampling points.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image processing method and device
CN107481200A
Contour extraction method and device, electronic equipment and storage medium
CN112183541A
Nodule contour smoothing method and device
CN113256509A
Outline extracting method
JP1994251148A
Device and method for extracting contour line and storage medium
JP2000207570A
