Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method and a system for identifying cartilage in a medical image, which solve the technical problem of low suitability of the existing identification method for cartilage identification.
The cartilage identification method in the medical image comprises the following steps:
preprocessing the gray level image to obtain a corresponding gradient image;
generating a first edge identification and a second edge identification to form an exact tissue outline according to the respectively formed first edge identification and second edge identification in the gradient image;
and forming a three-dimensional contour of the cartilage tissue according to the change trend among the tissue contours.
In an embodiment of the present invention, the preprocessing the grayscale image to obtain a corresponding gradient image includes:
carrying out smoothing treatment on the gray level image to form a smooth image;
acquiring the gradient of each pixel in the smooth image to form a gradient image;
cartilage reference points are manually marked in the grayscale image.
In an embodiment of the present invention, the forming of the exact tissue contour according to the first edge recognition and the second edge recognition in the gradient image includes:
determining potential edge pixels in the gradient image according to magnitude comparison of pixels and pixel neighborhoods in a gradient direction;
determining a base edge pixel by non-maxima suppression of the potential edge pixels;
performing noise identification on the basic edge pixels to form a first edge pixel image, and finishing the first edge identification;
determining each pixel category in the gradient image through a random forest classification model to form a second edge pixel image and finish second edge identification;
determining edge pixels by overlapping the second edge pixel image and the first edge pixel image, and overlapping the edge pixels to the gray level image to determine a tissue contour.
In an embodiment of the present invention, the forming of the three-dimensional contour of the cartilage tissue according to the variation trend between the tissue contours includes:
establishing relative position characteristics among tissue outlines in each gray level image;
forming a fitting coefficient of the cartilage tissue contour between the adjacent gray level images according to the variation trend of the relative position features between the tissue contours of the adjacent gray level images;
and combining the tissue contour in the gray-scale image and the fitting coefficient to form a three-dimensional contour of the cartilage tissue.
The embodiment of the invention provides a cartilage identification system in medical images, which comprises:
the memory is used for storing program codes corresponding to the processing procedures of the cartilage identification method in the medical image;
a processor for executing the program code.
The embodiment of the invention provides a cartilage identification system in medical images, which comprises:
the smooth forming module is used for preprocessing the gray level image to obtain a corresponding gradient image;
a gradient formation module for forming an exact tissue contour within the gradient image from a first edge identification and a second edge identification;
and the artificial identification module is used for forming a three-dimensional contour of the cartilage tissue according to the change trend among the tissue contours.
The cartilage identification method and the separation system in the medical image of the embodiment of the invention utilize the automatic processing and classification of the mutation edge formation of the single quantitative information, so that the accuracy of tissue edge identification is improved. The method utilizes different contour generation methods to check and avoid overfitting, so that the cartilage tissue can realize automatic main body segmentation, accurate contour positioning and automatic three-dimensional modeling in the gray level image, and the identification efficiency of professional human identification resources is effectively improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and more obvious, the present invention is further described below with reference to the accompanying drawings and the detailed description. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a method for identifying cartilage in a medical image according to an embodiment of the present invention. In fig. 1, an embodiment of the present invention includes:
step 100: and preprocessing the gray level image to obtain a corresponding gradient image.
The preprocessing may obtain quantization of a single kind of information in the grayscale image, for example, the present embodiment obtains quantization of pixel luminance information. The gradient image is composed of a brightness gradient, including direction and magnitude, for each gray pixel in the gray image. The interference of the color tone can be effectively eliminated by using the quantization change of the single brightness information.
Step 200: the exact tissue contour is generated within the gradient image from the first and second edge identifications formed separately.
The first edge identification and the second edge identification can form a mutual verification identification relation and an identification process ensures the identification precision of the tissue outline.
Step 300: and forming a three-dimensional contour of the cartilage tissue according to the variation trend among the tissue contours.
As can be understood by those skilled in the art, in the existing three-dimensional modeling process, a three-dimensional contour of the same object can be formed according to the number of parallel sections and the contour of the object in the sections, and the smoothness and the precision of the three-dimensional contour can be improved by quantifying the change trend of the associated object in different sections.
The cartilage identification method in the medical image provided by the embodiment of the invention utilizes the automatic processing and classification of the mutation edge formation of single quantitative information, so that the accuracy of tissue edge identification is improved. The method utilizes different contour generation methods to check and avoid overfitting, so that the cartilage tissue can realize automatic main body segmentation, accurate contour positioning and automatic three-dimensional modeling in the gray level image, and the identification efficiency of professional human identification resources is effectively improved.
Fig. 2 shows preprocessing in the method for identifying cartilage in medical image according to an embodiment of the present invention. In fig. 2, an embodiment of the present invention includes:
step 110: and smoothing the gray level image to form a smooth image.
The smooth processing can eliminate the sudden change amplitude of the single type information of the pixels in the gray level image, and avoid the peak value formed by interference from being mistakenly identified as an extreme value or a change inflection point. In one embodiment of the present invention, a gaussian filter is used to smooth an image, and the main process includes:
and applying Gaussian filtering to smooth the image. The output result of the smoothing process is obtained by convolution of the gray-scale image pixels with a two-dimensional gaussian function:
I(x,y)=f(x,y)*g(x,y)
where f (x, y) is the input pixel, g (x, y) is a two-dimensional gaussian function, and I (x, y) is the smoothed pixel. The expression of g (x, y) is
Wherein sigma is a distribution parameter of a Gaussian function, and the smoothing degree is controlled. As σ increases, the accuracy of edge location decreases and the signal-to-noise ratio increases, i.e., the larger σ, the smoother the image.
Step 120: and acquiring the gradient of each pixel in the smoothed image to form a gradient image.
Quantizing the single type of information includes the magnitude and direction of the constituent vectors. Taking the brightness as an example, obtaining the gradient of each pixel in the smoothed image includes:
the derivatives in the x and y directions of the smoothed image are:
on the basis of calculating the partial derivative of the smoothed image pixel I' (x, y), the magnitude and direction of the pixel gradient are obtained:
where M (x, y) is the gradient magnitude and θ (x, y) is the angle between the M (x, y) vector and the x coordinate axis.
Step 130: cartilage reference points are manually marked in the grayscale image.
The cartilage reference point is a random position within the range of the cartilage image in the gray scale image of the artificial marker. The cartilage reference points correspond to the general locations of the gray scale image, the gradient image and the smooth image.
The cartilage identification method in the medical image of the embodiment of the invention has the advantages that the processing processes of smoothing processing and extracting single type information effectively inhibit the influence of interference and noise interference formed by redundant information types in the original image, and avoid the difficulty and processing load of data processing.
Fig. 3 shows two identification steps in the cartilage identification method in the medical image according to an embodiment of the present invention. In fig. 3, an embodiment of the present invention includes:
step 210: potential edge pixels are determined in the gradient image from a comparison of the magnitude of the pixel and the neighborhood of pixels in the gradient direction.
In this embodiment, the brightness information is used for comparison, and edge pixels with abrupt brightness change are extracted according to the brightness gradient to serve as potential edge pixels.
Step 220: non-maxima suppression of the potential edge pixels determines the base edge pixels.
The potential edge pixel is a pixel with vector mutation in the gradient image, and is obtained in the gradient image by adopting a non-maximum suppression method as edge information according to an amplitude comparison mode of the pixel and a pixel neighborhood in the gradient direction, wherein the potential edge pixel mainly comprises the following steps:
testing a 3 multiplied by 3 neighborhood of each potential pixel in the gradient direction, and comparing the gradient amplitude of the potential pixel in the center with that of the adjacent pixels;
if the potential pixel in the center has the largest gradient magnitude, it is considered as the base edge pixel, otherwise it is excluded as the background pixel.
Step 230: and carrying out noise identification on the basic edge pixels to form a first edge pixel image, and finishing the first edge identification.
The basic edge pixels are detected by a double threshold method to exclude noise pixels, and the connectivity of the proximity pixels is judged according to the formed extensibility of the determination pixels. Performing noise identification includes:
detecting a determined pixel, an interference pixel and an undetermined pixel by using a dual-threshold method;
lagged binarization is used to connect the determined pixels and the undetermined pixels.
In particular, if the gradient magnitude of at least one pixel is greater than or equal to the high threshold ThThe gradient amplitudes of the other pixels are less than the low threshold TlThen, the final edge result is determined. The calculation formula is as follows:
wherein, L (x, y) is the pixel value in the non-maximum suppression map, L' (x, y) is the pixel value in the final edge detection result map, ThIs a high threshold, TlFor a low threshold, s may be 0 or 1, which represents the adjacent condition of the pixel point and the edge pixel, and when the pixel point and the edge pixel are not adjacent, 0 is taken, and the adjacent is 1.
Step 240: and determining each pixel category in the gradient image through a random forest classification model to form a second edge pixel image and finish secondary edge identification.
The random forest classification model is from a random forest classification model formed by training of a brightness training set. The middle node of each decision tree in a general random forest classification model is used as a classifier, and the probability distribution p (c) of each category exists in leaf nodes under the characteristic judgment conditions and judgment thresholds such as brightness, gray characteristic, information carrying characteristic, inter-pixel negative correlation characteristic or inter-pixel positive correlation characteristicj|v,leaf(treet) The category attribution of the single pixel v can be judged according to the probability distribution. The result of all the T decision trees is integrated to be the final judgment result of a single pixel v.
The probability distribution of the leaf node where the single pixel v is located in each decision tree is generally integrated by using an average voting method. Its mathematical expression can be written as follows:
the probability distributions of the T leaf nodes are obtained and synthesized by the single pixel through the T decision trees, and then the class with the highest probability is the final result of the single pixel v. And after all pixels in the image to be detected are classified by the random forest, the image segmentation task is completed.
Step 250: and determining edge pixels by overlapping the second edge pixel image and the first edge pixel image, and overlapping the edge pixels to the gray level image to determine the tissue outline.
The second edge pixel image and the first edge pixel image are overlapped to form the differential verification of the edge pixels. And (4) overlapping the edge pixels determined after the differential verification to form a determined contour in the gray level image, and acquiring the cartilage tissue contour by combining the cartilage reference point. Or carrying out XOR operation on corresponding superposed pixels to form weighted obtaining pixels to confirm and maintain edge continuity, and carrying out OR operation to form weighted obtaining pixel verification.
The cartilage identification method in the medical image reduces the extraction range of the edge pixels by utilizing differential edge identification, and improves the influence of interference factors on the edge pixels.
The modeling in the cartilage recognition method in the medical image according to an embodiment of the present invention is shown in fig. 5. In fig. 5, an embodiment of the present invention includes:
step 310: and establishing relative position characteristics between the tissue outlines in each gray-scale image.
And each tissue contour in the gray-scale image has a determined relative position relationship, the relative position relationship comprises each tissue determined shape, the closest position and the closest distance between each tissue contour, and the quantized relative position features are formed by vector description.
Step 320: and forming a fitting coefficient of the cartilage tissue contour between the adjacent gray level images according to the change trend of the relative position features between the tissue contours of the adjacent gray level images.
The plane outlines of the same tissues between the adjacent gray level images have similarity, the change of the same tissues between the adjacent gray level images is limited, and the detailed vector parameters of the relative change of the relative position characteristics between the adjacent gray level images can be obtained, so that the fitting coefficient of the cartilage tissue outline between the adjacent gray level images is formed.
Step 330: and combining the tissue contour in the gray level image and the fitting coefficient to form a three-dimensional contour of each cartilage tissue.
And forming a three-dimensional contour of the cartilage tissue by using the relative position characteristics in each gray level image and the fitting coefficients among the gray level images to finish the segmentation of the cartilage tissue.
The cartilage identification method in the medical image separates the cartilage tissue into a two-dimensional contour and a three-dimensional object, realizes segmentation automation and tissue objectification, and greatly improves the utilization efficiency of professional human resources and the observation dimension. The cartilage recognition system in medical image according to an embodiment of the present invention includes:
the memory is used for storing program codes corresponding to the processing procedures of the cartilage identification method in the medical image;
and the processor is used for executing the program codes corresponding to the processing procedures of the cartilage identification method in the medical image.
An embodiment of the present invention is shown in fig. 5. In fig. 5, an embodiment of the present invention includes:
apreprocessing device 1100, configured to preprocess the grayscale image to obtain a corresponding gradient image;
a recognition means 1200 for generating an exact tissue contour within the gradient image from the respectively formed first and second edge recognition;
themodeling device 1300 is used for forming the three-dimensional contour of the tissue according to the variation trend among the tissue contours.
As shown in fig. 5, in an embodiment of the present invention, thepreprocessing unit 1100 includes:
asmoothing forming module 1110, configured to perform smoothing processing on the grayscale image to form a smoothed image;
agradient forming module 1120, configured to obtain a gradient forming gradient image of each pixel in the smoothed image;
amanual marking module 1130 for manually marking the cartilage reference points in the gray-scale image.
As shown in fig. 5, in an embodiment of the present invention, therecognition apparatus 1200 includes:
a potentialpixel determination module 1210 for determining a potential edge pixel in the gradient image based on a comparison of magnitudes of the pixel and a neighborhood of pixels in the gradient direction;
a basepixel determination module 1220 for non-maxima suppression of potential edge pixels to determine base edge pixels;
a first edge determining module 1230, configured to perform noise identification on the basic edge pixels to form a first edge pixel image, so as to complete first edge identification;
the secondedge determining module 1240 is configured to determine each pixel category in the gradient image through the random forest classification model to form a second edge pixel image, and complete second edge identification;
an edgeoverlay determining module 1250 configured to determine an edge pixel by overlaying the second edge pixel image and the first edge pixel image, and overlay the edge pixel to the gray scale image to determine the tissue contour.
As shown in fig. 5, in an embodiment of the present invention, themodeling apparatus 1300 includes:
a positionfeature forming module 1310 for establishing relative position features between tissue contours in each gray scale image;
a fittingcoefficient forming module 1320, configured to form a fitting coefficient of the cartilage tissue contour between adjacent grayscale images according to a variation trend of the relative position features between tissue contours of adjacent grayscale images;
aconstructing module 1330 for combining the tissue contour in the gray-scale image and the fitting coefficients to form a stereo contour of each cartilage tissue.
The processor may be a dsp (digital Signal processing) digital Signal processor, an FPGA (Field-Programmable Gate Array), an mcu (microcontroller unit) system board, an soc (system on a chip) system board, or a plc (Programmable Logic controller) minimum system including I/O.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.