CN114170258A - Image segmentation method and device, electronic equipment and storage medium - Google Patents

Image segmentation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114170258A
CN114170258A CN202111504470.8A CN202111504470A CN114170258A CN 114170258 A CN114170258 A CN 114170258A CN 202111504470 A CN202111504470 A CN 202111504470A CN 114170258 A CN114170258 A CN 114170258A
Authority
CN
China
Prior art keywords
image
edge
segmentation
segmented
preset
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.)
Pending
Application number
CN202111504470.8A
Other languages
Chinese (zh)
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.)
Sonosemi Medical Co Ltd
Original Assignee
Sonosemi Medical Co Ltd
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 Sonosemi Medical Co Ltd filed Critical Sonosemi Medical Co Ltd
Priority to CN202111504470.8A priority Critical patent/CN114170258A/en
Publication of CN114170258A publication Critical patent/CN114170258A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10132Ultrasound image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30101Blood vessel; Artery; Vein; Vascular

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image segmentation method, an image segmentation device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an original image to be segmented; performing edge enhancement processing on the original image to be segmented to obtain an edge enhanced image; extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image; and determining a target segmentation image based on the target region edge points in the edge enhancement image. According to the technical scheme of the embodiment of the invention, the whole image segmentation process does not need manual intervention, automatic segmentation of the target object is realized, sample training is not needed, the image processing time can be greatly reduced, and the effect of improving the image segmentation speed is achieved.

Description

Image segmentation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to an image segmentation method, an image segmentation device, electronic equipment and a storage medium.
Background
The intravascular ultrasound (IVUS) technology can provide relevant important image information of coronary artery lumen, vessel wall and the like, so that important clinical measurement parameters such as lumen, vessel diameter, vessel cross-sectional area, eccentricity and the like are obtained to assist doctors in diagnosis. Accurate positioning of the boundary between the inner membrane and the outer membrane can assist a doctor to better measure clinical measurement parameters.
In the prior art, the intravascular ultrasound automatic segmentation method is mainly divided into the following categories, namely a first category based on an active contour model, wherein the first category is sensitive to an initial contour and the time consumption of curve evolution is long; in the second category, methods based on statistics and probability generally build segmentation models based on prior knowledge, and are also time-consuming; third, artificial intelligence based methods typically require a large number of labeled images for training, and the creation of a labeled image library is a time-consuming process. In summary, the existing automatic segmentation method consumes a long time and cannot meet the requirement of a user on the processing speed.
Disclosure of Invention
The embodiment of the invention provides an image segmentation method, an image segmentation device, electronic equipment and a storage medium, which are used for improving the image segmentation speed.
In a first aspect, an embodiment of the present invention provides an image segmentation method, including:
acquiring an original image to be segmented;
performing edge enhancement processing on the original image to be segmented to obtain an edge enhanced image;
extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image;
and determining a target segmentation image based on the target region edge points in the edge enhancement image.
In a second aspect, an embodiment of the present invention further provides an image segmentation apparatus, including:
the image acquisition module is used for acquiring an original image to be segmented;
the enhancement processing module is used for carrying out edge enhancement processing on the original image to be segmented to obtain an edge enhanced image;
the edge extraction module is used for extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image;
and the target segmentation module is used for determining a target segmentation image based on the target region edge points in the edge enhancement image.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the image segmentation method of any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the image segmentation method according to any one of the embodiments of the present invention.
The method comprises the steps of obtaining an original image to be segmented; the original image to be segmented is subjected to edge enhancement processing, so that an edge enhancement image of a target segmentation object which is more concerned can be obtained, and subsequent edge point extraction is facilitated; extracting edge points of the edge enhancement image in each preset interval angle direction, so that the edge points of the target area can be quickly determined; in addition, the target segmentation image is determined based on the edge point of the target area in the edge enhancement image, the whole image segmentation process does not need manual intervention, automatic segmentation of the target object is achieved, sample training is not needed, the image processing time can be greatly reduced, and the effect of improving the image segmentation speed is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of an image segmentation method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an image segmentation method according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of an image segmentation method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an image segmentation apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of an image segmentation method according to an embodiment of the present invention, where the embodiment is applicable to the case of automatic image segmentation, and the method may be executed by an image segmentation apparatus provided in an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and the apparatus may be configured on an electronic computing device, for example, a terminal and/or a server. The method specifically comprises the following steps:
and S110, acquiring an original image to be segmented.
Wherein, the original image to be segmented can be an image containing a target segmentation object. The type and content of the original image to be segmented are not specifically limited herein. Optionally, the original image to be segmented includes a medical image, a natural image, and the like. Typically, the medical image may be an ultrasound image in particular. Illustratively, the original image to be segmented may be a cardiovascular ultrasound image. Specifically, the original image to be segmented includes, but is not limited to, a target segmented object and a non-target segmented object. The target segmentation object may be an object of interest to a user, such as an adventitia.
In the embodiment of the invention, one, two or more original images to be segmented are acquired. Optionally, the acquiring the original image to be segmented includes: in some embodiments, an original image containing a target segmented object is acquired in real time based on an image acquisition device; in some embodiments, an original image containing a target segmentation object is obtained from a preset storage position; in some embodiments, an original image containing a target segmented object sent by a target device is received. The storage position of the image to be segmented is not limited, the image to be segmented can be set according to actual requirements, and the image to be segmented can be directly obtained from the corresponding storage position when needed.
And S120, performing edge enhancement processing on the original image to be segmented to obtain an edge enhanced image.
The edge enhancement image can be understood as a preprocessed image of an original image to be segmented, the preprocessing operation comprises edge enhancement processing, and the edge enhancement processing operation can eliminate artifacts of the original image to be segmented and improve the contrast, smoothness and the like of the image, so that the edge information of a target segmentation object is more obvious and is easy to extract subsequently.
In the embodiment of the invention, the method for performing edge enhancement processing on the original image to be segmented comprises a plurality of modes, such as performing edge enhancement and noise suppression on the original image by using an anisotropic diffusion filtering algorithm; alternatively, the computation is enhanced by fractional differentiation; etc., and are not particularly limited herein.
S130, extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image.
In other words, in each preset interval angle direction, the edge points of the edge enhanced image are extracted, so that the evenly distributed edge points can be obtained, the fitting of the subsequent edge points is facilitated, and the method does not need sample training, thereby greatly reducing the time for image processing. The preset interval angle may be an angle that equally divides the circumferential angle, wherein the center of the circle may be the center of the edge-enhanced image. For example, the preset interval angle may be set to 5 degrees, and since the circumferential angle is 360 degrees, edge point search is performed in 72 preset interval angle directions, resulting in 72 edge points.
It will be appreciated that the number of edge points is inversely related to the predetermined angular interval. In the embodiment of the present invention, the preset interval angle may be specifically set according to an actual situation. Illustratively, the preset interval angle can be properly adjusted according to the size of the image or the image segmentation precision, for example, when the image segmentation precision requirement is high, the preset interval angle can be adjusted to be small, the number of the extracted edge points is increased, richer and more diverse edge points are provided for the target segmented image to perform edge fitting, and the segmentation effect is improved.
And S140, determining a target segmentation image based on the target region edge points in the edge enhancement image.
The target segmentation image may be an image obtained by segmenting the target segmentation object from the edge enhanced image. Specifically, the edge points of each target region in the edge enhanced image may be fitted to obtain a complete segmentation edge line, and the segmentation edge line is drawn in the edge enhanced image to obtain the target segmentation image.
In the embodiment of the invention, the edge point fitting method comprises multiple methods, such as curve fitting is carried out on the edge point of the target area by using an elliptic equation to obtain a complete segmentation edge line; etc., as the present invention is not limited in this regard.
The embodiment of the invention provides an image segmentation method, which comprises the steps of obtaining an original image to be segmented; the original image to be segmented is subjected to edge enhancement processing, so that an edge enhancement image of a target segmentation object which is more concerned can be obtained, and subsequent edge point extraction is facilitated; extracting edge points of the edge enhancement image in each preset interval angle direction, so that the edge points of the target area can be quickly determined; in addition, the target segmentation image is determined based on the edge point of the target area in the edge enhancement image, the whole image segmentation process does not need manual intervention, automatic segmentation of the target object is achieved, sample training is not needed, the image processing time can be greatly reduced, and the effect of improving the image segmentation speed is achieved.
Example two
Fig. 2 is a flow chart illustrating a method for segmenting an image according to a second embodiment of the present invention, and based on the second embodiment, the "processing of edge enhancement on the original image to be segmented to obtain an edge-enhanced image" is further refined. The specific implementation manner of the method can be seen in the detailed description of the technical scheme. The technical terms that are the same as or corresponding to the above embodiments are not repeated herein. As shown in fig. 2, the method of the embodiment of the present invention specifically includes the following steps:
and S210, acquiring an original image to be segmented.
S220, carrying out artifact suppression processing on the original image to be segmented to obtain an artifact suppressed image.
The artifact-suppressed image may be an image from which the artifact is removed, and the artifact may be a video that is not related to the target segmented object. The artifact in the blood vessel ultrasound image can be a catheter or a guide wire, and by performing artifact suppression processing on the blood vessel ultrasound image, a catheter image in the blood vessel ultrasound image can be removed, and interference of the catheter image on an image segmentation process can be effectively avoided.
On the basis of the above embodiment, the performing artifact suppression processing on the original image to be segmented to obtain an artifact-suppressed image specifically includes: determining an artifact area based on the center of the original image to be segmented and preset parameters; and setting the pixel values of the pixel points in the artifact area in the original image to be segmented to zero to obtain an artifact-suppressed image.
The preset parameter may include, but is not limited to, a preset radius, a preset distance, and the like. When the preset parameter is the preset radius, the artifact region may be determined according to the center of the original image and the preset radius, and the artifact region is a circular region at this time.
Illustratively, with the center of the original image as a reference, the pixel points in the preset radius area are set to be zero, so as to remove the interference of the catheter artifact. It should be noted that the preset radius needs to be larger than the catheter radius and smaller than the vessel radius, and the purpose of this setting is to: targeted coverage can be achieved by having the artifact region cover the catheter but not the vessel. The preset radius is specifically calculated as follows:
Figure BDA0003403622490000071
wherein R represents a preset radius; epsilon represents an adjustable parameter; width represents the Width of the original image to be segmented.
And S230, carrying out S-curve transformation processing on the artifact-suppressed image to obtain a contrast-enhanced image.
Specifically, the S-curve transformation process can enhance the contrast of the artifact-suppressed image, making edge features in the image more noticeable. In the embodiment of the present invention, the S-curve transformation process may be implemented by calling an S-curve transformation function.
S240, performing morphological processing on the contrast enhanced image to obtain an edge enhanced image.
The morphological processing is mainly used for extracting image components which are meaningful for expressing and describing the shape of the region from the image, so that the most essential shape characteristics of the target segmentation object, such as a boundary, a connected region and the like, can be grasped by subsequent extraction work.
In embodiments of the present invention, methods of morphological processing include, but are not limited to, dilation, erosion, open operations, closed operations, and the like. Specifically, morphological opening operation processing is carried out on the contrast enhancement image, wherein a structural operator of the opening operation processing uses a circular operator; further, performing maximum connected component extraction processing on the image after the opening operation processing is completed, wherein the maximum connected component extraction processing may be used to extract a maximum contour in the image, for example, an edge of the target segmentation area; further, the image after the maximum connected domain extraction processing is performed is subjected to closed operation processing, so that an edge enhanced image is obtained. It should be noted that, when the original image is a blood vessel ultrasound image, the obtained edge-enhanced image may be an adventitia image, and it is understood that the blood vessel includes an intima, an adventitia, and the like, the adventitia has a larger outline than the intima, and the blood vessel adventitia image may be obtained by extracting the maximum connected domain through morphological processing.
In some optional embodiments, the edge enhancement specific process may include: carrying out artifact suppression processing on the original image to be segmented to obtain an artifact suppressed image; carrying out S-curve transformation processing on the artifact-suppressed image to obtain a contrast-enhanced image; carrying out noise suppression processing on the contrast enhancement image to obtain a de-noised image; performing binary segmentation on the denoised image to obtain a binary image; and performing morphological processing on the contrast enhancement image binary image to obtain an edge enhancement image.
The noise suppression processing may be to perform image edge enhancement and noise suppression on the contrast-enhanced image through an anisotropic diffusion filtering algorithm, to further enhance edge characteristics, and the noise suppression processing may also select other similar edge enhancement filtering algorithms, which is not limited in this embodiment. The binary segmentation may be to binarize the denoised image by a maximum entropy method, and perform segmentation processing to obtain a binary image, and the binary segmentation method may also be an iterative optimal threshold algorithm, a maximum inter-class variance method, or the like, which is not limited in this embodiment. Through the edge enhancement processing flow, the influence of artifacts and noise can be effectively removed, the contrast of an image and the edge characteristics of a target segmentation object are improved, and convenience is brought to the subsequent extraction of edge points.
And S250, extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image.
And S260, determining a target segmentation image based on the target region edge points in the edge enhancement image.
For example, the embodiment of the present invention may adopt a least square method to fit the target edge points to obtain an elliptical segmentation edge line, and draw the elliptical segmentation edge line in the edge enhanced image to obtain the target segmentation image. Let the coordinates of the edge points of the target area be expressed as (x)i,yi) (i ═ 1, 2.. N), where N represents the number of edge points in the target region, and the objective function fitted according to the principle of least squares is:
Figure BDA0003403622490000091
a, B, C, D and E respectively represent different preset variables, and F represents an objective function; to minimize the objective function F, the following equation is satisfied:
Figure BDA0003403622490000092
solving the corresponding equation set according to the above formula in combination with the constraint conditions can obtain the corresponding equation solutions A, B, C, D, E, and then solving the coordinates (x) of the center of the circle of the corresponding ellipse according to the following formula0,y0) Major and minor axes (a, b), and a rotation angle θ.
Figure BDA0003403622490000101
According to the centre coordinates (x) of the ellipse0,y0) And major and minor axes (a, b), and a rotation angle θ, a segmentation edge line of an elliptical shape is rendered in the edge-enhanced image, resulting in a target segmentation image.
The embodiment of the invention provides an image segmentation method, which comprises the steps of obtaining an original image to be segmented, and carrying out artifact suppression treatment on the original image to be segmented to obtain an artifact suppressed image; carrying out S-curve transformation processing on the artifact-suppressed image to obtain a contrast-enhanced image; carrying out noise suppression processing on the contrast enhanced image to obtain a de-noised image; carrying out binary segmentation on the denoised image to obtain a binary image; the binary image of the contrast enhanced image is subjected to morphological processing to obtain an edge enhanced image, and the edge characteristics of the target segmentation object are improved through the various image preprocessing methods, so that subsequent edge point extraction is facilitated, and the effect of improving the image segmentation precision is achieved.
EXAMPLE III
Fig. 3 is a schematic flowchart of an image segmentation method according to a third embodiment of the present invention, and the third embodiment of the present invention may be combined with various alternatives in the foregoing embodiments. In this embodiment of the present invention, optionally, the performing edge point extraction on the edge-enhanced image to obtain edge points of a target area corresponding to each preset interval angle in the edge-enhanced image includes: for each preset interval angle, traversing pixel points in the current preset interval angle direction by taking the center of the edge enhancement image as a starting point, and if a first pixel point meeting preset conditions is detected in the current preset interval angle direction, taking the first pixel point as an initial edge point and finishing edge point extraction in the current preset interval angle direction; carrying out centroid search on each obtained initial edge point to obtain a centroid position; and determining the edge points of the target area based on a preset screening condition and the distance between the initial edge point and the centroid position.
As shown in fig. 3, the method of the embodiment of the present invention specifically includes the following steps:
and S310, acquiring an original image to be segmented.
And S320, performing edge enhancement processing on the original image to be segmented to obtain an edge enhanced image.
S330, traversing pixel points in the current preset interval angle direction by taking the center of the edge enhancement image as a starting point for each preset interval angle, and taking the first pixel point as an initial edge point and finishing the edge point extraction in the current preset interval angle direction if the first pixel point meeting preset conditions is detected in the current preset interval angle direction.
The preset condition may be that the pixel value of the pixel point is 1, and it can be understood that, in the binary image, if the pixel point with the pixel value of 1 is detected in the current preset interval angle direction, it indicates that the current pixel point has the edge feature of the target segmentation object, and the pixel point is used as an initial edge point, and the edge point extraction in the current preset interval angle direction is finished; if the pixel point with the pixel value of 0 is detected in the current preset interval angle direction, the current pixel point does not have the edge characteristics of the target segmentation object, the detection is continued along the current preset interval angle direction until the pixel point with the pixel value of 1 is detected, and the extraction of the edge point in the current preset interval angle direction is finished.
In some optional embodiments, the edge point extraction in each preset interval angle direction may be performed in sequence, that is, the edge point extraction in the current preset interval angle direction is completed, and the edge point extraction in the next preset interval angle direction is performed; in some optional embodiments, the edge point extraction in each preset interval angle direction may be performed simultaneously, and the extraction method may improve the extraction speed of the edge point.
On the basis of the above embodiment, after traversing the pixel points in the current preset interval angle direction, the method further includes: if no pixel point meeting the preset condition in the current preset interval angle direction is detected, calculating to obtain an initial edge point through the following formula:
Figure BDA0003403622490000121
Figure BDA0003403622490000122
wherein (X, y) represents the coordinates of the initial edge point, (X)0,Y0) And representing the coordinates of the central point of the edge enhancement image, and theta represents the included angle between the current preset interval angle direction and the horizontal direction. By passingThe calculation method can compensate the edge points under the condition that no pixel points meeting the preset condition exist in a certain preset interval angle direction, ensure the integrity of the edge contour points and facilitate the subsequent screening of the edge points and the drawing of the edge contour.
And S340, carrying out centroid search on each obtained initial edge point to obtain a centroid position.
Wherein, the centroid position can be the centroid coordinate position of the closed region formed by each initial edge point. The concrete process of the centroid search comprises the following steps: and obtaining the coordinate position of the centroid by weighted averaging the coordinate values of the initial edge points.
And S350, determining the edge points of the target area based on the preset screening condition and the distance between the initial edge point and the centroid position.
The preset screening condition may be a preset distance screening condition. Specifically, if the distance between the initial edge point and the centroid position meets a preset distance screening condition, reserving the current initial edge point and determining the current initial edge point as the edge point of the target area; and if the distance between the initial edge point and the centroid position does not meet the preset distance screening condition, removing the current initial edge point from the image.
On the basis of the above embodiment, the determining the edge point of the target area based on the preset screening condition and the distance between the initial edge point and the centroid position includes: if the distance between the initial edge point and the centroid position is within a preset threshold range, taking the initial edge point as a target area edge point; and if the distance between the initial edge point and the centroid position is not within a preset threshold range, setting the pixel value of the initial edge point to zero.
The preset threshold range may be a preset distance threshold range. Exemplarily, if the distance between the initial edge point and the centroid position is within a preset distance threshold range, taking the initial edge point as a target area edge point; and if the distance between the initial edge point and the centroid position is not within the preset distance threshold range, setting the pixel value of the initial edge point to zero, and removing the point from the image.
On the basis of the above embodiment, the preset threshold range includes a first preset threshold and a second preset threshold, where the first preset threshold is a product of the centroid distance mean and the first empirical value, and the second preset threshold is a product of the centroid distance mean and the second empirical value.
The first empirical value and the second empirical value may be specifically set according to requirements. For example, the preset filtering condition and the distance calculation formula between the initial edge point and the centroid position are as follows:
Figure BDA0003403622490000131
Figure BDA0003403622490000132
Figure BDA0003403622490000133
wherein (X, Y) represents the edge point of the target area, Dx,yRepresents the distance of the initial edge point (x, y) from the centroid location, (x)1,y1) Coordinates representing the centroid position, M represents the mean of all initial edge points from the centroid position, LowTh represents a first empirical threshold, HighTh represents a second empirical threshold, length (D)x,y) Indicates the total number of initial edge points, sum (D)x,y) Representing the sum of the distances of all the initial edge points from the centroid position.
And S360, determining a target segmentation image based on the target region edge points in the edge enhancement image.
The embodiment of the invention provides an image segmentation method, which is characterized in that for each preset interval angle, the center of an edge enhancement image is taken as a starting point, pixel points in the current preset interval angle direction are traversed, if a first pixel point meeting preset conditions is detected in the current preset interval angle direction, the first pixel point is taken as an initial edge point, and the extraction of the edge point in the current preset interval angle direction is finished. The method is simple and convenient, and can effectively extract the edge points of the target segmentation object; furthermore, centroid searching is carried out on each obtained initial edge point to obtain a centroid position, the edge point of the target area is determined based on the preset screening condition and the distance between the initial edge point and the centroid position, interference edge points can be effectively eliminated, real edge points are reserved, and therefore the accuracy of image segmentation is improved.
Example four
Fig. 4 is a schematic structural diagram of an image segmentation apparatus according to a fourth embodiment of the present invention, where the image segmentation apparatus provided in this embodiment may be implemented by software and/or hardware, and may be configured in a terminal and/or a server to implement the image segmentation method according to the fourth embodiment of the present invention. The device may specifically include: an image acquisition module 410, an enhancement processing module 420, an edge extraction module 430, and a target segmentation module 440.
The image obtaining module 410 is configured to obtain an original image to be segmented; an enhancement processing module 420, configured to perform edge enhancement processing on the original image to be segmented to obtain an edge-enhanced image; an edge extraction module 430, configured to perform edge point extraction on the edge-enhanced image to obtain edge points of a target area corresponding to each preset interval angle in the edge-enhanced image; and the target segmentation module 440 is used for determining a target segmentation image based on the target region edge points in the edge enhanced image.
The embodiment of the invention provides an image segmentation device, which is used for obtaining an original image to be segmented; the original image to be segmented is subjected to edge enhancement processing, so that an edge enhancement image of a target segmentation object which is more concerned can be obtained, and subsequent edge point extraction is facilitated; extracting edge points of the edge enhancement image in each preset interval angle direction, so that the edge points of the target area can be quickly determined; in addition, the target segmentation image is determined based on the edge point of the target area in the edge enhancement image, the whole image segmentation process does not need manual intervention, automatic segmentation of the target object is achieved, sample training is not needed, the image processing time can be greatly reduced, and the effect of improving the image segmentation speed is achieved.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the enhancement processing module 420 includes:
the suppression processing unit is used for carrying out artifact suppression processing on the original image to be segmented to obtain an artifact suppressed image;
the transformation processing unit is used for carrying out S-curve transformation processing on the artifact suppression image to obtain a contrast enhancement image;
and the morphology processing unit is used for performing morphology processing on the contrast enhanced image to obtain an edge enhanced image.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the suppression processing unit may be further configured to:
determining an artifact area based on the center of the original image to be segmented and preset parameters;
and setting the pixel values of the pixel points in the artifact area in the original image to be segmented to zero to obtain an artifact-suppressed image.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the edge extraction module 430 includes:
an initial edge point extracting unit, configured to traverse pixel points in a current preset interval angle direction with a center of the edge enhancement image as a starting point for each of all preset interval angles, and if a first pixel point satisfying a preset condition is detected in the current preset interval angle direction, take the first pixel point as an initial edge point, and end edge point extraction in the current preset interval angle direction;
the centroid searching unit is used for carrying out centroid searching on each obtained initial edge point to obtain a centroid position;
and the target edge point screening unit is used for determining the edge points of the target area based on preset screening conditions and the distance between the initial edge point and the centroid position.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the initial edge point extracting unit may be further configured to:
if no pixel point meeting the preset condition in the current preset interval angle direction is detected, calculating to obtain an initial edge point through the following formula:
Figure BDA0003403622490000161
Figure BDA0003403622490000162
wherein (X, y) represents the coordinates of the initial edge point, (X)0,Y0) And representing the coordinates of the central point of the edge enhancement image, and theta represents the included angle between the current preset interval angle direction and the horizontal direction.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the target edge point screening unit may be further configured to:
if the distance between the initial edge point and the centroid position is within a preset threshold range, taking the initial edge point as a target area edge point;
and if the distance between the initial edge point and the centroid position is not within a preset threshold range, setting the pixel value of the initial edge point to zero.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the preset threshold range includes a first preset threshold and a second preset threshold, where the first preset threshold is a product of the centroid distance mean and a first empirical value, and the second preset threshold is a product of the centroid distance mean and a second empirical value.
The image segmentation device provided by the embodiment of the invention can execute the image segmentation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 36 having a set (at least one) of program modules 26 may be stored, for example, in system memory 28, such program modules 26 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 26 generally perform the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown in FIG. 5, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement an image segmentation method provided by the present embodiment.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for image segmentation, the method including:
acquiring an original image to be segmented;
performing edge enhancement processing on the original image to be segmented to obtain an edge enhanced image;
extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image;
and determining a target segmentation image based on the target region edge points in the edge enhancement image.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An image segmentation method, comprising:
acquiring an original image to be segmented;
performing edge enhancement processing on the original image to be segmented to obtain an edge enhanced image;
extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image;
and determining a target segmentation image based on the target region edge points in the edge enhancement image.
2. The method according to claim 1, wherein the edge enhancement processing the original image to be segmented to obtain an edge enhanced image comprises:
carrying out artifact suppression processing on the original image to be segmented to obtain an artifact suppressed image;
carrying out S-curve transformation processing on the artifact-suppressed image to obtain a contrast-enhanced image;
and carrying out morphological processing on the contrast enhanced image to obtain an edge enhanced image.
3. The method according to claim 2, wherein the performing artifact suppression processing on the original image to be segmented to obtain an artifact suppressed image specifically includes:
determining an artifact area based on the center of the original image to be segmented and preset parameters;
and setting the pixel values of the pixel points in the artifact area in the original image to be segmented to zero to obtain an artifact-suppressed image.
4. The method according to claim 1, wherein the extracting the edge points of the edge-enhanced image to obtain the edge points of the target area corresponding to each preset interval angle in the edge-enhanced image comprises:
for each preset interval angle, traversing pixel points in the current preset interval angle direction by taking the center of the edge enhancement image as a starting point, and if a first pixel point meeting preset conditions is detected in the current preset interval angle direction, taking the first pixel point as an initial edge point and finishing edge point extraction in the current preset interval angle direction;
carrying out centroid search on each obtained initial edge point to obtain a centroid position;
and determining the edge points of the target area based on a preset screening condition and the distance between the initial edge point and the centroid position.
5. The method of claim 4, wherein after traversing the pixel points in the current preset angular interval direction, the method further comprises:
if no pixel point meeting the preset condition in the current preset interval angle direction is detected, calculating to obtain an initial edge point through the following formula:
Figure FDA0003403622480000021
Figure FDA0003403622480000022
wherein (X, y) represents the coordinates of the initial edge point, (X)0,Y0) And representing the coordinates of the central point of the edge enhancement image, and theta represents the included angle between the current preset interval angle direction and the horizontal direction.
6. The method according to claim 4, wherein the determining the edge points of the target area based on the preset screening condition and the distance between the initial edge points and the centroid position comprises:
if the distance between the initial edge point and the centroid position is within a preset threshold range, taking the initial edge point as a target area edge point;
and if the distance between the initial edge point and the centroid position is not within a preset threshold range, setting the pixel value of the initial edge point to zero.
7. The method according to claim 6, wherein the preset threshold range comprises a first preset threshold and a second preset threshold, wherein the first preset threshold is a product of the centroid distance mean and a first empirical value, and the second preset threshold is a product of the centroid distance mean and a second empirical value.
8. An image segmentation apparatus, comprising:
the image acquisition module is used for acquiring an original image to be segmented;
the enhancement processing module is used for carrying out edge enhancement processing on the original image to be segmented to obtain an edge enhanced image;
the edge extraction module is used for extracting edge points of the edge enhancement image to obtain edge points of a target area corresponding to each preset interval angle in the edge enhancement image;
and the target segmentation module is used for determining a target segmentation image based on the target region edge points in the edge enhancement image.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the image segmentation method as claimed in any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the image segmentation method as claimed in any one of claims 1 to 7 when executed by a computer processor.
CN202111504470.8A 2021-12-10 2021-12-10 Image segmentation method and device, electronic equipment and storage medium Pending CN114170258A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111504470.8A CN114170258A (en) 2021-12-10 2021-12-10 Image segmentation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111504470.8A CN114170258A (en) 2021-12-10 2021-12-10 Image segmentation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114170258A true CN114170258A (en) 2022-03-11

Family

ID=80485249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111504470.8A Pending CN114170258A (en) 2021-12-10 2021-12-10 Image segmentation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114170258A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619811A (en) * 2022-12-16 2023-01-17 北京远舢智能科技有限公司 Cigarette quantity determining method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964118A (en) * 2010-09-30 2011-02-02 华北电力大学(保定) Three-dimensional segmentation method for intravascular ultrasound image sequence
CN107133959A (en) * 2017-06-12 2017-09-05 上海交通大学 A kind of quick vessel borders three-dimensional dividing method and system
CN109846513A (en) * 2018-12-18 2019-06-07 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic imaging method, system and image measuring method, processing system and medium
CN110349203A (en) * 2019-07-15 2019-10-18 深圳市威尔德医疗电子有限公司 A kind of measurement method of ultrasonic device and its ultrasound image medium vessels diameter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964118A (en) * 2010-09-30 2011-02-02 华北电力大学(保定) Three-dimensional segmentation method for intravascular ultrasound image sequence
CN107133959A (en) * 2017-06-12 2017-09-05 上海交通大学 A kind of quick vessel borders three-dimensional dividing method and system
CN109846513A (en) * 2018-12-18 2019-06-07 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic imaging method, system and image measuring method, processing system and medium
CN110349203A (en) * 2019-07-15 2019-10-18 深圳市威尔德医疗电子有限公司 A kind of measurement method of ultrasonic device and its ultrasound image medium vessels diameter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619811A (en) * 2022-12-16 2023-01-17 北京远舢智能科技有限公司 Cigarette quantity determining method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109410221B (en) Cerebral perfusion image segmentation method, device, server and storage medium
CN110176010B (en) Image detection method, device, equipment and storage medium
CN112465834B (en) Blood vessel segmentation method and device
CN107292835B (en) Method and device for automatically vectorizing retinal blood vessels of fundus image
CN111640124B (en) Blood vessel extraction method, device, equipment and storage medium
CN113706473B (en) Method for determining long and short axes of focus area in ultrasonic image and ultrasonic equipment
CN116503607B (en) CT image segmentation method and system based on deep learning
CN114693710A (en) Blood vessel lumen intimal contour extraction method and device, ultrasonic equipment and storage medium
CN109919953B (en) Method, system and apparatus for carotid intima-media thickness measurement
CN114170258A (en) Image segmentation method and device, electronic equipment and storage medium
CN113450329B (en) Microcirculation image blood vessel branch erythrocyte flow rate calculation method and system
CN113888566A (en) Target contour curve determining method and device, electronic equipment and storage medium
CN112651984A (en) Blood vessel lumen intimal contour extraction method and device, ultrasonic equipment and storage medium
US20240005510A1 (en) Method and apparatus of nidus segmentation, electronic device, and storage medium
CN112634309A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110063753B (en) Method and device for measuring head circumference of fetus in ultrasonic image
CN113192099B (en) Tissue extraction method, device, equipment and medium
CN111539926B (en) Image detection method and device
CN115482261A (en) Blood vessel registration method, device, electronic equipment and storage medium
WO2022127318A1 (en) Scanning positioning method and apparatus, storage medium and electronic device
CN115375583A (en) PET parameter image enhancement method, device, equipment and storage medium
CN111275719B (en) Calcification false positive recognition method, device, terminal and medium and model training method and device
CN112102313A (en) Support detection method and device and storage medium
CN112137693A (en) Imaging method and device for four-dimensional ultrasonic guided puncture
CN112950734B (en) Coronary reconstruction method, device, electronic equipment 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