CN108305268B - Image segmentation method and device - Google Patents

Image segmentation method and device Download PDF

Info

Publication number
CN108305268B
CN108305268B CN201810005450.8A CN201810005450A CN108305268B CN 108305268 B CN108305268 B CN 108305268B CN 201810005450 A CN201810005450 A CN 201810005450A CN 108305268 B CN108305268 B CN 108305268B
Authority
CN
China
Prior art keywords
image
segmented
entropy
pixel point
segmentation
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.)
Active
Application number
CN201810005450.8A
Other languages
Chinese (zh)
Other versions
CN108305268A (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.)
Neusoft Medical Systems Co Ltd
Original Assignee
Neusoft Medical Systems 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 Neusoft Medical Systems Co Ltd filed Critical Neusoft Medical Systems Co Ltd
Priority to CN201810005450.8A priority Critical patent/CN108305268B/en
Publication of CN108305268A publication Critical patent/CN108305268A/en
Application granted granted Critical
Publication of CN108305268B publication Critical patent/CN108305268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation

Landscapes

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

Abstract

The application discloses an image segmentation method and device, and the method comprises the following steps: firstly, acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented; converting an image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point; closing an unclosed area of an object to be segmented in the entropy image to obtain an image before segmentation; and segmenting the object to be segmented from the image before segmentation. Therefore, the image to be segmented is converted into the entropy image by utilizing the information entropy, and then the contour of the object to be segmented in the image is subjected to contour closing treatment.

Description

Image segmentation method and device
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image segmentation method and an image segmentation device.
Background
The purpose of medical image segmentation is to separate an object of interest (e.g. an organ) from a medical image by extracting features of the medical image, and to analyze and calculate information on the anatomy, pathology, physiology, physics, etc. of the object of interest, and a correct segmentation result can help a doctor to give a correct diagnosis result. Since the actual acquisition conditions of medical images often differ, the medical image data is very complex, which makes the medical image segmentation have a certain complexity. The selection of the medical image segmentation method depends on the particularity of the image itself, the imaging mode of the image, and human factors (such as motion of human body) and nonresistance factors (such as device noise) which affect the imaging quality of the image, and these factors can affect the subsequent image segmentation to a great extent.
Currently, widely used medical image segmentation methods at home and abroad include region-based segmentation methods, edge-based segmentation methods, segmentation methods combined with specific theoretical tools (such as artificial neural network methods, deformable model methods), wavelet transform-based segmentation methods, statistics-based segmentation methods, mathematical morphology-based segmentation methods, region-growth-based segmentation methods, markov random field-based segmentation methods, fuzzy theory-based segmentation methods, and active contour model-based segmentation methods, among others.
However, each of the above segmentation methods can achieve an ideal segmentation effect on the basis of an image which has no degradation in zero noise, good contour closure of an object to be segmented, and obvious gray level change, but when the quality of a medical image is poor, the methods show a poor result, or the segmentation result is inaccurate or cannot be segmented. That is, the quality of the medical image before segmentation is the key factor for determining the quality of the segmentation effect, so that the original medical image needs to be preprocessed before image segmentation, and the factors influencing the segmentation effect are eliminated as much as possible, which is a key step for obtaining an ideal segmentation effect.
Therefore, researchers propose that the original image is subjected to binarization processing, and the edge region of an interested object in the original image is subjected to optimization processing by combining mathematical binary morphology, at the moment, the gray value of each pixel point on the image is 0 or 255, and image segmentation is performed based on the gray value difference. However, the binarized image cannot maintain information hidden in small variations among pixels, which causes a shift in the position of the edge of the object of interest in the image (i.e., inaccurate edge positioning), resulting in inaccurate segmentation results.
Disclosure of Invention
An embodiment of the present invention provides an image segmentation method and an image segmentation apparatus, which can improve accuracy of an image segmentation result.
The embodiment of the application provides an image segmentation method, which comprises the following steps:
acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented;
converting the image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point;
closing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation;
and segmenting the object to be segmented from the image before segmentation.
Optionally, the converting the image to be segmented into an entropy image includes:
taking each pixel point in the image to be segmented as a target pixel point, and framing the target pixel point in the image to be segmented by utilizing a patch block with a preset size;
calculating information entropy corresponding to the target pixel point according to the gray value of each pixel point in the patch block;
judging whether at least one pixel region exists or not and information entropy corresponding to each pixel point in the pixel region is zero;
if so, increasing the size of the patch block, and continuously executing the step of framing the target pixel point in the image to be segmented;
and if not, generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented.
Optionally, the closing the unclosed region of the object to be segmented in the entropy image includes:
and closing the unclosed region of the object to be segmented in the entropy image by utilizing opening operation or closing operation of mathematical morphology.
Optionally, the segmenting the object to be segmented from the pre-segmentation image includes:
and adopting a segmentation method based on the active contour model to segment the object to be segmented from the image before segmentation.
Optionally, after the acquiring the image to be segmented, the method includes:
denoising the image to be segmented by adopting a shear wave denoising mode to obtain a denoised image to be segmented.
Optionally, after obtaining the denoised image to be segmented, the method further includes:
and performing edge enhancement on the denoised image to be segmented by adopting an impact filter.
Optionally, after obtaining the pre-segmentation image, the method further includes:
and performing gray stretching on the image before segmentation.
An embodiment of the present application further provides an image segmentation apparatus, including:
the image acquisition unit is used for acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented;
the image conversion unit is used for converting the image to be segmented into an entropy image, and the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point;
the edge sealing unit is used for sealing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation;
and the image segmentation unit is used for segmenting the object to be segmented from the image before segmentation.
Optionally, the image conversion unit includes:
a patch frame selecting subunit, configured to select each pixel point in the image to be segmented as a target pixel point, and frame the target pixel point in the image to be segmented by using a patch block of a preset size;
an entropy calculation subunit, configured to calculate, according to the gray value of each pixel point in the patch block, an information entropy corresponding to the target pixel point;
the entropy judgment subunit is used for judging whether at least one pixel region exists or not and the information entropy corresponding to each pixel point in the pixel region is zero;
the entropy value recalculating unit is used for increasing the size of the patch block and triggering the patch frame selecting subunit to frame select the target pixel point in the image to be segmented if at least one pixel region exists and the information entropy corresponding to each pixel point in the pixel region is zero;
and the image conversion subunit is used for generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented if at least one pixel area does not exist and the information entropy corresponding to each pixel point in the pixel area is zero.
An embodiment of the present application further provides an image segmentation apparatus, including: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs including instructions, which when executed by the processor, cause the processor to perform the method of any of the above.
The image segmentation method and device provided by the embodiment of the application comprise the steps of firstly obtaining an image to be segmented, wherein the image to be segmented comprises an object to be segmented; converting an image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point; closing an unclosed area of an object to be segmented in the entropy image to obtain an image before segmentation; and segmenting the object to be segmented from the image before segmentation. Therefore, the image to be segmented is converted into the entropy image by utilizing the information entropy, and then the contour of the object to be segmented in the image is subjected to contour closing treatment.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an image segmentation method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an unsealed image according to a first embodiment of the present application;
fig. 3 is a schematic flowchart of an image segmentation method according to a second embodiment of the present application;
fig. 4 is a schematic diagram of an entropy image conversion process provided in the second embodiment of the present application;
fig. 5 is a schematic diagram of a morphological processing image provided in the second embodiment of the present application;
fig. 6A is a schematic diagram of a segmentation process provided in the second embodiment of the present application;
fig. 6B is a second schematic diagram of the segmentation process provided in the second embodiment of the present application;
fig. 7A is a schematic diagram illustrating an outside-in search method according to a second embodiment of the present application;
FIG. 7B is a schematic diagram illustrating a searching method from inside to outside according to a second embodiment of the present application;
fig. 7C is a schematic diagram of a bidirectional searching method according to a second embodiment of the present application;
fig. 8 is a schematic flowchart of an image segmentation method according to a third embodiment of the present application;
fig. 9 is a schematic composition diagram of an image segmentation apparatus according to a fourth embodiment of the present application;
fig. 10 is a schematic hardware structure diagram of an image segmentation apparatus according to a fifth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, the wide application of the advanced imaging technology in medicine greatly improves the quality of medical services, image segmentation plays an increasingly important role in the field of medical imaging, and the application of the medical image segmentation in clinical diagnosis, pathological analysis, three-dimensional reproduction of human organs and the like is very important. Due to the fact that clinical application has a large requirement on the accuracy of medical image segmentation, although various segmentation algorithms exist, the accuracy of a segmentation result is not high enough. Specifically, each of the existing segmentation methods can achieve an ideal segmentation effect on the basis of an image which has no degradation in zero noise, good contour closure of an object to be segmented, and obvious gray level change, but when the quality of a medical image is poor, the methods show poor results, or the segmentation result is inaccurate or cannot be segmented. That is, the quality of the medical image before segmentation is the key factor for determining the quality of the segmentation effect, so that the original image needs to be preprocessed before image segmentation, and the factor affecting the segmentation effect is eliminated as much as possible, which is a key step for obtaining an ideal segmentation effect.
Therefore, the embodiment of the application provides an image segmentation method, which converts an original image to be segmented into an entropy image, and then performs closed restoration on the contour of an object to be segmented in the entropy image to obtain an image before segmentation, so that preprocessing work before segmentation is completed.
In the preprocessing mode, firstly, the entropy image can keep the information which is hidden in small changes among pixels, namely the edge information of an object to be segmented in the image can be kept, the edge position of the image cannot be shifted as the edge position of the existing binary image, and compared with the original image, the entropy image can highlight the edge position of the object to be segmented and can play a certain role in inhibiting image noise; and secondly, performing edge sealing treatment on the object to be segmented in the entropy image, so as to further clarify the segmentation position. Based on the preprocessing result, when the image segmentation is carried out, the segmentation position can be more accurately positioned, so that the image segmentation is accurately realized.
The image segmentation method provided by the embodiment of the present application is specifically described below with reference to fig. 1 to 8.
Example one
Referring to fig. 1, a flowchart of an image segmentation method provided in this embodiment is shown. The image segmentation method comprises the following steps:
s101: and acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented.
It should be noted that, for an unprocessed original image, if the original image includes an object to be segmented that a user desires to segment, the entire original image may be used as the image to be segmented, or a partial region in the original image (for example, the region may be manually cut by using a drawing tool) may be used as the image to be segmented, as long as the image to be segmented includes the object to be segmented.
It should be further noted that the image to be segmented may be a medical image or other types of images, which is not limited in this embodiment. For example, when the image to be segmented is a medical image, the object to be segmented in the image to be segmented may be a human organ, such as a heart.
S102: and converting the image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point.
It should be noted that the image to be segmented is actually an intensity image, and the gray intensity value of each pixel point is described, which cannot highlight the edge feature of the object to be segmented in the image. In the embodiment, the image to be segmented is converted into the entropy image, the entropy image is actually a structural image, and the description is not a gray intensity value but a structural composition in the image, so that the entropy image can keep information which is hidden in small changes among pixels, the image edge of the object to be segmented can be well shown, and the image segmentation focuses on the contour information of the object to be segmented, so that preparation is made for accurately segmenting the image subsequently. Further, the entropy image is not a binary image, and the gray scale change characteristics of the image to be segmented are also kept.
It should also be noted that the entropy image can also suppress the interference of image noise to some extent.
S103: and closing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation.
In practical applications, when an object to be segmented is non-closed in an image, especially when an unclosed area is large, a problem that the object to be segmented is not completely segmented occurs when the image is segmented. Therefore, the embodiment can perform the sealing processing on the unclosed region of the object to be segmented, thereby obtaining the image before segmentation.
For example, referring to the schematic diagram of the unclosed image shown in fig. 2, assuming that the image on the left side of fig. 2 is the object to be segmented in the entropy image, the image is unclosed, and the image is subjected to the occlusion processing to obtain the occluded object to be segmented on the right side of fig. 2.
S104: and segmenting the object to be segmented from the image before segmentation.
Continuing with the example of fig. 2, a segmentation algorithm is used to search for a closed edge of the object to be segmented from the pre-segmentation image, and then the image segmentation is performed based on the closed edge to segment the object to be segmented. It should be noted that any existing image segmentation algorithm may be adopted in the present embodiment, and the present embodiment does not limit this.
In summary, in the image segmentation method provided in this embodiment, an image to be segmented is obtained first, where the image to be segmented includes an object to be segmented; converting an image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point; closing an unclosed area of an object to be segmented in the entropy image to obtain an image before segmentation; and segmenting the object to be segmented from the image before segmentation. Therefore, the image to be segmented is converted into the entropy image by utilizing the information entropy, and then the contour of the object to be segmented in the image is subjected to contour closing treatment.
Example two
Fig. 3 is a schematic flow chart of an image segmentation method according to the second embodiment. The image segmentation method comprises the following steps:
s301: and acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented.
It should be noted that step S301 is the same as step S101 in the first embodiment, and for related description, reference is made to the first embodiment, which is not repeated herein.
The following steps S302 to S306 are specific implementations of S102 in the first embodiment.
S302: and framing the target pixel points in the image to be segmented by utilizing the patch blocks with preset sizes by taking each pixel point in the image to be segmented as the target pixel points.
For each pixel point in the image to be segmented, a patch block (for example, a square patch block) with a preset size is used to frame each pixel point in the image to be segmented, and the positions of each pixel point in the patch block are the same (for example, all the pixel points are located at the center position of the patch block).
Referring to the schematic diagram of the entropy image conversion process shown in fig. 4, two different pixel points in the left image to be segmented are taken as an example, and the two pixel points are respectively located at the center of the patch block.
S303: and calculating the information entropy corresponding to the target pixel point according to the gray value of each pixel point in the patch block.
For the patch block where the target pixel point is located, a corresponding gray level histogram (such as the histogram shown in fig. 4) is calculated based on the gray level value of each pixel point in the patch block. The gray level histogram is a function of gray level distribution, is statistics of gray level distribution in an image, indicates the number of pixels having a certain gray level in the image, and reflects the frequency of occurrence of a certain gray level in the image.
Then, according to the gray level probability statistical result of the gray level histogram, calculating the information entropy corresponding to the target pixel point, wherein the information entropy is also called shannon entropy, and the shannon entropy calculation formula is as follows:
Figure BDA0001538478120000081
wherein, i is 1, 2 … … N, N is the total number of pixel points in the image to be divided; and Y is equal to i, the corresponding patch block region when the ith pixel point is taken as the target pixel point is represented, and p represents the density function of the variable Y.
S304: and judging whether at least one pixel region exists and the information entropy corresponding to each pixel point in the pixel region is zero, if so, executing S305, and if not, executing S306.
S305: and increasing the size of the patch block, and continuing to execute the step of framing the target pixel points in the image to be segmented in the step S302 by using the increased patch block.
S306: and generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented.
Regarding steps S304-S306, it should be noted that when the patch block is too large, the boundary of the object to be segmented in the final entropy image may be blurred; when the patch block is too small, the entropy of information corresponding to a plurality of continuous pixel points may be zero, so that a boundary line not belonging to an object to be segmented occurs.
In this embodiment, in order to avoid the boundary ambiguity of the object to be segmented, the initial size of the patch block may not be selected too large, but in order to avoid the interference caused by the patch block being too small, the initial patch block with a relatively small size may be selected, and then the current patch block is continuously adjusted according to the calculated entropy.
Therefore, after the information entropy of each pixel point is obtained by the calculation in S303, it is determined whether one or more special pixel regions exist in S304, where the information entropy corresponding to the pixel point in each special pixel region is zero; if yes, the current patch block is small, the size of the current patch block is increased through S305, and the information entropy of each pixel point is recalculated; otherwise, it is stated that the current patch block is appropriate, and then an entropy image, such as the entropy image shown in fig. 4, may be generated through S306.
S307: and closing the unclosed region of the object to be segmented in the entropy image by utilizing opening operation or closing operation of mathematical morphology to obtain an image before segmentation.
In this embodiment, the entropy image may be processed by mathematical morphological open-close operation, and the contour of the object to be segmented in the entropy image is subjected to closing processing, that is, the unclosed parts in the contour are connected to form a closed contour.
Mathematical morphology refers to the science of shape and structure, and in the field of image processing, is a method of analyzing the inherent geometry in an image. Specifically, a structural element with a certain shape and size is selected, and then geometric features similar to the structural element in shape and size in the entropy image can be retained through morphological operation, and the rest features are filtered out.
By adopting mathematical morphology open-close operation, the image contour of the object to be segmented in the entropy image can be repaired, and meanwhile, image noise can be restrained, and interference of other tissue edges in the entropy image on the object to be segmented can be reduced.
For the sake of understanding, assume that a is the entropy image and B is a preselected structural element, and the mathematical morphology opening and closing operations will be described below.
The morphological opening operation means that A is eroded by B and then expanded by B, i.e. the morphological opening operation of A by B can be written as
Figure BDA0001538478120000091
Figure BDA0001538478120000092
The function of the morphological opening operation is as follows: the object region in A which can not contain the structural element B is completely deleted, the outline of the object is smoothed, narrow connection is broken, and a fine protruding part is removed. For example, as shown in the diagram of the morphologically processed image shown in fig. 5, the image (b) is obtained after the morphological opening operation in the image (a).
The morphological closing operation means that A is expanded by B and then corroded by B, namely the morphological closing operation of A by B can be written as A.B:
Figure BDA0001538478120000093
unlike morphological open operations, morphological close operations typically connect narrow gaps in an image to form elongated bends and fill holes smaller than the structuring elements. For example, as shown in fig. 5, image (c) is obtained by performing a morphological closing operation on image (a), and image (d) is obtained by performing a morphological closing operation on image (b).
S308: and adopting a segmentation method based on the active contour model to segment the object to be segmented from the image before segmentation.
Based on the segmentation method of the active contour model, the active contour is defined as a curve which can be described as a two-dimensional space image plane in geometry, each point on the curve is called as a snake point, and the whole contour is formed by connecting all the snake points by straight lines or curves. Thus, the whole contour can be represented by the snake points only, and the deformation of the active contour can be completed by the movement of the snake points, namely, the active contour is pushed to move towards the edge of the object to be segmented by the external force under the action of external energy (external force) and internal energy (internal force), the internal force keeps the smoothness and topology of the active contour, and when the snake points reach the equilibrium position (corresponding to the minimum energy at this time), the active contour converges to the edge of the object to be segmented.
In particular, the active contour is defined as a parameterized curve that can be geometrically described as a two-dimensional spatial image plane (x, y):
r(s)=(x(s),y(s)) (4)
wherein, each point r(s) on the curve is called as a snake point, each snake point is represented by the coordinates (x(s), y (s)) of the snake point in the image, and the whole contour is formed by connecting the snake points by straight lines or curves. Thus, the entire contour can be represented by the snake points only, and the deformation of the active contour can be completed by the movement of the snake points.
The energy function of the active contour model completely defines the deformation behavior of the active contour model, and the energy of each snake point in the active contour is defined as Esnake
Esnake=Eint+Eext (5)
Wherein E isintTo correspond to the internal energy at the snake locus, EextCorresponding to the external energy at the snake site.
When the snake point reaches the equilibrium position (corresponding to the minimum energy), the active contour converges to the edge of the object to be segmented, and then image segmentation is realized.
When the active contour model, that is, the snake model, is used to perform image segmentation by using snake algorithm, the segmentation effect will now be exemplified: when the snake algorithm is adopted and the algorithms are iterated 300 times, referring to the schematic diagram of the segmentation process shown in fig. 6A, the right image of fig. 6A is the result of segmenting the object to be segmented in the image to be segmented, i.e., the gray image, and the object to be segmented is not completely segmented; referring to the schematic diagram of the segmentation process shown in fig. 6B, the diagram on the right side of fig. 6B is the result of segmenting the object to be segmented in the entropy image, and the object to be segmented can be completely segmented. Therefore, the image segmentation is carried out on the basis of the entropy image, and a better segmentation effect can be obtained.
More specifically, when the snake algorithm is used for image segmentation, the following segmentation methods can be adopted:
one segmentation method is an outside-in search segmentation method, which is suitable for a large-outline object to be segmented, and the object to be segmented has no interferents on the outside and more interferents on the inside. The other segmentation method is a segmentation method of searching from inside to outside, and the segmentation method is suitable for a small-outline object to be segmented, and the inside of the object to be segmented has no interference objects and more external interference objects.
The present embodiment may specifically adopt a GVF force field-based active contour model to realize image segmentation, and the GVF active contour segmentation algorithm has a large attraction range, and can improve the convergence of the deformation of the deformed contour to the boundary notch.
For example, referring to the schematic diagram of the outward-inward searching method shown in fig. 7A, the left side in the diagram is the object to be segmented, an initial active contour may be set outside the object to be segmented, the center of the initial active contour is the center of the object to be segmented, and the initial active contour gradually deforms and finally converges to the edge of the object to be segmented.
For another example, referring to the schematic diagram of the searching manner from inside to outside shown in fig. 7B, the left side in the diagram is the object to be segmented, an initial active contour may be set inside the object to be segmented, the center of the initial active contour is the center of the object to be segmented, and the initial active contour gradually deforms and finally converges to the edge of the object to be segmented.
For another example, referring to the schematic diagram of the bidirectional searching method shown in fig. 7C, the left side in the diagram is the object to be segmented, and the center of the initial active contour is not the center of the object to be segmented, so that the upper half of the initial active contour is searched from outside to inside, the lower half of the initial active contour is searched from inside to outside, and the initial active contour gradually deforms and finally converges to the edge of the object to be segmented.
The segmentation processing is carried out on the object to be segmented by adopting the GVF active contour segmentation algorithm, and the method has the advantages that the position of the initial active contour can be random, and the algorithm searches according to the contour features of the region of interest and finally segments an accurate contour position.
EXAMPLE III
Fig. 8 is a schematic flow chart of an image segmentation method provided in the third embodiment. The image segmentation method comprises the following steps:
s801: and acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented.
It should be noted that step S801 is the same as step S101 in the first embodiment, and please refer to the first embodiment for related description, which is not repeated herein.
S802: denoising the image to be segmented by adopting a shear wave denoising mode to obtain a denoised image to be segmented.
For the image to be segmented, noise is inevitably brought by random disturbance of electronic devices in an image generation device (such as a medical image device) during the process of acquiring image data and the process of generating the image. Noise is taken as a high-frequency component in an image, which is a troublesome problem in an image processing process, and can cause that many image processing algorithms cannot be normally executed or an ideal effect cannot be achieved, while image segmentation mainly depends on the edge characteristics of an object to be segmented, and the edge characteristics and the noise both belong to the high-frequency component of the image, so that the noise can bring great interference to the image segmentation, and therefore, before the image segmentation, the image to be segmented needs to be denoised.
However, in general, noise removal also results in loss of edge information, in practical applications, the wavelet denoising effect is good, and with respect to a specific denoising method in the wavelet denoising method, namely a shear wave denoising method, the denoising method can perform denoising processing on the premise of retaining image detail components as much as possible, so as to maintain the edge characteristics of an image as much as possible.
S803: and performing edge enhancement on the denoised image to be segmented by adopting an impact filter.
The filtering process is equivalent to the process of edge enhancement and deblurring of the image. The impact filter is an algorithm for image enhancement, the theoretical basis of the algorithm is hyperbolic equation theory and monotonic rule, the impact filter can be adopted in the embodiment, the edge of an object to be segmented in an image to be segmented is predicted, the image edge of the image is enhanced, and after the image is enhanced, severe gray level jump can be formed at the original position of the image edge, so that the effect of sharpening the image edge is achieved, and the detail information and the position information of the image edge can be reserved.
Specifically, the mathematical expression of the impulse filter is:
Figure BDA0001538478120000121
wherein η is the direction of the gradient image ^ I; sign (·) is a sign function; | | · | is a euclidean norm; t is the number of iterations; i is0And taking the image as an observation image (as an initial value of iteration), namely the image to be segmented after denoising.
Further, in this embodiment, the first derivation formula in the above formula (6) may be replaced by the following formula (7), so as to obtain an improved impulse filter (i.e., a complex field impulse filter-complex diffusion impulse filter model), and the formula (7) is used to perform edge enhancement on the denoised image to be segmented, so that a more ideal image enhancement effect is achieved.
Figure BDA0001538478120000131
Wherein the content of the first and second substances,
Figure BDA0001538478120000132
is a complex variable
Figure BDA0001538478120000133
An imaginary part of (d); λ and
Figure BDA0001538478120000134
respectively representing a complex scalar (i.e., the imaginary part of the second derivative of image I in the η direction) and a real scalar (i.e., the real part of the second derivative of image I in the ξ direction); i isηηAnd IξξRespectively representing the second derivatives of the image I in the eta and xi directions; θ is an angle close to 0; a is an ordinary number.
S804: and converting the image to be segmented after edge enhancement into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point.
S805: and closing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation.
It should be noted that steps S804 and S805 are the same as steps S102 and S103 in the first embodiment, respectively, and for related description, reference is made to the first embodiment, which is not repeated herein.
S806: and performing gray stretching on the image before segmentation.
It should be noted that, by performing gray stretching on the image before segmentation, the difference between the edge of the object to be segmented and the image background can be further improved, and then performing image segmentation on the basis, the segmentation effect will be more accurate.
S807: and segmenting the object to be segmented from the image before segmentation.
It should be noted that step S807 is the same as step S104 in the first embodiment, and reference is made to the first embodiment for related description, which is not repeated herein.
Example four
Referring to fig. 9, a schematic composition diagram of an image segmentation apparatus according to the fourth embodiment is shown. The image segmentation apparatus 900 includes:
an image obtaining unit 901, configured to obtain an image to be segmented, where the image to be segmented includes an object to be segmented;
an image conversion unit 902, configured to convert the image to be segmented into an entropy image, where a pixel value of each pixel point of the entropy image is an information entropy corresponding to the pixel point;
an edge sealing unit 903, configured to seal an unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation;
an image segmentation unit 904, configured to segment the object to be segmented from the pre-segmentation image.
In one embodiment of the present application, the image conversion unit 902 includes:
a patch frame selecting subunit, configured to select each pixel point in the image to be segmented as a target pixel point, and frame the target pixel point in the image to be segmented by using a patch block of a preset size;
an entropy calculation subunit, configured to calculate, according to the gray value of each pixel point in the patch block, an information entropy corresponding to the target pixel point;
the entropy judgment subunit is used for judging whether at least one pixel region exists or not and the information entropy corresponding to each pixel point in the pixel region is zero;
the entropy value recalculating unit is used for increasing the size of the patch block and triggering the patch frame selecting subunit to frame select the target pixel point in the image to be segmented if at least one pixel region exists and the information entropy corresponding to each pixel point in the pixel region is zero;
and the image conversion subunit is used for generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented if at least one pixel area does not exist and the information entropy corresponding to each pixel point in the pixel area is zero.
In an embodiment of the present application, the edge closing unit 903 is specifically configured to close an unclosed region of the object to be segmented in the entropy image by using an opening operation or a closing operation of mathematical morphology.
In an embodiment of the present application, the image segmentation unit 904 is specifically configured to segment the object to be segmented from the pre-segmentation image by using a segmentation method based on an active contour model.
In one embodiment of the present application, the apparatus 900 further comprises:
the image denoising unit is configured to denoise the image to be segmented by using a shear wave denoising method after the image to be segmented is acquired by the image acquisition unit 901, so as to obtain the denoised image to be segmented.
In one embodiment of the present application, the apparatus 900 further comprises:
and the edge enhancement unit is used for performing edge enhancement on the denoised image to be segmented by adopting an impact filter after the image denoising unit obtains the denoised image to be segmented.
In one embodiment of the present application, the apparatus 900 further comprises:
and a gray stretching unit, configured to perform gray stretching on the pre-segmentation image after the edge closing unit 903 obtains the pre-segmentation image.
EXAMPLE five
Referring to fig. 10, a schematic diagram of a hardware structure of an image segmentation apparatus provided in the fifth embodiment, the system 1000 includes a memory 1001 and a receiver 1002, and a processor 1003 respectively connected to the memory 1001 and the receiver 1002, the memory 1001 is used for storing a set of program instructions, and the processor 1003 is used for calling the program instructions stored in the memory 1001 to perform the following operations:
acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented;
converting the image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point;
closing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation;
and segmenting the object to be segmented from the image before segmentation.
In one embodiment of the present application, the processor 1003 is further configured to call the program instructions stored in the memory 1001 to perform the following operations:
taking each pixel point in the image to be segmented as a target pixel point, and framing the target pixel point in the image to be segmented by utilizing a patch block with a preset size;
calculating information entropy corresponding to the target pixel point according to the gray value of each pixel point in the patch block;
judging whether at least one pixel region exists or not and information entropy corresponding to each pixel point in the pixel region is zero;
if so, increasing the size of the patch block, and continuously executing the step of framing the target pixel point in the image to be segmented;
and if not, generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented.
In one embodiment of the present application, the processor 1003 is further configured to call the program instructions stored in the memory 1001 to perform the following operations:
and closing the unclosed region of the object to be segmented in the entropy image by utilizing opening operation or closing operation of mathematical morphology.
In one embodiment of the present application, the processor 1003 is further configured to call the program instructions stored in the memory 1001 to perform the following operations:
and adopting a segmentation method based on the active contour model to segment the object to be segmented from the image before segmentation.
In one embodiment of the present application, the processor 1003 is further configured to call the program instructions stored in the memory 1001 to perform the following operations:
denoising the image to be segmented by adopting a shear wave denoising mode to obtain a denoised image to be segmented.
In one embodiment of the present application, the processor 1003 is further configured to call the program instructions stored in the memory 1001 to perform the following operations:
and performing edge enhancement on the denoised image to be segmented by adopting an impact filter.
In one embodiment of the present application, the processor 1003 is further configured to call the program instructions stored in the memory 1001 to perform the following operations:
and performing gray stretching on the image before segmentation.
In some embodiments, the processor 1003 may be a Central Processing Unit (CPU), the Memory 1001 may be a Random Access Memory (RAM) type internal Memory, and the receiver 1002 may include a general physical interface, which may be an Ethernet (Ethernet) interface or an Asynchronous Transfer Mode (ATM) interface. The processor 1003, receiver 1002, and memory 1001 may be integrated into one or more separate circuits or hardware, such as: application Specific Integrated Circuit (ASIC).
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. An image segmentation method, comprising:
acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented;
converting the image to be segmented into an entropy image, wherein the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point, the entropy image is kept hidden in the information with small change among the pixels, and the edge position of the object to be segmented is highlighted;
closing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation;
segmenting the object to be segmented from the pre-segmentation image;
wherein, the converting the image to be segmented into an entropy image comprises:
taking each pixel point in the image to be segmented as a target pixel point, and framing the target pixel point in the image to be segmented by utilizing a patch block with a preset size;
calculating information entropy corresponding to the target pixel point according to the gray value of each pixel point in the patch block;
judging whether at least one pixel region exists or not and information entropy corresponding to each pixel point in the pixel region is zero;
if so, increasing the size of the patch block, and continuously executing the step of framing the target pixel point in the image to be segmented;
and if not, generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented.
2. The method according to claim 1, wherein the closing of the unclosed region of the object to be segmented in the entropy image comprises:
and closing the unclosed region of the object to be segmented in the entropy image by utilizing opening operation or closing operation of mathematical morphology.
3. The method according to any one of claims 1 to 2, wherein the segmenting the object to be segmented from the pre-segmentation image comprises:
and adopting a segmentation method based on the active contour model to segment the object to be segmented from the image before segmentation.
4. The method according to any one of claims 1 to 2, wherein after the acquiring the image to be segmented, the method comprises:
denoising the image to be segmented by adopting a shear wave denoising mode to obtain a denoised image to be segmented.
5. The method as claimed in claim 4, wherein after obtaining the denoised image to be segmented, the method further comprises:
and performing edge enhancement on the denoised image to be segmented by adopting an impact filter.
6. The method of any of claims 1 to 2, wherein after obtaining the pre-segmentation image, further comprising:
and performing gray stretching on the image before segmentation.
7. An image segmentation apparatus, comprising:
the image acquisition unit is used for acquiring an image to be segmented, wherein the image to be segmented comprises an object to be segmented;
the image conversion unit is used for converting the image to be segmented into an entropy image, the pixel value of each pixel point of the entropy image is the information entropy corresponding to the pixel point, the entropy image is kept hidden in the information of small change among the pixels, and the edge position of the object to be segmented is highlighted;
the edge sealing unit is used for sealing the unclosed region of the object to be segmented in the entropy image to obtain an image before segmentation;
the image segmentation unit is used for segmenting the object to be segmented from the image before segmentation;
wherein the image conversion unit includes:
a patch frame selecting subunit, configured to select each pixel point in the image to be segmented as a target pixel point, and frame the target pixel point in the image to be segmented by using a patch block of a preset size;
an entropy calculation subunit, configured to calculate, according to the gray value of each pixel point in the patch block, an information entropy corresponding to the target pixel point;
the entropy judgment subunit is used for judging whether at least one pixel region exists or not and the information entropy corresponding to each pixel point in the pixel region is zero;
the entropy value recalculating unit is used for increasing the size of the patch block and triggering the patch frame selecting subunit to frame select the target pixel point in the image to be segmented if at least one pixel region exists and the information entropy corresponding to each pixel point in the pixel region is zero;
and the image conversion subunit is used for generating an entropy image by using the information entropy corresponding to each pixel point in the image to be segmented if at least one pixel area does not exist and the information entropy corresponding to each pixel point in the pixel area is zero.
8. An image segmentation apparatus, comprising: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of any of claims 1-6.
CN201810005450.8A 2018-01-03 2018-01-03 Image segmentation method and device Active CN108305268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810005450.8A CN108305268B (en) 2018-01-03 2018-01-03 Image segmentation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810005450.8A CN108305268B (en) 2018-01-03 2018-01-03 Image segmentation method and device

Publications (2)

Publication Number Publication Date
CN108305268A CN108305268A (en) 2018-07-20
CN108305268B true CN108305268B (en) 2020-12-01

Family

ID=62868095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810005450.8A Active CN108305268B (en) 2018-01-03 2018-01-03 Image segmentation method and device

Country Status (1)

Country Link
CN (1) CN108305268B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110827301B (en) * 2019-11-11 2023-09-26 京东科技控股股份有限公司 Method and apparatus for processing image
CN113191300B (en) * 2020-10-14 2024-01-26 神盾股份有限公司 Method, apparatus and computer readable medium for fingerprint image recognition
CN112967202A (en) * 2021-03-12 2021-06-15 华北水利水电大学 Denoising method for encrypted image with privacy protection by hyperbolic partial differential equation
CN113139936B (en) * 2021-03-31 2022-07-08 武汉钢铁有限公司 Image segmentation processing method and device
CN114359311B (en) * 2022-03-17 2022-06-07 珠海市人民医院 Medical image segmentation method and system based on artificial intelligence

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885317A (en) * 2006-07-06 2006-12-27 上海交通大学 Adaptive edge detection method based on morphology and information entropy
US20120213440A1 (en) * 2010-11-22 2012-08-23 University Of Central Florida Research Foundation, Inc. Systems and Methods for Automatically Identifying Shadows in Images
CN104637057A (en) * 2015-02-04 2015-05-20 昆明理工大学 Grayscale-gradient entropy multi-threshold fast division method based on genetic algorithm

Also Published As

Publication number Publication date
CN108305268A (en) 2018-07-20

Similar Documents

Publication Publication Date Title
CN108305268B (en) Image segmentation method and device
Jeong et al. Adaptive determination of filter scales for edge detection
CN108053417B (en) lung segmentation device of 3D U-Net network based on mixed rough segmentation characteristics
CN107749987B (en) Digital video image stabilization method based on block motion estimation
WO2006024974A1 (en) Feature weighted medical object contouring using distance coordinates
CN112258514B (en) Segmentation method of pulmonary blood vessels of CT (computed tomography) image
CN113221925B (en) Target detection method and device based on multi-scale image
CN110956632B (en) Method and device for automatically detecting pectoralis major region in molybdenum target image
Gauch et al. The intensity axis of symmetry and its application to image segmentation
CN110458773B (en) Anisotropic diffusion noise processing method based on edge enhancement operator
CN109242797B (en) Image denoising method, system and medium based on homogeneous and heterogeneous region fusion
Barzigar et al. A video super-resolution framework using SCoBeP
Zin et al. Local image denoising using RAISR
CN108876711B (en) Sketch generation method, server and system based on image feature points
CN112927169B (en) Remote sensing image denoising method based on wavelet transformation and improved weighted kernel norm minimization
JP4509512B2 (en) Skew detection
Ye et al. A sparsity-promoting image decomposition model for depth recovery
CN111369425A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN110675372A (en) Brain area automatic segmentation method and system of brain tissue three-dimensional image with horizontal cell resolution
Chen et al. Image reconstruction based on combination of wavelet decomposition, inpainting and texture synthesis
Krylov et al. Face image super-resolution from video data with non-uniform illumination
Si et al. LBF: learnable bilateral filter for point cloud denoising
CN112017113B (en) Image processing method and device, model training method and device, equipment and medium
Kiatpapan et al. Super-resolution based on back-projection of interpolated image
CN116452839A (en) Image feature point matching method based on affine transformation and deep learning

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 110179 No. 177-1 Innovation Road, Hunnan District, Shenyang City, Liaoning Province

Applicant after: DongSoft Medical System Co., Ltd.

Address before: 110179 No. 177-1 Innovation Road, Hunnan District, Shenyang City, Liaoning Province

Applicant before: Dongruan Medical Systems Co., Ltd., Shenyang

GR01 Patent grant
GR01 Patent grant