A Limited Region Growing Segmentation Method Based on Adaptive Gradient

By introducing the calculation of adaptive gradients and finite growth space ranges into the regional growth method, the problem of preset and infinite overflow of growth gradients in traditional methods is solved, and a more refined and automated medical image segmentation is achieved.

CN118196128BActive Publication Date: 2025-02-11NAN JING ZHU WEI YI XUE KE JI YOU XIAN GONG SI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410315983.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2025-02-11
Estimated Expiration
2044-03-20

AI Technical Summary

Technical Problem

Traditional regional growth methods require pre-set growth gradients, and are prone to infinite growth overflow problems, resulting in poor segmentation results.

Method used

The finite region growth segmentation method based on adaptive gradient is adopted, and the growth space range and growth gradient are calculated by the seed point as the center to avoid infinite growth overflow and improve segmentation fineness.

Benefits of technology

It realizes more finer regional growth segmentation results, automatically calculates growth gradients and ranges, simplifies user operations and avoids growth overflow problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118196128B_ABST
    Figure CN118196128B_ABST
Patent Text Reader

Abstract

The present invention discloses a limited region growth segmentation method based on adaptive gradient, comprising the following steps: step 1, reading medical images; step 2, smoothing; step 3, setting seed points; step 4, traversing image pixels; step 5, judging whether the pixels exceed the growth space range; step 6, judging whether the pixels meet the growth conditions; step 7, pixel growth; step 8, exit method; wherein, after the cyclic iteration of steps 4-6, the pixels meeting the growth conditions are grown until the exit after traversing the growth space range; step 3 provides the growth space range for step 5 through step a, provides the growth gradient and the growth pixel range for step 6 through step b, step a is to calculate the growth space range, and step b is to calculate the growth gradient and the pixel range. The present invention provides suitable growth gradient and limited growth range to make the regional growth segmentation result more refined, and the ability to automatically calculate the two parameters will also bring convenience to the user's use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of medical image processing and relates to a limited region growing segmentation method based on adaptive gradient. Background Art

[0002] In the field of medical imaging, it is often necessary to segment specific diseased tissues independently so that medical staff can observe and analyze them more carefully. Region growing is a commonly used image segmentation method. It aims to use a seed point as a growth source and, under specific growth criteria such as gradient, group similar pixels in the image into connected domains in a flood traversal manner to achieve image segmentation.

[0003] Region growing is an image segmentation method that requires parameter interaction with the user. The growth gradient must be pre-set each time it is executed, and the growth gradient is different for different target tissues. The traditional region growing space range is generally the full image size, and the pixel range is also unconstrained. If the growth gradient is too large or the boundary is blurred, serious growth overflow problems will occur. Therefore, a suitable growth gradient and a limited growth range will make the region growing segmentation results more refined, and the ability to automatically calculate these two parameters will also bring convenience to users. Summary of the invention

[0004] Aiming at the defects of traditional region growing, such as the need to pre-set growth gradient and the existence of infinite growth overflow, the present invention discloses a limited region growing segmentation method based on adaptive gradient.

[0005] The specific plan is as follows:

[0006] A limited region growing segmentation method based on adaptive gradient, characterized by comprising the following steps:

[0007] Step 1: Read medical images;

[0008] Step 2: Smoothing;

[0009] Step 3: Set the seed point;

[0010] Step 4, traverse the image pixels;

[0011] Step 5: Determine whether the pixel exceeds the growth space range;

[0012] Step 6: Determine whether the pixel meets the growth conditions;

[0013] Step 7: Pixel growth;

[0014] Step 8: Exit method;

[0015] Among them, after setting the seed point in the image, after basic smoothing processing, after the loop iteration of steps 4-6, the pixels that meet the growth conditions are grown until the growth space range is traversed and then exited; the step 3 provides the growth space range for step 5 through step a, and provides the growth gradient and growth pixel range for step 6 through step b, the step a is to calculate the growth space range, and the step b is to calculate the growth gradient and pixel range.

[0016] As a further improvement of the present invention, in step a, a rectangular area A is formed with the seed point as the center as the source area, and a certain proportion is expanded on the basis of the source area A to form a growth space B. In order to avoid memory overflow, it is considered whether the growth space B exceeds the original image size.

[0017] As a further improvement of the present invention, in step b, normal distribution data statistics are performed on the pixel points in area A in step a, the growth gradient and growth pixel range are calculated, and this is used as a reference for the growth condition of space B; in order to improve the reference value of area A to area B, the pixels in area A should be as smooth as possible, and B should be twice as large as A.

[0018] As a further improvement of the present invention, step 1 is specifically: selecting a two-dimensional image or extracting a two-dimensional section in a three-dimensional image; wherein the size of the two-dimensional image is larger than the growth space range calculated in step a. This method has certain sensitivity requirements for the pixel gradient inside the image, and the larger the pixel gradient, the finer the segmentation effect. Both of these requirements are met for conventional CT and MR images.

[0019] As a further improvement of the present invention, step 2 is specifically as follows: since the original medical image read in step 1 may have some step noise points, the gradient of these noise points is generally large, which will hinder the normal growth of pixels during the region growing process. In order to eliminate the noise points, smoothing preprocessing is required.

[0020] Gaussian filtering is used to smooth the original medical image. Gaussian filtering is a linear smoothing filter that uses a Gaussian kernel to convolve each pixel in the image and replaces the kernel center pixel value with the weighted average of the neighboring pixels in the kernel. The two-dimensional Gaussian formula is as follows:

[0021]

[0022] Among them, μ x and μ y Represents the average value of the pixels in the kernel in the x and y directions, and Corresponding to the pixel variance in two directions.

[0023] As a further improvement of the present invention, step 3 is specifically as follows: the user picks up a pixel point in the image as a seed point through the mouse. Since the key steps a and b of the method are both adaptively calculated based on the seed point, in order to achieve a better segmentation effect, the seed point position is as far away from the image boundary as possible by a growth space size, and is as located as possible in the center of the target to be segmented.

[0024] As a further improvement of the present invention, step 4 is specifically: using a flood fill algorithm to traverse the pixel points, taking the seed point p(x0, y0) selected by the user as the starting point, marking it as visited and adding it to the queue, and then taking out a node from the queue in sequence, marking its adjacent unvisited nodes, and adding them to the queue until the traversal is completed when the queue is empty.

[0025] As a further improvement of the present invention, the step 5 is specifically as follows: based on whether the pixel point is within the growth space range, determine whether the pixel point enters the growth link or ends the traversal exit method; in order to improve the traversal efficiency, an image area of ​​interest is generated according to the growth space range for pixel traversal.

[0026] Among them, the growth space range is the growth space B with the same center as the rectangular area A, the side length of the rectangular area A is d, the side length of the growth space B is n*d, n>1, and the growth space B is first used to form a region of interest in the image to be segmented, and then subsequent region growth calculations are performed.

[0027] As a further improvement of the present invention, the step 6 is specifically as follows: the growth condition includes a growth gradient and a growth pixel range, wherein the growth pixel range is mainly to prevent the growth gradient from being too large and causing infinite growth; if the growth condition is met, the pixel point is marked to a connected domain; in addition, whether the growth condition is met or not, the next pixel point will continue to be traversed;

[0028] The connectivity of the connected domain is determined by the color or brightness proximity of adjacent pixels. The similarity is quantified by the pixel gradient g. The smaller g is, the more similar the pixels are. Whether a pixel p(x, y) is included in the connected domain is determined by the following formula:

[0029] p(x′,y′)-g≤p(x,y)≤p(x′,y′)+g

[0030] p low ≤p(x,y)≤p up

[0031] x0-n*d≤x≤x0+n*d

[0032] y0-n*d≤y≤y0+n*d

[0033] Among them, p(x′,y′) is the pixel adjacent to p(x,y) that has been summarized into the connected domain, [p low ,p up ] is the pixel value range of the connected domain; if p(x,y) satisfies the formula, the corresponding copy image pixel is marked:

[0034] p′(x,y)=c

[0035] Among them, c is the mark color. In order to distinguish whether there is a mark or not, the pixels of the copy image are filled with 0 by default, and c>0 is agreed upon.

[0036] As a further improvement of the present invention, step 7 is specifically as follows: the pixel point growth is to color-mark the pixel points of the same coordinates in an empty copy image with the same attributes (size, pixel interval, pixel type, etc.) as the original image, and the area with the same color is the segmentation area.

[0037] Among them, the pixel value z in area A follows the normal distribution Z~N(μ,σ 2 ):

[0038]

[0039] Among them, μ and σ are the expectation and standard deviation of the pixel value z, respectively, and the statistical range of z is [z low ,z up ]. Based on the pixel data statistics in region A, the adaptive growth gradient g of the pixels in region B is:

[0040] g=aσ+b

[0041] Where a and b are constant coefficients, and a>1, b>10; and the pixel range in region B is set to be a subset of the pixel range in region A:

[0042] [z low , z up ]∈[p low , p up ]

[0043] This is the growth process of a seed point.

[0044] As a further improvement of the present invention, the step 8 is specifically as follows: when the pixel points exceed the range of the growth space, the traversal is exited to end the method; in order to continue to expand the growth area, seed points are continuously input to achieve a more refined segmentation.

[0045] The beneficial effects of the present invention are as follows: in view of the defects of traditional region growing, such as the need to pre-set the growth gradient and the existence of infinite growth overflow, the present invention provides a suitable growth gradient and a limited growth range, which will make the region growing segmentation result more refined, and the ability to automatically calculate the two parameters will also bring convenience to users. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic diagram of the method flow of the present invention.

[0047] Figure 2 Schematic diagram of selecting seed points of the present invention; wherein the seed point is the center of the rectangular box, which is also called the "brush area", which mainly assists the user to accurately select the seed point. Generally, it is required that the "brush area" does not exceed the boundary of the target to be segmented.

[0048] Figure 3 The figure is a schematic diagram of the result after segmentation based on the selected seed point; wherein a shaded area is formed around the rectangular box, which is the result after segmentation based on the seed point.

[0049] Figure 4 This is the final result after segmentation based on multiple sets of seed points within the target. After multiple region growings, the segmented region has completely covered the target, and the segmentation boundary is more closely aligned with the target boundary.

[0050] Figure 5 It is flood-fill (four-neighborhood) growth. DETAILED DESCRIPTION

[0051] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0052] like Figure 1 As shown, the present invention provides a limited region growing segmentation method based on adaptive gradient, comprising the following steps:

[0053] Step 1: Read the medical image. This example of the method reads the local nifti 3D image. The image is an MRI image of the brain. According to the image, there is a mass area inside the brain, which can be used as the segmentation target of this example.

[0054] The "brush area" of this method is generally a rectangle with a side length of 8 to 40 pixels. In the example, a layer of the three-dimensional image is extracted for experiment. The size of the extracted two-dimensional image is 256x170 pixels, which can provide enough space for the growth of seed points.

[0055] This method requires that the pixel gradient inside the image is at least 20. The pixel gradient of the tumor area in this image is around 100, which fully meets the growth requirements.

[0056] Step 2: Smoothing In order to eliminate the "gradient wall" that may exist in regional growth, this method uses Gaussian filtering to achieve smooth preprocessing of the image. Gaussian filtering is a linear smoothing filter that uses a Gaussian kernel to convolve each pixel in the image and replaces the kernel center pixel value with the weighted average of the neighboring pixels in the kernel. The two-dimensional Gaussian formula is as follows:

[0057]

[0058] Among them, μ x and μ y Represents the average value of the pixels in the kernel in the x and y directions, and Corresponding to the pixel variance in two directions.

[0059] Step 3: Set the seed point. According to the algorithm requirements, the seed point is located in the target area. The boundary of the "brush area" should not exceed the target boundary. The side length can be adjusted in the range of 4 to 40. Users can use the UI to flexibly set the seed point based on this principle.

[0060] Step 4: Limited region growing based on adaptive gradient

[0061] Figure 1 The execution steps 4-8 of the method are comprehensively represented as the main part of the method of the present invention. Steps 3, a and b are essentially the input parameters such as seed point, finite growth space, adaptive growth gradient and finite growth pixel range. The main part of the method will be uniformly explained below.

[0062] This method uses flood filling (four neighborhoods) to traverse the image pixels to form a connected domain, and the seed point p(x0,y0) is used as the starting point of the traversal. Figure 5 shown.

[0063] The limited growth space of the present invention is the extended area B (side length n*d, n>1) with the same center as the "brush area" A (side length d). In order to improve the operation efficiency, the example first forms the region of interest in the image to be segmented with area B, and then performs subsequent region growth calculations. In addition, the connectivity of the connected domain is determined by the color or brightness proximity of adjacent pixels, and the similarity is quantified by the pixel gradient g. The smaller g is, the more similar the pixels are. Whether the pixel p(x, y) is included in the connected domain is based on the following formula:

[0064] p(x′,y′)-g≤p(x,y)≤p(x′,y′)+g

[0065] p low ≤p(x,y)≤p up

[0066] x0-n*d≤x≤x0+n*d

[0067] y0-n*d≤y≤y0+n*d

[0068] Among them, p(x′,y′) is the pixel adjacent to p(x,y) that has been summarized into the connected domain, [p low ,p up ] is the pixel value range of the connected domain. If p(x,y) satisfies the formula, the corresponding copy image pixel is marked:

[0069] p′(x,y)=c

[0070] Where c is the marking color. To distinguish whether there is a mark or not, the pixels of the duplicate image are filled with 0 by default, and c>0 is agreed upon.

[0071] The key to region growing is the appropriate growth gradient g. In order to avoid growth overflow, the growth pixel range [p low ,p up ] is also crucial. This method uses the pixel data statistics in the "brush area" A to achieve adaptive gradient calculation of pixels in area B and provide a limited range of growing pixels as a reference. According to a large number of experimental data statistics, the pixel value z in area A in the image follows the normal distribution Z~N(μ,σ 2 ):

[0072]

[0073] Among them, μ and σ are the expectation and standard deviation of the pixel value z, respectively, and the statistical range of z is [z low ,z up ]. Based on the pixel data statistics in region A, the adaptive growth gradient g of the pixels in region B is:

[0074] g=aσ+b

[0075] Where a and b are constant coefficients, and a>1, b>10. And set the pixel range in region B to be a subset of the pixel range in region A:

[0076] [z low ,z up ]∈[p low ,p up ]

[0077] This is the growth process of a seed point. In practical applications, users are generally required to pick up multiple seed points in the target area of ​​the image with the mouse, and merge all the generated sub-connected domains to form the final segmentation result.

Claims

1. A finite region growing segmentation method based on adaptive gradient, characterized in that: The following steps are involved: Step 1: Read medical images; Step 2: Smoothing; Step 3: Set the seed point; Step 4, traverse the image pixels; Step 5: Determine whether the pixel exceeds the growth space range; Step 6: Determine whether the pixel meets the growth conditions; Step 7: Pixel growth; Step 8: Exit method; Wherein, after the loop iteration of steps 4-6, the pixels meeting the growth conditions are grown until the growth space range is traversed and then exited; the step 3 provides the growth space range for step 5 through step a, and provides the growth gradient and growth pixel range for step 6 through step b, the step a is to calculate the growth space range, and the step b is to calculate the growth gradient and pixel range; In the step a, a rectangular area A is formed with the seed point as the center as the source area, and a growth space B is formed on the basis of the source area A. In order to avoid memory overflow, whether the growth space B exceeds the original image size is considered; in the step b, normal distribution data statistics are performed on the pixel points in the area A in step a, and the growth gradient and the growth pixel range are calculated, and this is used as the reference for the growth condition of the space B; in order to improve the reference value of the area A to the area B, the pixels of the area A should be as smooth as possible, and the area B should be twice as large as the area A; The step 7 is specifically as follows: the pixel point growth is to color-mark the pixel points with the same coordinates in the empty copy image with the same attributes as the original image, and the area with the same color is the segmentation area; Among them, the pixel value z in area A obeys the normal distribution Z~N(μ,σ 2 ): Among them, μ and σ are the expectation and standard deviation of the pixel value z, respectively, and the statistical range of z is [z low ,z up ], based on the pixel data statistics in region A, the adaptive growth gradient g of the pixels in region B is: g=aσ+b Where a and b are constant coefficients, and a>1, b>10; and the pixel range in region A is set as a subset of the connected domain pixel range: [z low ,z up ]∈[P low ,P up ] This is the growth process of a seed point.

2. The method of segmentation based on finite region growing of adaptive gradient according to claim 1, characterized in that: The step 1 specifically includes: selecting a two-dimensional image or extracting a two-dimensional section in a three-dimensional image; wherein the size of the two-dimensional image is larger than the growth space range calculated in step a.

3. The method of segmentation based on finite region growing of adaptive gradient according to claim 2, characterized in that: The step 2 is specifically: using Gaussian filtering to achieve smoothing of the original medical image. Gaussian filtering is a linear smoothing filter that uses each pixel in the Gaussian kernel convolution image to replace the kernel center pixel value with the weighted average value of the neighboring pixels in the kernel. The two-dimensional Gaussian formula is as follows: Among them, μ x and μ y Represents the average value of the pixels in the kernel in the x and y directions, and Corresponding to the pixel variance in two directions.

4. The method of segmentation based on finite region growing of adaptive gradient according to claim 3, characterized in that: The step 3 is specifically as follows: the user picks up a pixel point in the image as a seed point through the mouse, and the position of the seed point is away from the image boundary by a growth space size and is located at the center of the object to be segmented.

5. The method of segmentation based on finite region growing of adaptive gradient according to claim 4, characterized in that: The step 4 is specifically as follows: a flood fill algorithm is used to traverse the pixel points, the seed point p(x0, y0) selected by the user is used as the starting point, it is marked as visited and added to the queue, and then a node is taken out of the queue in turn, its adjacent unvisited nodes are marked, and they are added to the queue until the traversal ends when the queue is empty.

6. The method of segmentation based on finite region growing of adaptive gradient according to claim 5, characterized in that: The step 5 specifically includes: determining whether the pixel point enters the growth link or ends the traversal and exits the method according to whether the pixel point is within the growth space range; wherein, an image region of interest is generated according to the growth space range for pixel traversal; The growth space range is the growth space B which is isocentric with the rectangular area A, the side length of the rectangular area A is d, the side length of the growth space B is n*d, n>1, and the growth space B is first used to form a region of interest in the image to be segmented, and then subsequent region growth calculations are performed.

7. The method of segmentation based on finite region growing of adaptive gradient according to claim 6, characterized in that: The step 6 is specifically as follows: the growth condition includes a growth gradient and a growth pixel range, wherein the growth pixel range prevents the growth gradient from being too large and causing infinite growth; if the growth condition is met, the pixel point is marked to a connected domain; in addition, whether the growth condition is met or not, the next pixel point will continue to be traversed; The connectivity of the connected domain is determined by the proximity of the colors or brightness of adjacent pixels. The similarity is quantified by the pixel gradient g. The smaller g is, the more similar the pixels are. Whether a pixel p(x, y) is included in the connected domain is determined by the following formula: p(x′,y′)-g≤p(x,y)≤p(x′,y′)+g p low ≤p(x,y)≤p up x0-n*d≤x≤x0+n*d y0-n*d≤y≤y0+n*d Among them, p(x′,y′) is the pixel adjacent to p(x,y) that has been summarized into the connected domain, [p low ,p up ] is the pixel value range of the connected domain; if p(x,y) satisfies the formula, the corresponding copy image pixel is marked: p′(x,y)=c Among them, c is the mark color. In order to distinguish whether there is a mark or not, the pixels of the copy image are filled with 0 by default, and c>0 is agreed upon.

8. The method of segmentation based on finite region growing of adaptive gradient according to claim 7, characterized in that: The step 8 is specifically as follows: when the pixel points exceed the range of the growth space, the traversal is exited to end the method; in order to continue to expand the growth area, seed points are continuously input to achieve a more refined segmentation.

Citation Information

Patent Citations

  • Level set hippocampus image segmentation method based on area growth initialization

    CN107016683A