CN117745751A - Pulmonary tuberculosis CT image segmentation method based on feature extraction - Google Patents

Pulmonary tuberculosis CT image segmentation method based on feature extraction Download PDF

Info

Publication number
CN117745751A
CN117745751A CN202410190595.5A CN202410190595A CN117745751A CN 117745751 A CN117745751 A CN 117745751A CN 202410190595 A CN202410190595 A CN 202410190595A CN 117745751 A CN117745751 A CN 117745751A
Authority
CN
China
Prior art keywords
image
pixel point
pixel
artifact
pulmonary tuberculosis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410190595.5A
Other languages
Chinese (zh)
Other versions
CN117745751B (en
Inventor
孟萌
李鹏
张燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
8th Medical Center of PLA General Hospital
Original Assignee
8th Medical Center of PLA General Hospital
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 8th Medical Center of PLA General Hospital filed Critical 8th Medical Center of PLA General Hospital
Priority to CN202410190595.5A priority Critical patent/CN117745751B/en
Publication of CN117745751A publication Critical patent/CN117745751A/en
Application granted granted Critical
Publication of CN117745751B publication Critical patent/CN117745751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the technical field of image enhancement, in particular to a pulmonary tuberculosis CT image segmentation method based on feature extraction, which comprises the following steps: acquiring a pulmonary tuberculosis CT image, and analyzing and processing the gray level confusion degree of a preset neighborhood corresponding to each pixel point in the pulmonary tuberculosis CT image; performing focus edge shape rule analysis processing on each pixel point; carrying out density change continuity analysis processing on each pixel point in a preset number of preset directions; screening pseudo-image pixels from the tuberculosis CT image; according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to each pseudo-image pixel in the tuberculosis CT image, enhancing each pseudo-image pixel to obtain a target enhanced image; and dividing the target enhanced image to obtain a target area. According to the invention, by adaptively enhancing each pseudo-image pixel point, the enhancement effect of the tuberculosis CT image and the accuracy of the segmentation of the tuberculosis CT image are improved.

Description

Pulmonary tuberculosis CT image segmentation method based on feature extraction
Technical Field
The invention relates to the technical field of image enhancement, in particular to a pulmonary tuberculosis CT image segmentation method based on feature extraction.
Background
The CT image may have artifacts due to various factors in the imaging process, and because the artifacts are often similar to the edges of the pulmonary tuberculosis focus, for example, both the artifacts are relatively blurred, the artifacts often have a larger influence on the segmentation of the CT image, for example, partial artifact pixel points may be misjudged as pixel points on the edges of the pulmonary tuberculosis focus, so that the image needs to be enhanced to reduce the influence caused by the artifacts during the segmentation of the CT image. At present, when an image is enhanced, the following methods are generally adopted: and carrying out histogram equalization on the image according to the gray level histogram of the image to obtain an enhanced image.
However, when performing histogram equalization on a tuberculosis CT image according to a gray level histogram of the tuberculosis CT image to realize image enhancement, there are often the following technical problems:
because the gray histogram equalization is usually to perform statistical integral image enhancement according to the gray value distribution of the image, when the histogram equalization is performed on the pulmonary tuberculosis CT image directly according to the gray histogram of the pulmonary tuberculosis CT image, the detail information of pulmonary tuberculosis focus with fewer pixels is possibly lost, so that the effect of enhancing the pulmonary tuberculosis CT image is poor, and the accuracy of dividing the pulmonary tuberculosis CT image is poor.
Disclosure of Invention
In order to solve the technical problem of poor accuracy of pulmonary tuberculosis CT image segmentation caused by poor enhancement effect on pulmonary tuberculosis CT images, the invention provides a pulmonary tuberculosis CT image segmentation method based on feature extraction.
The invention provides a pulmonary tuberculosis CT image segmentation method based on feature extraction, which comprises the following steps:
acquiring a pulmonary tuberculosis CT image, and carrying out gray level confusion degree analysis processing on a preset neighborhood corresponding to each pixel point in the pulmonary tuberculosis CT image to obtain gray level confusion degree corresponding to each pixel point;
according to the gray level confusion degree corresponding to each pixel point, performing focus edge shape rule analysis processing on each pixel point to obtain focus edge factors corresponding to each pixel point;
carrying out density change continuity analysis processing on each pixel point in a preset number of preset directions to obtain a density continuous factor corresponding to each pixel point;
screening pseudo-image pixels from the tuberculosis CT image according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to the pixels;
according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to each pseudo-image pixel in the tuberculosis CT image, enhancing each pseudo-image pixel to obtain a target enhanced image;
And dividing the target enhanced image to obtain a target region.
Optionally, the formula corresponding to the gray level confusion degree corresponding to the pixel point is:
wherein,is the +.o in CT image of pulmonary tuberculosis>The gray level confusion degree corresponding to each pixel point; />Is the serial number of the pixel point in the tuberculosis CT image; />Is the +.o in CT image of pulmonary tuberculosis>The first degree of confusion corresponding to the pixel points;/>is the +.o in CT image of pulmonary tuberculosis>The second degree of confusion corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>A third degree of confusion corresponding to the individual pixel points; />Is the maximum gray value in the CT image of pulmonary tuberculosis; />Is the smallest gray value in the CT image of pulmonary tuberculosis; />Is thatAnd->Gray values in between; />Is the +.o in CT image of pulmonary tuberculosis>The number of the pixel points in the preset neighborhood corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>In the preset neighborhood corresponding to each pixel point, the gray value is equal to +.>The number of pixels of (a);is 2 as a base->Logarithm of (2); />Is the +.o in CT image of pulmonary tuberculosis>The serial numbers of the pixel points in the preset neighborhood corresponding to the pixel points; />Taking an absolute value function; />Is the +.o in CT image of pulmonary tuberculosis>Gray values corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis >The first part of the preset adjacent area corresponding to each pixel point>Gray values corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>Maximum value in gray values corresponding to all pixel points in a preset neighborhood corresponding to each pixel point; />Is the +.o in CT image of pulmonary tuberculosis>And the minimum value in the gray values corresponding to all the pixel points in the preset neighborhood corresponding to each pixel point.
Optionally, according to the gray level confusion degree corresponding to each pixel, performing focus edge shape rule analysis processing on each pixel to obtain a focus edge factor corresponding to each pixel, including:
when the gray level confusion degree corresponding to the pixel points is smaller than or equal to a preset confusion threshold value, determining a constant 0 as a focus edge factor corresponding to the pixel points;
when the gray level confusion degree corresponding to the pixel points is larger than a preset confusion threshold value, determining the pixel points as reference pixel points;
and carrying out connected domain division on the areas where all the reference pixel points are located, and determining focus edge factors corresponding to each reference pixel point according to the connected domain to which each reference pixel point belongs.
Optionally, a formula corresponding to a focus edge factor corresponding to the reference pixel point in the tuberculosis CT image is:
wherein,is the +.o in CT image of pulmonary tuberculosis >Focus edge factors corresponding to the reference pixel points; />Is the serial number of a reference pixel point in a tuberculosis CT image; />Is a normalization function; />Is the +.o in CT image of pulmonary tuberculosis>All pixel points and the +.>Variance of distances between centers of connected domains to which the reference pixel points belong; />Is a factor greater than 0 set in advance; />Is the +.o in CT image of pulmonary tuberculosis>The number of the pixel points in the connected domain to which the reference pixel points belong; />Is the +.o in CT image of pulmonary tuberculosis>Serial numbers of pixel points in the connected domain to which the reference pixel points belong; />Is the +.o in CT image of pulmonary tuberculosis>All pixel points and the +.>Maximum value in the distance between the centers of the connected domains to which the reference pixel points belong; />Is the +.o in CT image of pulmonary tuberculosis>The communication domain to which the reference pixel points belong is +.>Pixel dot and->The distance between the centers of the connected domains to which the reference pixel points belong.
Optionally, the performing the density change continuity analysis processing on each pixel point in a preset number of preset directions to obtain a density continuous factor corresponding to each pixel point includes:
determining any pixel point in a tuberculosis CT image as a marked pixel point, and screening out a preset number of pixel points nearest to the marked pixel point from each preset direction of the marked pixel point to form a pixel point sequence of the marked pixel point in each preset direction;
And determining a density continuous factor corresponding to the marked pixel points according to the pixel point sequences of the marked pixel points in the preset number of preset directions.
Optionally, the formula corresponding to the density continuous factor corresponding to the pixel point is:
wherein,is the +.o in CT image of pulmonary tuberculosis>Density continuous factors corresponding to the pixel points; />Is the serial number of the pixel point in the tuberculosis CT image; />Is a normalization function; />Is the +.o in CT image of pulmonary tuberculosis>First continuous factors corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>A second continuous factor corresponding to each pixel point; />And->Is a factor greater than 0 set in advance; />Is the +.o in CT image of pulmonary tuberculosis>The pixel point is at the +.>The number of pixels in the pixel sequence in the preset direction; />Is a preset number; />Is a serial number of a preset direction; />Is->The pixel point is at the +.>Sequence numbers of pixels in the pixel sequence in the preset direction; />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the firstFirst-order gray scale differences corresponding to the pixel points; />Taking an absolute value function; />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>Gray values corresponding to the pixel points; / >Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>Gray values corresponding to the pixel points; />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>The first-order gray scale difference corresponding to each pixel point.
Optionally, the screening the pseudo-image pixels from the tuberculosis CT image according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to the pixels includes:
according to the gray level confusion degree corresponding to each pixel point, determining a non-pseudo non-disease possible factor corresponding to each pixel point, wherein the gray level confusion degree is in negative correlation with the non-pseudo non-disease possible factor;
according to the focus edge factors and the non-pseudo non-disease possible factors corresponding to each pixel point, determining the non-pseudo focus possible factors corresponding to each pixel point, wherein the non-pseudo non-disease possible factors are in negative correlation with the non-pseudo focus possible factors, and the focus edge factors are in positive correlation with the non-pseudo focus possible factors;
according to the non-pseudo non-disease possible factors, the non-pseudo lesion possible factors and the density continuous factors corresponding to each pixel point, determining the pseudo-lesion possible factors corresponding to each pixel point, wherein the non-pseudo non-disease possible factors and the non-pseudo lesion possible factors are in negative correlation with the pseudo-lesion possible factors, and the density continuous factors are in positive correlation with the pseudo-lesion possible factors;
According to the non-pseudo non-disease possible factors, the non-pseudo lesion possible factors and the pseudo lesion possible factors corresponding to each pixel point, determining the pseudo non-disease possible factors corresponding to each pixel point, wherein the non-pseudo non-disease possible factors, the non-pseudo lesion possible factors and the pseudo lesion possible factors are in negative correlation with the pseudo non-disease possible factors;
if the corresponding non-artifact non-disease possible factor, non-artifact focus possible factor, artifact focus possible factor and the largest factor in the artifact non-disease possible factor is the artifact focus possible factor, determining the pixel point as an artifact focus pixel point;
if the corresponding non-artifact non-disease possible factor, non-artifact focus possible factor, artifact focus possible factor and the largest factor in the artifact non-disease possible factor is the artifact non-disease possible factor, determining the pixel point as an artifact non-disease pixel point;
and marking the artifact focus pixel point and the artifact non-disease pixel point as artifact pixel points.
Optionally, the enhancing the pseudo-image pixels according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to the pseudo-image pixels in the pulmonary tuberculosis CT image to obtain the target enhanced image includes:
Determining target weights corresponding to all pixel points in a preset filtering window corresponding to each artifact pixel point according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to each artifact pixel point in the pulmonary tuberculosis CT image;
and carrying out filtering processing on each artifact pixel point according to the target weight corresponding to all pixel points in a preset filtering window corresponding to each artifact pixel point in the tuberculosis CT image to obtain a target enhanced image.
Optionally, the determining the target weight corresponding to all the pixels in the preset filtering window corresponding to each artifact pixel according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to each artifact pixel in the tuberculosis CT image includes:
determining a target weight corresponding to each pixel point in a preset filter window corresponding to the artifact focus pixel point according to a non-artifact focus possible factor corresponding to each pixel point in the preset filter window corresponding to the artifact focus pixel point;
and determining the target weight corresponding to each pixel point in the preset filter window corresponding to the artifact non-disease pixel point according to the non-artifact non-disease possible factor corresponding to each pixel point in the preset filter window corresponding to the artifact non-disease pixel point.
Optionally, the segmenting the target enhanced image to obtain a target area includes:
and performing threshold segmentation on the target enhanced image by using an Ojin method to obtain a target region.
The invention has the following beneficial effects:
according to the method for segmenting the pulmonary tuberculosis CT image based on feature extraction, provided by the invention, by adaptively enhancing each pseudo-image pixel point, the technical problem of poor accuracy of pulmonary tuberculosis CT image segmentation caused by poor enhancement effect of the pulmonary tuberculosis CT image is solved, and the enhancement effect of the pulmonary tuberculosis CT image and the accuracy of pulmonary tuberculosis CT image segmentation are improved. First, since the artifact region and the edge of the lung focus tend to be blurred, the gray scale around the pixel on the edge of the artifact region and the lung focus tend to be relatively disordered, and thus the greater the degree of disordered gray scale corresponding to the quantized pixel, the more likely the pixel is to be an artifact region or a pixel on the edge of the lung focus. Then, the shape of the focus edge is often approximate to a ring shape, and the artifact area is relatively irregular, so that focus edge shape rule analysis processing is carried out on each pixel point, and the larger focus edge factor corresponding to each quantized pixel point is, the more likely the pixel point is to be a pixel point on the edge of the pulmonary tuberculosis focus, and the more favorable is for distinguishing the artifact area from the edge of the pulmonary tuberculosis focus. Then, since the artifact area is often different from the density change at the lesion, for example, the lesion will often affect the normal structure and shape of the lung tissue, often resulting in some degree of compression or destruction of the surrounding lung tissue, the tissue at the edge of the lesion will often form a thick to thin morphology, exhibiting a smooth continuous density change. The artifact area is in an irregular, broken or forked form, the density change in the area is discontinuous, and obvious boundaries or breaks are formed, so that the density change continuity analysis processing is carried out on each pixel point in a preset number of preset directions, and the greater the density continuity factor corresponding to each quantized pixel point is, the more likely the pixel point is to be a pixel point on a pulmonary tuberculosis lesion. Then, because the gray level confusion degree, focus edge factor and density continuous factor corresponding to the pixel point are all related to the distinction of the pseudo-image pixel points, the pseudo-image pixel points can be screened from the pulmonary tuberculosis CT image based on the gray level confusion degree, focus edge factor and density continuous factor corresponding to the pixel point. And then, based on the gray level confusion degree, focus edge factors and density continuous factors corresponding to each artifact pixel point in the tuberculosis CT image, each artifact pixel point is enhanced, so that the self-adaptive enhancement of the artifact pixel points can be realized, and compared with the direct histogram equalization of the tuberculosis CT image, the method only enhances the screened artifact pixel points, can improve the definition of an artifact region on the basis of retaining detailed information such as the edge blurring characteristics of the tuberculosis focus, so as to weaken the blurring characteristics close to the edge of the tuberculosis focus in the artifact region, and can facilitate the subsequent distinction of the artifact region and the edge of the tuberculosis focus, thereby improving the enhancement effect of the tuberculosis CT image and further improving the segmentation accuracy of the tuberculosis CT image. Finally, the target enhanced image is segmented, so that CT image segmentation is realized.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for segmenting a CT image of tuberculosis based on feature extraction according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description is given below of the specific implementation, structure, features and effects of the technical solution according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
An embodiment of a method for segmenting a tuberculosis CT image based on feature extraction:
referring to fig. 1, a flow of some embodiments of a feature extraction-based method for segmenting a CT image of tuberculosis is shown in accordance with the present invention. The pulmonary tuberculosis CT image segmentation method based on feature extraction comprises the following steps:
step S1, acquiring a tuberculosis CT image, and carrying out gray level confusion degree analysis processing on a preset neighborhood corresponding to each pixel point in the tuberculosis CT image to obtain the gray level confusion degree corresponding to each pixel point.
The tuberculosis CT image may be a CT (Computed Tomography, electronic computer tomography) image taken when tuberculosis detection is performed. For example, the tuberculosis CT image may be a CT image of the lung. The preset neighborhood may be a preset neighborhood. For example, the preset neighborhood may be a 5×5 neighborhood.
Since the artifact region and the edge of the lung focus are often blurred, the gray scale around the pixel on the edge of the lung focus is often relatively disordered, and the greater the degree of disordered gray scale corresponding to the quantized pixel, the more likely the pixel is to be the artifact region or the edge of the lung focus. Therefore, the gray level confusion degree corresponding to the pixel points can facilitate the subsequent extraction of the pixel points on the artifact area and the edge of the pulmonary tuberculosis focus, so that the artifact area and the edge of the pulmonary tuberculosis focus can be accurately distinguished, and the artifact area can be adaptively enhanced. Wherein the artifact may be, but is not limited to: overlay artifacts, scatter artifacts, and motion artifacts. Unless specifically stated, the border of the lung focus in embodiments of the present invention is not a curve, but rather refers to a relatively blurry, approximately circular region that flares outward at the border of the lung focus.
As an example, this step may include the steps of:
first, a CT image of tuberculosis is acquired.
For example, a CT image of the lung of a patient may be acquired by using a CT apparatus, and since the pulmonary tuberculosis lesion is located in the lung of the patient, in order to facilitate the doctor's observation of the pulmonary tuberculosis lesion and avoid other irrelevant areas from affecting the subsequent detection effect, a part belonging to the lung may be extracted by using a semantic segmentation technique, and an image block formed by the extracted lung area may be recorded as a pulmonary tuberculosis CT image that finally needs to be processed later.
Secondly, carrying out gray level confusion degree analysis processing on a preset neighborhood corresponding to each pixel point in the tuberculosis CT image to obtain gray level confusion degree corresponding to each pixel point, wherein a corresponding formula can be as follows:
wherein,is the +.o in CT image of pulmonary tuberculosis>The degree of grey scale confusion corresponding to each pixel point. />Is the serial number of the pixel point in the tuberculosis CT image. />Is the +.o in CT image of pulmonary tuberculosis>And a first degree of confusion corresponding to each pixel point. />Is in CT image of pulmonary tuberculosisFirst->And a second degree of confusion corresponding to the pixel points. />Is the +.o in CT image of pulmonary tuberculosis>And a third degree of confusion corresponding to the pixel points. / >Is the maximum gray value in the CT image of pulmonary tuberculosis. />Is the smallest gray value in the CT image of tuberculosis. />Is thatAnd->Gray values in between. />Is the +.o in CT image of pulmonary tuberculosis>The number of pixels in the preset neighborhood corresponding to each pixel. />Is the +.o in CT image of pulmonary tuberculosis>In the preset neighborhood corresponding to each pixel point, the gray value is equal to +.>Is used for the number of pixels.Is 2 as a base->Logarithmic (log). />Is the +.o in CT image of pulmonary tuberculosis>The serial numbers of the pixel points in the preset neighborhood corresponding to the pixel points. />Is a function of absolute value. />Is the +.o in CT image of pulmonary tuberculosis>Gray values corresponding to the pixel points. />Is the +.o in CT image of pulmonary tuberculosis>The first part of the preset adjacent area corresponding to each pixel point>Gray values corresponding to the pixel points. />Is the +.o in CT image of pulmonary tuberculosis>Maximum value of gray values corresponding to all pixel points in a preset neighborhood corresponding to each pixel point. />Is the +.o in CT image of pulmonary tuberculosis>And the minimum value in the gray values corresponding to all the pixel points in the preset neighborhood corresponding to each pixel point.
Since the artifact region and the edge of the lung focus tend to be blurred, the gray scale around the pixel point on the edge of the lung focus tends to be relatively more confused. When (when) The greater the case, the more +.>The larger the information amount in the preset neighborhood corresponding to each pixel point is, the description about the +.>The more disordered the gray scale in the preset neighborhood corresponding to each pixel point is, the description of the +.>The more likely a pixel is a pixel on the edge of an artifact region or a pulmonary lesion. When (when)The greater the case, the more +.>The larger the difference between the gray values corresponding to the pixel points in the preset adjacent area corresponding to the pixel points. When->The greater the case, the more +.>The larger the integral gray scale difference in the preset adjacent area corresponding to each pixel point is. Thus, when->The greater the case, the more +.>Personal imageThe larger the information amount and the whole gray scale difference in the preset adjacent area corresponding to the pixel point are relatively, and the +.>The larger the difference between the gray values corresponding to the pixel points and the corresponding pixel points in the preset adjacent area, the description of the +.>The more disordered the gray scale in the preset neighborhood corresponding to each pixel point is, the description of the +.>The more likely a pixel is a pixel on the edge of an artifact region or a pulmonary lesion.
And S2, according to the gray level confusion degree corresponding to each pixel point, performing focus edge shape rule analysis processing on each pixel point to obtain focus edge factors corresponding to each pixel point.
It should be noted that, the shape of the focus edge is often approximate to a ring, and the artifact area is relatively irregular, so that the focus edge shape rule analysis is performed on each pixel point, and the larger the focus edge factor corresponding to each quantized pixel point, the more likely the pixel point is to be a pixel point on the edge of the pulmonary tuberculosis focus, and the more favorable is for distinguishing the artifact area from the edge of the pulmonary tuberculosis focus.
As an example, this step may include the steps of:
in the first step, when the gray level confusion degree corresponding to the pixel point is smaller than or equal to a preset confusion threshold value, a constant 0 is determined as a focus edge factor corresponding to the pixel point.
The preset chaotic threshold may be a preset threshold. For example, the preset clutter threshold may be 0.75.
And secondly, when the gray level confusion degree corresponding to the pixel points is larger than a preset confusion threshold value, determining the pixel points as reference pixel points.
Thirdly, carrying out connected domain division on the areas where all the reference pixel points are located, and determining focus edge factors corresponding to each reference pixel point according to the connected domain where each reference pixel point belongs, wherein the method comprises the following substeps:
and a first sub-step, extracting a connected domain consisting of pixels with similar gray level confusion by a connected domain extraction function according to the gray level confusion degree corresponding to all the reference pixels, wherein if no special description exists, the connected domains extracted in the sub-step are all connected domains extracted in the embodiment of the invention.
The connected domain extraction function may be a connectiedcomponents function.
In the second substep, the formula corresponding to the focus edge factor corresponding to the reference pixel point in the tuberculosis CT image may be:
wherein,is the +.o in CT image of pulmonary tuberculosis>And focus edge factors corresponding to the reference pixel points. />Is the serial number of the reference pixel point in the tuberculosis CT image. />Is a normalization function. />Is the +.o in CT image of pulmonary tuberculosis>All pixel points and the +.>The variance of the distance between the centers of the connected domains to which the reference pixel points belong. The abscissa included in the coordinates corresponding to the center of the connected domain can be used for the connectionAnd (5) representing the mean value of the abscissa included in the coordinates corresponding to all the pixel points in the pass-through domain. The ordinate included in the coordinates corresponding to the center of the connected domain may be represented by the mean of the ordinate included in the coordinates corresponding to all the pixel points in the connected domain. />Is a factor greater than 0 preset, mainly for preventing denominator from being 0, such as ++>May be 0.001./>Is the +.o in CT image of pulmonary tuberculosis>The number of pixels in the connected domain to which the reference pixels belong. />Is the +.o in CT image of pulmonary tuberculosis>And the serial numbers of the pixel points in the connected domain to which the reference pixel points belong. / >Is the +.o in CT image of pulmonary tuberculosis>All pixel points and the +.>The maximum value of the distances between the centers of the connected domains to which the reference pixel points belong. />Is the +.o in CT image of pulmonary tuberculosis>The communication domain to which the reference pixel points belong is +.>Pixel dot and->The distance between the centers of the connected domains to which the reference pixel points belong.
It should be noted that, in general, the shape of the edge of the lesion tends to be approximately annular, and the artifact region is relatively irregular. And the reference pixel points are often pixel points on the edge of the artifact area or the pulmonary tuberculosis lesion. When (when)The smaller the time, the more +.>Pixel points and the +.>The closer the distances between the centers of the connected domains to which the reference pixel points belong, the more often the +.>The rule of the relative comparison of the connected domains of the reference pixel points usually indicates +.>The more likely that a reference pixel is not a pixel within the artifact region, but a pixel on the edge of the lung focus. Since the shape of the lesion edge tends to approximate a hollow annular region, and the artifact region tends to be a relatively irregular solid region, the overall distance of a pixel point on the lesion edge from its center tends to be greater than the overall distance of a pixel point within the artifact region from its center. Thus, when- >The greater the case, the more +.>Reference pixelsThe farther a pixel point in the connected domain to which the point belongs is from its center, the more often the description is +.>The more likely that a reference pixel is not a pixel within the artifact region, but a pixel on the edge of the lung focus. Therefore, when->The greater the case, the more +.>The more likely that a reference pixel is not a pixel within the artifact region, but a pixel on the edge of the lung focus.
And S3, carrying out density change continuity analysis processing on each pixel point in a preset number of preset directions to obtain a density continuity factor corresponding to each pixel point.
The preset number may be a preset number. For example, the preset number may be 4. The preset direction may be an extending direction of a preset straight line. For example, the preset direction may be, but is not limited to: horizontal, vertical, 45 ° and 135 ° directions. For example, taking a horizontal direction as an example, the horizontal direction, also referred to as a 0 ° direction, may be an extending direction of a horizontal straight line.
It should be noted that, since the density change at the artifact area and the pulmonary tuberculosis focus often differ, for example, the pulmonary tuberculosis focus often affects the normal structure and shape of the lung tissue, and often causes the surrounding lung tissue to be squeezed or destroyed to some extent, the tissue at the edge of the focus often forms a form from thick to thin, and exhibits a smooth continuous density change. The artifact area is in an irregular, broken or forked form, the density change in the area is discontinuous, and obvious boundaries or breaks are formed, so that the density change continuity analysis processing is carried out on each pixel point in a preset number of preset directions, and the greater the density continuity factor corresponding to each quantized pixel point is, the more likely the pixel point is to be a pixel point on a pulmonary tuberculosis lesion.
As an example, this step may include the steps of:
in the first step, any one pixel point in the tuberculosis CT image is determined to be a marked pixel point, and a preset number of pixel points closest to the marked pixel point are screened out from each preset direction of the marked pixel point to form a pixel point sequence of the marked pixel point in each preset direction.
Wherein the preset number may be a preset number. For example, the preset number may be 10.
For example, taking the horizontal direction as an example, a preset number of pixels closest to the marked pixel point may be screened out from the horizontal direction of the marked pixel point, and the preset number of pixels may be ordered in the left-to-right order, and the ordered sequence is used as the pixel point sequence of the marked pixel point in the horizontal direction.
And a second step of determining a density continuous factor corresponding to the marked pixel points according to the pixel point sequences of the marked pixel points in the preset number of preset directions.
For example, the formula corresponding to the density continuation factor corresponding to the pixel point may be:
wherein,is the +.o in CT image of pulmonary tuberculosis>And the density continuous factor corresponding to each pixel point. / >Is the serial number of the pixel point in the tuberculosis CT image. />Is a normalization function. />Is the +.o in CT image of pulmonary tuberculosis>And the first continuous factors correspond to the pixel points. />Is the +.o in CT image of pulmonary tuberculosis>And a second continuous factor corresponding to each pixel point. />And->Is a factor greater than 0 preset, mainly for preventing denominator from being 0, such as ++>And->May be 0.001./>Is the +.o in CT image of pulmonary tuberculosis>The pixel point is at the +.>The number of pixels in the sequence of pixels in the predetermined direction. />Is a preset number. />Is a pre-preparationA sequence number of the direction is set. />Is->The pixel point is at the +.>And the serial numbers of the pixels in the pixel sequence in the preset directions. />Is the firstThe pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>The first-order gray scale difference corresponding to each pixel point. />To take an absolute function. />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>Gray values corresponding to the pixel points. />Is->Individual pixel pointsIn->In the pixel point sequence in the preset direction, the first ∈>Gray values corresponding to the pixel points. />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>The first-order gray scale difference corresponding to each pixel point.
When the following is performedThe smaller the time, the more +.>The pixel point is at the +.>The smaller the degree of gray scale variation of the pixel points in each preset direction is. When->The smaller the time, the more +.>The pixel point is at the +.>The greater the degree of stability of the gray scale variation of the pixel in the predetermined direction, the more often the +.>The pixel point is at the +.>The more continuous the gray scale change of the pixel point in the preset direction, the more often the +.>The pixel point is at the +.>The more continuous the density variation in the respective preset direction may be. Thus, when->The greater the case, the more +.>The pixel point is at the +.>The smaller the degree of gray scale change of the pixel in the preset direction is relatively, and +.>The pixel point is at the +.>The greater the degree of stability of the gray scale variation of the pixel in the predetermined direction, the more often the +.>The pixel point is at the +.>The more continuous the gray scale change of the pixel point in the preset direction, the more often the +.>The pixel point is at the +.>The more continuous the density variation in the preset direction may be, the more often the description of the first/>The more likely the individual pixels are those on the edge of the pulmonary tuberculosis lesion.
And S4, screening out pseudo-image pixels from the tuberculosis CT image according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to the pixels.
It should be noted that, because the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to the pixel point are all related to the distinction of the pseudo-image pixel points, the pseudo-image pixel points can be screened out from the pulmonary tuberculosis CT image based on the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to the pixel point.
As an example, this step may include the steps of:
the first step, according to the gray level confusion degree corresponding to each pixel point, the non-pseudo non-disease possible factor corresponding to each pixel point is determined.
Wherein the degree of greyscale disorder may be inversely related to the non-spurious non-disease likelihood factor.
For example, the formula corresponding to the non-spurious non-disease likelihood factor corresponding to the pixel point may be:
wherein,is the +.o in CT image of pulmonary tuberculosis>And the corresponding non-pseudo non-disease possible factors of the pixel points. />Is the serial number of the pixel point in the tuberculosis CT image. />Is a normalization function. />Is the +.o in CT image of pulmonary tuberculosis>The degree of grey scale confusion corresponding to each pixel point.
When the following is performedThe greater the case, the more +.>The more disordered the gray scale in the preset neighborhood corresponding to each pixel point is, the description of the +.>The more likely a pixel is a pixel on the edge of an artifact region or a pulmonary lesion. Thus, when The greater the case, the more +.>The more likely a pixel is that pixel is on the edge of a non-pulmonary lesion within a non-artifact region. Therefore (S)>Can characterize the%>The individual pixels are probabilities of pixels on the non-pulmonary lesion edge within the non-artifact region.
And secondly, determining the non-pseudo lesion possible factors corresponding to each pixel point according to the lesion edge factors and the non-pseudo non-lesion possible factors corresponding to each pixel point.
Wherein the non-spurious non-disease likelihood factor may be inversely related to the non-spurious lesion likelihood factor. The lesion edge factor may be positively correlated with a non-spurious lesion potential factor.
For example, the formula corresponding to the non-pseudo lesion potential factor corresponding to the pixel point may be:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the +.o in CT image of pulmonary tuberculosis>Non-spurious lesion potential factors corresponding to the individual pixels. />Is the serial number of the pixel point in the tuberculosis CT image. />Is the +.o in CT image of pulmonary tuberculosis>And the corresponding non-pseudo non-disease possible factors of the pixel points. />Is a normalization function. />Is the +.o in CT image of pulmonary tuberculosis>And focal edge factors corresponding to the pixel points.
It should be noted that due toCan characterize the%>The individual pixels are probabilities of pixels on the non-pulmonary lesion edge within the non-artifact region. When- >The greater the case, the more +.>The more likely a pixel is not a pixel within the artifact region, but a pixel on the edge of the lung lesion. Therefore, when->The greater the case, the more +.>The more likely a pixel is to be on the edge of the lung focus in the non-artifact region. Thus->Can characterize the%>Probability of a pixel point on the border of the lung lesion in the non-artifact region.
And thirdly, determining the artifact focus possible factors corresponding to each pixel point according to the non-artifact non-disease possible factors, the non-artifact focus possible factors and the density continuous factors corresponding to each pixel point.
Wherein, the non-spurious non-disease potential factor and the non-spurious lesion potential factor may both be inversely related to the spurious lesion potential factor. The density continuation factor may be positively correlated with the artifact lesion probability factor.
For example, the formula corresponding to the artifact focus possible factor corresponding to the pixel point may be:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the +.o in CT image of pulmonary tuberculosis>The artifact focus corresponding to each pixel may be a factor. />Is the serial number of the pixel point in the tuberculosis CT image. />Is the +.o in CT image of pulmonary tuberculosis>And the corresponding non-pseudo non-disease possible factors of the pixel points. />Is the +.o in CT image of pulmonary tuberculosis >Non-spurious lesion potential factors corresponding to the individual pixels. />Is a normalization function. />Is the +.o in CT image of pulmonary tuberculosis>And the density continuous factor corresponding to each pixel point.
In general, since the artifacts are randomly distributed, there may be artifacts at the edge of the lung focus, and thus there may be pixel points at the edge of the lung focus in the artifact region. Due toCan characterize the%>The individual pixels are probabilities of pixels on the non-pulmonary lesion edge within the non-artifact region. />Can characterize the%>Probability of a pixel point on the border of the lung lesion in the non-artifact region. When->The greater the case, the more +.>The pixel point is at the +.>The more continuous the density variation in the preset direction may be, often indicating +.>The more likely the individual pixels are those on the edge of the pulmonary tuberculosis lesion. Thus, when->The greater the case, the more +.>The more likely the individual pixels are pixels on the edge of the lung focus in the artifact region. Therefore (S)>Can characterize the%>The individual pixels are the probability of the pixel being on the edge of the lung focus in the artifact region.
And fourthly, determining the artifact non-disease possible factors corresponding to each pixel point according to the non-artifact non-disease possible factors, the non-artifact focus possible factors and the artifact focus possible factors corresponding to each pixel point.
Wherein the non-artifact non-disease likelihood factor, the non-artifact lesion likelihood factor, and the artifact lesion likelihood factor may all be inversely related to the artifact non-disease likelihood factor.
For example, the formula corresponding to the artifact non-disease possible factor corresponding to the pixel point may be:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the +.o in CT image of pulmonary tuberculosis>And artifact non-disease possible factors corresponding to the pixel points. />Is the serial number of the pixel point in the tuberculosis CT image. />Is the +.o in CT image of pulmonary tuberculosis>The artifact focus corresponding to each pixel may be a factor. />Is the +.o in CT image of pulmonary tuberculosis>Non-spurious lesion potential factors corresponding to the individual pixels.Is the +.o in CT image of pulmonary tuberculosis>And the corresponding non-pseudo non-disease possible factors of the pixel points.
It should be noted that due toCan characterize the%>The individual pixels are probabilities of pixels on the non-pulmonary lesion edge within the non-artifact region. />Can characterize the%>Individual pixels within a non-artifact regionProbability of pixels on the border of the pulmonary tuberculosis lesion. />Can characterize the%>The individual pixels are the probability of the pixel being on the edge of the lung focus in the artifact region. Thus, the first and second substrates are bonded together,can characterize the%>The individual pixels are the probability of non-pulmonary lesion edges in the artifact region.
Fifthly, if the corresponding non-artifact non-disease possible factor, non-artifact focus possible factor, artifact focus possible factor and the largest factor of the artifact non-disease possible factors is the artifact focus possible factor, the pixel point is determined to be the artifact focus pixel point.
And sixthly, if the corresponding non-artifact non-disease possible factor, non-artifact focus possible factor, the largest factor of the artifact focus possible factor and the artifact non-disease possible factor is the artifact non-disease possible factor, determining the pixel point as an artifact non-disease pixel point.
And seventh, marking the artifact focus pixel point and the artifact non-disease pixel point as artifact pixel points.
And S5, reinforcing each pseudo-image pixel point according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to each pseudo-image pixel point in the tuberculosis CT image to obtain a target reinforced image.
It should be noted that, based on the gray level confusion degree, focus edge factor and density continuous factor corresponding to each pseudo-image pixel in the pulmonary tuberculosis CT image, each pseudo-image pixel is enhanced, so as to realize self-adaptive enhancement of the pseudo-image pixel.
As an example, this step may include the steps of:
first, determining target weights corresponding to all pixel points in a preset filtering window corresponding to each artifact pixel point according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to each artifact pixel point in the tuberculosis CT image.
The preset filtering window may be a preset window for filtering processing. For example, the preset filter window may be a 5×5 window.
For example, since the artifact pixels are artifact focus pixels or artifact non-disease pixels, determining the target weight for each pixel within the preset filter window for each artifact pixel may include the sub-steps of:
the first substep, determining a target weight corresponding to each pixel point in a preset filter window corresponding to the artifact focus pixel point according to a non-artifact focus possible factor corresponding to each pixel point in the preset filter window corresponding to the artifact focus pixel point.
For example, if the first CT image of pulmonary tuberculosisThe maximum factors among the non-artifact non-disease possible factors, the non-artifact focus possible factors, the artifact focus possible factors and the artifact non-disease possible factors corresponding to the pixel points are the artifact focus possible factors corresponding to the pixel pointsThen->The pixel points are artifact focus pixel points, and a formula corresponding to the target weight corresponding to the pixel points in the corresponding preset filter window can be:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the +.o in CT image of pulmonary tuberculosis>Corresponding to each pixel pointIs +. >Target weights corresponding to the pixel points. />Is the serial number of the pixel point in the tuberculosis CT image. />The sequence numbers of the pixel points in the preset filter window are set. />Is the number of pixels within the preset filter window. />Is the +.o in CT image of pulmonary tuberculosis>Within a preset filtering window corresponding to each pixel point, the first ∈>Non-spurious lesion potential factors corresponding to the individual pixels. />Is the +.o in CT image of pulmonary tuberculosis>And in a preset filtering window corresponding to each pixel point, the accumulated values of non-pseudo lesion possible factors corresponding to all the pixel points.
Note that, when the first image of tuberculosis CT isThe maximum factor among the non-artifact non-disease possible factors, the non-artifact focus possible factors, the artifact focus possible factors and the artifact non-disease possible factors corresponding to the pixel points is the artifact focus possible factor +.>When it is intended to specify->The more likely the individual pixels are pixels on the border of the pulmonary tuberculosis lesion in the artifact area, at this point the +.>When filtering is performed on each pixel point, a larger weight is often required to be given to the pixel point on the edge of the pulmonary tuberculosis lesion in a preset filtering window. Due to->Can characterize the%>Within a preset filtering window corresponding to each pixel point, the first ∈>Probability of a pixel point on the border of the lung lesion in the non-artifact region. Thus (S) >Can characterize the participation of pixel points in a preset filtering window in the first +.>Weights at the time of filtering the individual pixels.
And a second sub-step of determining a target weight corresponding to each pixel point in the preset filter window corresponding to the artifact non-disease pixel point according to the non-artifact non-disease possible factor corresponding to each pixel point in the preset filter window corresponding to the artifact non-disease pixel point.
For example, if the first CT image of pulmonary tuberculosisThe maximum factor among the non-artifact non-disease possible factors, the non-artifact lesion possible factors, the artifact lesion possible factors and the artifact non-disease possible factors corresponding to the pixel points is the artifact non-disease possible factor +.>Then->The pixel points are artifact non-disease pixel points, and a formula corresponding to the target weight corresponding to the pixel points in the corresponding preset filter window can be:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the +.o in CT image of pulmonary tuberculosis>The first +.>Target weights corresponding to the pixel points. />Is the serial number of the pixel point in the tuberculosis CT image. />The sequence numbers of the pixel points in the preset filter window are set. />Is the number of pixels within the preset filter window. />Is the +.o in CT image of pulmonary tuberculosis>Within a preset filtering window corresponding to each pixel point, the first ∈ >And the corresponding non-pseudo non-disease possible factors of the pixel points. />Is the +.o in CT image of pulmonary tuberculosis>And within a preset filtering window corresponding to each pixel point, the accumulated values of the non-pseudo non-disease possible factors corresponding to all the pixel points.
Note that, when the first image of tuberculosis CT isThe maximum factor among the non-artifact non-disease possible factors, the non-artifact lesion possible factors, the artifact lesion possible factors and the artifact non-disease possible factors corresponding to the pixel points is the artifact non-disease possible factor +.>When it is intended to specify->The more likely the individual pixels are pixels on the edge of the non-pulmonary lesion in the artifact region, at this point the +.>When filtering is performed on each pixel point, a larger weight is often required to be given to the pixel point on the edge of the non-pulmonary tuberculosis lesion in a preset filtering window. Due to->Can characterize the%>Within a preset filtering window corresponding to each pixel point, the first ∈>The individual pixels are probabilities of pixels on the non-pulmonary lesion edge within the non-artifact region. Thus (S)>Can characterize the participation of pixel points in a preset filtering window in the first +.>Weights at the time of filtering the individual pixels.
And secondly, carrying out filtering processing on each artifact pixel point according to the target weight corresponding to all pixel points in a preset filtering window corresponding to each artifact pixel point in the tuberculosis CT image to obtain a target enhanced image.
For example, first, the product of the gray value corresponding to each pixel point in the preset filter window and the target weight may be determined as the gray component index corresponding to each pixel point in the preset filter window. And then, determining the accumulated value of the gray component indexes corresponding to all pixels in the preset filter window corresponding to each pseudo image pixel point as the enhanced gray index corresponding to each pseudo image pixel point. And finally, updating the gray value corresponding to each pseudo image pixel point in the tuberculosis CT image to the corresponding enhancement gray index, and taking the updated tuberculosis CT image as a target enhancement image.
And S6, dividing the target enhanced image to obtain a target area.
As an example, the target enhanced image may be subjected to threshold segmentation by the oxford method, and the segmented foreground region may be used as the target region. Where the foreground region is often the region of the pulmonary tuberculosis lesion.
In summary, compared with the method for directly carrying out histogram equalization on the pulmonary tuberculosis CT image, the method only enhances the screened artifact pixel points, can improve the definition of an artifact region on the basis of retaining detailed information such as the edge blurring characteristic of the pulmonary tuberculosis focus and the like so as to weaken the blurring characteristic close to the edge of the pulmonary tuberculosis focus in the artifact region, and can facilitate the subsequent distinction of the artifact region and the edge of the pulmonary tuberculosis focus, thereby improving the enhancement effect on the pulmonary tuberculosis CT image and further improving the segmentation accuracy of the pulmonary tuberculosis CT image. Finally, the target enhanced image is segmented, so that CT image segmentation is realized.
The present invention has been completed.
An embodiment of an image enhancement method for CT image segmentation of tuberculosis:
the CT image may have artifacts due to various factors in the imaging process, and because the artifacts are often similar to the edges of the pulmonary tuberculosis focus, for example, both the artifacts are relatively blurred, the artifacts often have a larger influence on the segmentation of the CT image, so that the image needs to be enhanced to reduce the influence caused by the artifacts. At present, when an image is enhanced, the following methods are generally adopted: and carrying out histogram equalization on the image according to the gray level histogram of the image to obtain an enhanced image.
However, when performing histogram equalization on a tuberculosis CT image according to a gray level histogram of the tuberculosis CT image to realize image enhancement, there are often the following technical problems:
because the gray level histogram equalization is usually to perform statistical integral image enhancement according to the gray level value distribution of the image, when the histogram equalization is performed on the pulmonary tuberculosis CT image directly according to the gray level histogram of the pulmonary tuberculosis CT image, the detail information of pulmonary tuberculosis focus with less pixels is possibly lost, so that the effect of enhancing the pulmonary tuberculosis CT image is poor.
In order to solve the technical problem of poor effect of enhancing a tuberculosis CT image, the invention aims to provide an image enhancement method for segmenting the tuberculosis CT image, which adopts the following technical scheme:
step S1, acquiring a tuberculosis CT image, and carrying out gray level confusion degree analysis processing on a preset neighborhood corresponding to each pixel point in the tuberculosis CT image to obtain the gray level confusion degree corresponding to each pixel point.
And S2, according to the gray level confusion degree corresponding to each pixel point, performing focus edge shape rule analysis processing on each pixel point to obtain focus edge factors corresponding to each pixel point.
And S3, carrying out density change continuity analysis processing on each pixel point in a preset number of preset directions to obtain a density continuity factor corresponding to each pixel point.
And S4, screening out pseudo-image pixels from the tuberculosis CT image according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to the pixels.
And S5, reinforcing each pseudo-image pixel point according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to each pseudo-image pixel point in the tuberculosis CT image to obtain a target reinforced image.
The image enhancement method for the pulmonary tuberculosis CT image segmentation provided by the embodiment of the invention has the following technical effects:
first, since the artifact region and the edge of the lung focus tend to be blurred, the gray scale around the pixel on the edge of the artifact region and the lung focus tend to be relatively disordered, and thus the greater the degree of disordered gray scale corresponding to the quantized pixel, the more likely the pixel is to be an artifact region or a pixel on the edge of the lung focus. Then, the shape of the focus edge is often approximate to a ring shape, and the artifact area is relatively irregular, so that focus edge shape rule analysis processing is carried out on each pixel point, and the larger focus edge factor corresponding to each quantized pixel point is, the more likely the pixel point is to be a pixel point on the edge of the pulmonary tuberculosis focus, and the more favorable is for distinguishing the artifact area from the edge of the pulmonary tuberculosis focus. Then, since the artifact area is often different from the density change at the lesion, for example, the lesion will often affect the normal structure and shape of the lung tissue, often resulting in some degree of compression or destruction of the surrounding lung tissue, the tissue at the edge of the lesion will often form a thick to thin morphology, exhibiting a smooth continuous density change. The artifact area is in an irregular, broken or forked form, the density change in the area is discontinuous, and obvious boundaries or breaks are formed, so that the density change continuity analysis processing is carried out on each pixel point in a preset number of preset directions, and the greater the density continuity factor corresponding to each quantized pixel point is, the more likely the pixel point is to be a pixel point on a pulmonary tuberculosis lesion. Then, because the gray level confusion degree, focus edge factor and density continuous factor corresponding to the pixel point are all related to the distinction of the pseudo-image pixel points, the pseudo-image pixel points can be screened from the pulmonary tuberculosis CT image based on the gray level confusion degree, focus edge factor and density continuous factor corresponding to the pixel point. And then, based on the gray level confusion degree, focus edge factors and density continuous factors corresponding to each artifact pixel point in the tuberculosis CT image, each artifact pixel point is enhanced, so that the self-adaptive enhancement of the artifact pixel points can be realized, and compared with the direct histogram equalization of the tuberculosis CT image, the method only enhances the screened artifact pixel points, can improve the definition of an artifact region on the basis of retaining detailed information such as the edge blurring characteristics of the tuberculosis focus, so as to weaken the blurring characteristics close to the edge of the tuberculosis focus in the artifact region, and can facilitate the subsequent distinction of the artifact region and the edge of the tuberculosis focus, thereby improving the enhancement effect of the tuberculosis CT image.
The steps S1-S5 are already described in detail in the embodiment of the method for segmenting a CT image of tuberculosis based on feature extraction, and will not be described in detail.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention and are intended to be included within the scope of the invention.

Claims (10)

1. The pulmonary tuberculosis CT image segmentation method based on feature extraction is characterized by comprising the following steps of:
acquiring a pulmonary tuberculosis CT image, and carrying out gray level confusion degree analysis processing on a preset neighborhood corresponding to each pixel point in the pulmonary tuberculosis CT image to obtain gray level confusion degree corresponding to each pixel point;
according to the gray level confusion degree corresponding to each pixel point, performing focus edge shape rule analysis processing on each pixel point to obtain focus edge factors corresponding to each pixel point;
Carrying out density change continuity analysis processing on each pixel point in a preset number of preset directions to obtain a density continuous factor corresponding to each pixel point;
screening pseudo-image pixels from the tuberculosis CT image according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to the pixels;
according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to each pseudo-image pixel in the tuberculosis CT image, enhancing each pseudo-image pixel to obtain a target enhanced image;
and dividing the target enhanced image to obtain a target region.
2. The method for segmenting a pulmonary tuberculosis CT image based on feature extraction as described in claim 1, wherein the formula corresponding to the gray level confusion degree corresponding to the pixel point is:
wherein,is the +.o in CT image of pulmonary tuberculosis>The gray level confusion degree corresponding to each pixel point; />Is the serial number of the pixel point in the tuberculosis CT image; />Is the +.o in CT image of pulmonary tuberculosis>The first degree of confusion corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>The second degree of confusion corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>A third degree of confusion corresponding to the individual pixel points; / >Is the maximum gray value in the CT image of pulmonary tuberculosis; />Is the smallest gray value in the CT image of pulmonary tuberculosis; />Is->Andgray values in between; />Is the +.o in CT image of pulmonary tuberculosis>The number of the pixel points in the preset neighborhood corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>In the preset neighborhood corresponding to each pixel point, the gray value is equal to +.>The number of pixels of (a);is 2 as a base->Logarithm of (2); />Is the +.o in CT image of pulmonary tuberculosis>The serial numbers of the pixel points in the preset neighborhood corresponding to the pixel points; />Taking an absolute value function; />Is the +.o in CT image of pulmonary tuberculosis>Gray values corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>The first part of the preset adjacent area corresponding to each pixel point>Gray values corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>Maximum value in gray values corresponding to all pixel points in a preset neighborhood corresponding to each pixel point; />Is the +.o in CT image of pulmonary tuberculosis>And the minimum value in the gray values corresponding to all the pixel points in the preset neighborhood corresponding to each pixel point.
3. The method for segmenting the pulmonary tuberculosis CT image based on feature extraction according to claim 1, wherein the step of performing focus edge shape rule analysis processing on each pixel according to the gray level confusion degree corresponding to each pixel to obtain focus edge factors corresponding to each pixel comprises the following steps:
When the gray level confusion degree corresponding to the pixel points is smaller than or equal to a preset confusion threshold value, determining a constant 0 as a focus edge factor corresponding to the pixel points;
when the gray level confusion degree corresponding to the pixel points is larger than a preset confusion threshold value, determining the pixel points as reference pixel points;
and carrying out connected domain division on the areas where all the reference pixel points are located, and determining focus edge factors corresponding to each reference pixel point according to the connected domain to which each reference pixel point belongs.
4. A method for segmenting a tuberculosis CT image based on feature extraction as described in claim 3, wherein the formula corresponding to the focus edge factor corresponding to the reference pixel point in the tuberculosis CT image is:
wherein,is the +.o in CT image of pulmonary tuberculosis>Focus edge factors corresponding to the reference pixel points; />Is the serial number of a reference pixel point in a tuberculosis CT image; />Is a normalization function; />Is the +.o in CT image of pulmonary tuberculosis>All pixel points and the +.>Variance of distances between centers of connected domains to which the reference pixel points belong; />Is a factor greater than 0 set in advance; />Is the +.o in CT image of pulmonary tuberculosis>The number of the pixel points in the connected domain to which the reference pixel points belong; Is the +.o in CT image of pulmonary tuberculosis>Serial numbers of pixel points in the connected domain to which the reference pixel points belong; />Is the +.o in CT image of pulmonary tuberculosis>All pixel points and the +.>Maximum value in the distance between the centers of the connected domains to which the reference pixel points belong; />Is the +.o in CT image of pulmonary tuberculosis>The communication domain to which the reference pixel points belong is +.>Pixel dot and->The distance between the centers of the connected domains to which the reference pixel points belong.
5. The method for segmenting a pulmonary tuberculosis CT image based on feature extraction according to claim 1, wherein the performing a density variation continuity analysis process on each pixel point in a preset number of preset directions to obtain a density continuity factor corresponding to each pixel point includes:
determining any pixel point in a tuberculosis CT image as a marked pixel point, and screening out a preset number of pixel points nearest to the marked pixel point from each preset direction of the marked pixel point to form a pixel point sequence of the marked pixel point in each preset direction;
and determining a density continuous factor corresponding to the marked pixel points according to the pixel point sequences of the marked pixel points in the preset number of preset directions.
6. The method for segmenting a pulmonary tuberculosis CT image based on feature extraction as described in claim 5, wherein the formula corresponding to the density continuous factor corresponding to the pixel point is:
wherein,is the +.o in CT image of pulmonary tuberculosis>Density continuous factors corresponding to the pixel points; />Is the serial number of the pixel point in the tuberculosis CT image; />Is a normalization function; />Is the +.o in CT image of pulmonary tuberculosis>First continuous factors corresponding to the pixel points; />Is the +.o in CT image of pulmonary tuberculosis>A second continuous factor corresponding to each pixel point; />And->Is a factor greater than 0 set in advance; />Is the +.o in CT image of pulmonary tuberculosis>The pixel point is at the +.>The number of pixels in the pixel sequence in the preset direction; />Is a preset number; />Is a serial number of a preset direction; />Is->The pixel point is at the +.>Sequence numbers of pixels in the pixel sequence in the preset direction; />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>First-order gray scale differences corresponding to the pixel points; />Taking an absolute value function; />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>Gray values corresponding to the pixel points; />Is->The pixel point is at the +. >In the pixel point sequence in the preset direction, the first ∈>Gray values corresponding to the pixel points; />Is->The pixel point is at the +.>In the pixel point sequence in the preset direction, the first ∈>The first-order gray scale difference corresponding to each pixel point.
7. The method for segmenting the pulmonary tuberculosis CT image based on feature extraction according to claim 1, wherein the step of screening the pseudo-image pixels from the pulmonary tuberculosis CT image according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to the pixels comprises the steps of:
according to the gray level confusion degree corresponding to each pixel point, determining a non-pseudo non-disease possible factor corresponding to each pixel point, wherein the gray level confusion degree is in negative correlation with the non-pseudo non-disease possible factor;
according to the focus edge factors and the non-pseudo non-disease possible factors corresponding to each pixel point, determining the non-pseudo focus possible factors corresponding to each pixel point, wherein the non-pseudo non-disease possible factors are in negative correlation with the non-pseudo focus possible factors, and the focus edge factors are in positive correlation with the non-pseudo focus possible factors;
according to the non-pseudo non-disease possible factors, the non-pseudo lesion possible factors and the density continuous factors corresponding to each pixel point, determining the pseudo-lesion possible factors corresponding to each pixel point, wherein the non-pseudo non-disease possible factors and the non-pseudo lesion possible factors are in negative correlation with the pseudo-lesion possible factors, and the density continuous factors are in positive correlation with the pseudo-lesion possible factors;
According to the non-pseudo non-disease possible factors, the non-pseudo lesion possible factors and the pseudo lesion possible factors corresponding to each pixel point, determining the pseudo non-disease possible factors corresponding to each pixel point, wherein the non-pseudo non-disease possible factors, the non-pseudo lesion possible factors and the pseudo lesion possible factors are in negative correlation with the pseudo non-disease possible factors;
if the corresponding non-artifact non-disease possible factor, non-artifact focus possible factor, artifact focus possible factor and the largest factor in the artifact non-disease possible factor is the artifact focus possible factor, determining the pixel point as an artifact focus pixel point;
if the corresponding non-artifact non-disease possible factor, non-artifact focus possible factor, artifact focus possible factor and the largest factor in the artifact non-disease possible factor is the artifact non-disease possible factor, determining the pixel point as an artifact non-disease pixel point;
and marking the artifact focus pixel point and the artifact non-disease pixel point as artifact pixel points.
8. The method for segmenting a CT image of tuberculosis based on feature extraction as described in claim 7, wherein said enhancing each pseudo-image pixel according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to each pseudo-image pixel in the CT image of tuberculosis to obtain a target enhanced image comprises:
Determining target weights corresponding to all pixel points in a preset filtering window corresponding to each artifact pixel point according to the gray level confusion degree, focus edge factors and density continuous factors corresponding to each artifact pixel point in the pulmonary tuberculosis CT image;
and carrying out filtering processing on each artifact pixel point according to the target weight corresponding to all pixel points in a preset filtering window corresponding to each artifact pixel point in the tuberculosis CT image to obtain a target enhanced image.
9. The method for segmenting a pulmonary tuberculosis CT image based on feature extraction according to claim 8, wherein the determining the target weights corresponding to all pixels in the preset filter window corresponding to each artifact pixel according to the gray level confusion degree, the focus edge factor and the density continuous factor corresponding to each artifact pixel in the pulmonary tuberculosis CT image comprises:
determining a target weight corresponding to each pixel point in a preset filter window corresponding to the artifact focus pixel point according to a non-artifact focus possible factor corresponding to each pixel point in the preset filter window corresponding to the artifact focus pixel point;
and determining the target weight corresponding to each pixel point in the preset filter window corresponding to the artifact non-disease pixel point according to the non-artifact non-disease possible factor corresponding to each pixel point in the preset filter window corresponding to the artifact non-disease pixel point.
10. The method for segmenting a CT image of tuberculosis based on feature extraction as described in claim 1, wherein said segmenting the target enhanced image to obtain a target region comprises:
and performing threshold segmentation on the target enhanced image by using an Ojin method to obtain a target region.
CN202410190595.5A 2024-02-21 2024-02-21 Pulmonary tuberculosis CT image segmentation method based on feature extraction Active CN117745751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410190595.5A CN117745751B (en) 2024-02-21 2024-02-21 Pulmonary tuberculosis CT image segmentation method based on feature extraction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410190595.5A CN117745751B (en) 2024-02-21 2024-02-21 Pulmonary tuberculosis CT image segmentation method based on feature extraction

Publications (2)

Publication Number Publication Date
CN117745751A true CN117745751A (en) 2024-03-22
CN117745751B CN117745751B (en) 2024-04-26

Family

ID=90259604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410190595.5A Active CN117745751B (en) 2024-02-21 2024-02-21 Pulmonary tuberculosis CT image segmentation method based on feature extraction

Country Status (1)

Country Link
CN (1) CN117745751B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9167129B1 (en) * 2014-12-12 2015-10-20 Xerox Corporation Method and apparatus for segmenting image into halftone and non-halftone regions
CN115330775A (en) * 2022-10-13 2022-11-11 佛山科学技术学院 Quantitative evaluation method and system for cerebral apoplexy CT and MRI image symptoms
CN116934755A (en) * 2023-09-18 2023-10-24 中国人民解放军总医院第八医学中心 Pulmonary tuberculosis CT image enhancement system based on histogram equalization
CN117252917A (en) * 2023-11-14 2023-12-19 宝鸡市钛程金属复合材料有限公司 Marine composite board production control method based on image processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9167129B1 (en) * 2014-12-12 2015-10-20 Xerox Corporation Method and apparatus for segmenting image into halftone and non-halftone regions
CN115330775A (en) * 2022-10-13 2022-11-11 佛山科学技术学院 Quantitative evaluation method and system for cerebral apoplexy CT and MRI image symptoms
CN116934755A (en) * 2023-09-18 2023-10-24 中国人民解放军总医院第八医学中心 Pulmonary tuberculosis CT image enhancement system based on histogram equalization
CN117252917A (en) * 2023-11-14 2023-12-19 宝鸡市钛程金属复合材料有限公司 Marine composite board production control method based on image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王曙升;潘历波;赵学武;韦霜;王爱丽;: "85例甲状腺病变多层螺旋CT影像分析", 现代肿瘤医学, no. 09, 25 September 2008 (2008-09-25) *

Also Published As

Publication number Publication date
CN117745751B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN115661135B (en) Lesion area segmentation method for cardiovascular and cerebrovascular angiography
Chaubey Comparison of the local and global thresholding methods in image segmentation
CN111833366A (en) Edge detection method based on Canny algorithm
CN116269467B (en) Information acquisition system before debridement of wounded patient
CN116109663B (en) Stomach CT image segmentation method based on multi-threshold segmentation
CN110610498A (en) Mammary gland molybdenum target image processing method, system, storage medium and equipment
EP2869261A1 (en) Method for processing image data representing a three-dimensional volume
Zheng et al. Image segmentation
CN115984148B (en) Denoising enhancement method for high-throughput gene sequencing data
US11302444B2 (en) System and method for computer aided diagnosis of mammograms using multi-view and multi-scale information fusion
Lbachir et al. A new mammogram preprocessing method for Computer-Aided Diagnosis systems
CN115272647A (en) Lung image recognition processing method and system
YILMAZ et al. Follicle detection for polycystic ovary syndrome by using image processing methods
JP6598149B2 (en) Clarification of lung nodules on chest X-ray images
CN114677289A (en) Image defogging method and system, computer equipment, storage medium and terminal
CN117745751B (en) Pulmonary tuberculosis CT image segmentation method based on feature extraction
CN112801031A (en) Vein image recognition method and device, electronic equipment and readable storage medium
CN110163825B (en) Human embryo heart ultrasonic image denoising and enhancing method
WO2004001670A2 (en) Methods of anisotropic diffusion and foveal segmentation of digital images
CN116071337A (en) Endoscopic image quality evaluation method based on super-pixel segmentation
CN112529918B (en) Method, device and equipment for segmenting brain room area in brain CT image
Shanmugavadivu et al. Wavelet transformation-based detection of masses in digital mammograms
Bania et al. Adaptive trimmed median filter for impulse noise detection and removal with an application to mammogram images
CN114529518A (en) Image pyramid and NLM-based image enhancement method for cryoelectron microscope
CN114419084A (en) Bleeding area detection method and device based on medical image and storage medium

Legal Events

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