CN108038863B - Image segmentation method and device - Google Patents

Image segmentation method and device Download PDF

Info

Publication number
CN108038863B
CN108038863B CN201810085004.2A CN201810085004A CN108038863B CN 108038863 B CN108038863 B CN 108038863B CN 201810085004 A CN201810085004 A CN 201810085004A CN 108038863 B CN108038863 B CN 108038863B
Authority
CN
China
Prior art keywords
contour curve
initial contour
gray
image
curve
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
CN201810085004.2A
Other languages
Chinese (zh)
Other versions
CN108038863A (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.)
Rongcheng goer Technology Co.,Ltd.
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201810085004.2A priority Critical patent/CN108038863B/en
Publication of CN108038863A publication Critical patent/CN108038863A/en
Application granted granted Critical
Publication of CN108038863B publication Critical patent/CN108038863B/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/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • 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/10004Still image; Photographic image

Landscapes

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

Abstract

The invention discloses an image segmentation method and device, wherein the method comprises the following steps: setting an initial contour curve in an image to be processed; determining global energy and local energy corresponding to the initial contour curve, and determining total energy corresponding to the initial contour curve according to the global energy and the local energy; determining a value corresponding to a level set evolution equation corresponding to the initial contour curve according to the total energy; judging whether a value corresponding to a level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold value or not; if not, performing evolution processing on the initial contour curve according to the total energy until a value corresponding to a level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, and taking the contour curve after the last evolution processing as a segmentation curve; and carrying out segmentation processing on the image to be processed by utilizing a segmentation curve.

Description

Image segmentation method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image processing method and apparatus.
Background
At present, image parts meeting the requirements of users are segmented from images mainly through a traditional active contour model. Because the traditional active contour model is an image processing model based on image global information, the traditional active contour model has the defects of sensitive initial contour, more iteration times in the calculation process and low curve convergence speed, and particularly can not be used for correctly segmenting an image with little change of gray information.
Therefore, it is necessary to provide a new technical method, which is improved in view of the above technical problems in the prior art.
Disclosure of Invention
The invention aims to provide a new technical scheme of an image segmentation method and an image segmentation device.
According to a first aspect of the present invention, there is provided an image segmentation method comprising:
setting an initial contour curve in an image to be processed;
determining global energy and local energy corresponding to the initial contour curve, and determining total energy corresponding to the initial contour curve according to the global energy and the local energy;
determining a value corresponding to a level set evolution equation corresponding to the initial contour curve according to the total energy;
judging whether a value corresponding to a level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold value or not;
if not, performing evolution processing on the initial contour curve according to the total energy until a value corresponding to a level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, and taking the contour curve after the last evolution processing as a segmentation curve;
and carrying out segmentation processing on the image to be processed by utilizing a segmentation curve.
Optionally, determining the global energy corresponding to the initial contour curve includes:
determining the global energy corresponding to the initial contour curve according to the gray value of each pixel point in the image to be processed, a first gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points in the initial contour curve, and a second gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points outside the initial contour curve; and/or the presence of a gas in the gas,
determining the local energy corresponding to the initial contour curve, including:
setting image areas by taking each pixel point on the initial contour curve as a center, wherein in each image area, the initial contour curve is taken as a boundary line to divide each image area into a first image area and a second image area;
and for an image area corresponding to any pixel point on the initial contour curve, determining the local energy of the image area corresponding to any pixel point according to the gray value of each pixel point in the image area corresponding to any pixel point, the first gray median of the first image area and the second gray median of the second image area.
Optionally, the image area is a circular image area or a square image area which is set up with each pixel point on the initial contour curve as a center.
Optionally, the initial contour curve is any one of a circular curve, a square curve and a triangular curve.
According to a second aspect of the present invention, there is provided an image segmentation apparatus comprising:
the setting module is used for setting an initial contour curve in the image to be processed;
the first determining module is used for determining global energy and local energy corresponding to the initial contour curve and determining total energy corresponding to the initial contour curve according to the global energy and the local energy;
the second determining module is used for determining a value corresponding to a level set evolution equation corresponding to the initial contour curve according to the total energy;
the judging module is used for judging whether a value corresponding to a level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold value or not;
the evolution processing module is used for carrying out evolution processing on the initial contour curve according to the total energy when the judgment result is negative until the value corresponding to the level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, and taking the contour curve after the last evolution processing as a segmentation curve;
and the segmentation module is used for carrying out segmentation processing on the image to be processed by utilizing the segmentation curve.
Optionally, the first determining module is further configured to:
determining the global energy corresponding to the initial contour curve according to the gray value of each pixel point in the image to be processed, a first gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points in the initial contour curve, and a second gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points outside the initial contour curve; and/or the presence of a gas in the gas,
the first determination module is further to:
setting image areas by taking each pixel point on the initial contour curve as a center, wherein in each image area, the initial contour curve is taken as a boundary line to divide each image area into a first image area and a second image area;
and for an image area corresponding to any pixel point on the initial contour curve, determining the local energy of the image area corresponding to any pixel point according to the gray value of each pixel point in the image area corresponding to any pixel point, the first gray median of the first image area and the second gray median of the second image area.
Optionally, the image area is a circular image area or a square image area which is set up with each pixel point on the initial contour curve as a center.
Optionally, the initial contour curve is any one of a circular curve, a square curve and a triangular curve.
According to a third aspect of the present invention, there is provided an image segmentation apparatus comprising: a memory and a processor, wherein the memory stores executable instructions that control the processor to operate to perform the image segmentation method according to any one of the preceding claims.
According to the image segmentation method and device provided by the embodiment of the invention, the global energy and the local energy corresponding to the contour curve are fused to obtain the total energy, the total energy is used for carrying out evolution processing on the contour curve until the value corresponding to the level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, then, the contour curve after the evolution processing is used as the segmentation curve to carry out segmentation processing on the image to be processed, the target image is extracted from the image to be processed, and the accuracy of target image extraction is improved.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 shows a process flow diagram of an image segmentation method according to one embodiment of the invention.
Fig. 2 shows a schematic structural diagram of an image segmentation apparatus according to an embodiment of the present invention.
Fig. 3 is a schematic diagram showing a hardware configuration of an image segmentation apparatus according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
One embodiment of the present invention provides an image segmentation method. FIG. 1 shows a process flow diagram of an image segmentation method according to one embodiment of the invention. Referring to fig. 1, the method includes at least the following steps S101 to S106.
Step S101, setting an initial contour curve in an image to be processed.
In one embodiment of the present invention, the initial contour curve is a closed contour curve established with the center of the image to be processed as the initial center. The initial contour curve may be any one of a circular curve, a square curve, and a triangular curve. For example, the type of the initial contour curve may be determined according to the shape of a target image segmented from an image to be processed.
And S102, determining the global energy and the local energy corresponding to the initial contour curve, and determining the total energy corresponding to the initial contour curve according to the global energy and the local energy.
In one embodiment of the invention, the global energy corresponding to the initial contour curve is determined according to the gray value of each pixel point in the image to be processed, a first gray parameter obtained by weighting the gray mean value and the gray median of all pixel points in the initial contour curve, and a second gray parameter obtained by weighting the gray mean value and the gray median of all pixel points outside the initial contour curve.
The set initial contour curve is a closed curve, and the pixel points in the image to be processed can be divided into two parts, wherein one part is the pixel points positioned in the initial contour curve, and the other part is the pixel points positioned outside the initial contour curve.
And obtaining the gray average value of all the pixel points in the initial contour curve according to the gray values of all the pixel points in the initial contour curve and the number of the pixel points in the initial contour curve. Arranging the gray values of all the pixel points in the initial contour curve in a descending or ascending order, and taking the gray value of the pixel point positioned in the middle position as the gray median of all the pixel points in the initial contour curve. And obtaining the gray average value of all the pixel points outside the initial contour curve according to the gray values of all the pixel points outside the initial contour curve and the number of the pixel points outside the initial contour curve. Arranging the gray values of all the pixel points outside the initial contour curve in a descending or descending order, and taking the gray value of the pixel point positioned in the middle position as the gray median of all the pixel points outside the initial contour curve.
When the first gray parameter is determined, the weighting coefficients of the gray mean value and the gray median value of all the pixel points in the initial contour curve can be determined according to the target image to be segmented, and the weighting coefficients of the gray mean value and the gray median value of all the pixel points outside the initial contour curve can be determined according to the target image to be segmented.
For example, the global energy corresponding to the initial contour curve can be obtained based on the following calculation formula (1),
Figure BDA0001562155470000051
wherein E is1Is the global energy, Ω, corresponding to the initial profile curvex1Is the length in the x-axis direction, omega, of the image to be processedy1Is the length in the y-axis direction of the image to be processed, λ1、λ2Is a weight coefficient, I (x)1,y1) To be located in the image to be processed (x)1,y1) Gray value of pixel point, m1The first gray parameter m is obtained by weighting the gray mean value and the gray median value of all the pixel points in the initial contour curve2And the second gray parameter is obtained by weighting the gray mean value and the gray median value of all the pixel points outside the initial contour curve. The image to be processed is a rectangular image, a point located at the lower left corner in the rectangular image is used as an origin, the length direction of the rectangular image is used as the x-axis direction, and the width direction of the rectangular image is used as the y-axis direction. Lambda [ alpha ]1、λ2The setting can be determined according to the actual image processing condition, and particularly, the setting can be carried out by a tester.
In one embodiment of the present invention, image regions are set up with each pixel point on the initial contour curve as a center, wherein each image region is divided into a first image region and a second image region with the initial contour curve as a boundary; and for an image area corresponding to any pixel point on the initial contour curve, determining the local energy of the image area corresponding to any pixel point according to the gray value of each pixel point in the image area corresponding to any pixel point, the first gray median of the first image area and the second gray median of the second image area.
Arranging the gray values of all pixel points in the first image area from small to large or from large to small, and taking the gray value of the pixel point positioned in the middle position as a first gray median of the first image area. Arranging the gray values of all the pixel points in the second image area from small to large or from large to small, and taking the gray value of the pixel point positioned in the middle position as a second gray median of the second image area.
In an embodiment of the present invention, the image area is a circular image area or a square image area which is set up with each pixel point on the initial contour curve as a center.
For example, the local energy corresponding to the initial contour curve can be obtained based on the following calculation formula (2),
Figure BDA0001562155470000061
wherein E is2Is the local energy, Ω, corresponding to the initial profile curvex2Length, omega, of the image area corresponding to a certain pixel point in the x-axis directiony2The length of the y-axis direction of the image region corresponding to a certain pixel point is γ, which is a weight coefficient, and specifically, γ can be set by a tester. I' (x)2,y2) In the image area corresponding to a certain pixel point (x)2,y2) Gray value of pixel point of (d)1Is a first median gray value of the first image region, d2Is the second median gray level of the second image region, when (x)2,y2) When the pixel point is located in the first image region, B (x)2,y2) Take 1 when (x)2,y2) When the pixel point is located in the second image area, B (x)2,y2) Take 0. Wherein, the image area corresponding to a certain pixel point is a rectangular areaThe field is defined by a point located at the lower left corner of the image area as an origin, the longitudinal direction of the image area as the x-axis direction, and the width direction of the image area as the y-axis direction.
And S103, determining a value corresponding to a level set evolution equation corresponding to the initial contour curve according to the total energy.
The evolution principle of the profile curve related to the embodiment of the invention is that the profile curve evolves along the direction of balancing the energy inside and outside the profile curve. When the energy inside and outside the contour curve reaches balance, the evolution of the contour curve is finished, and at the moment, the value corresponding to the level set evolution equation corresponding to the contour curve obtained after the evolution process is 0.
For example, the level set evolution equation expression corresponding to the contour curve is as follows:
Figure BDA0001562155470000071
wherein Φ is a level set function, t is time, H (Φ) is a Heaviside function (hervesandd function), η, ν are weight coefficients, and div (divergence) is a divergence function. Wherein, eta, ν can be determined according to the actual image processing condition, and specifically can be set by the tester.
And step S104, judging whether the value corresponding to the level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold value.
The preset threshold is a value corresponding to a level set evolution equation corresponding to when the energy inside and outside the contour curve reaches equilibrium.
And S105, when the judgment result is negative, carrying out evolution processing on the initial contour curve according to the total energy until the value corresponding to the level set evolution equation corresponding to the contour curve after the evolution processing is consistent with a preset threshold value, and taking the contour curve after the last evolution processing as a segmentation curve. If the determination result is yes, the initial contour curve may be used as a segmentation curve of the image to be processed, and then the image to be processed is segmented by using the initial contour curve.
After the contour curve after the evolution processing is obtained, first, the total energy corresponding to the contour curve after the evolution processing is determined, wherein the total energy corresponding to the contour curve after the evolution processing can be determined according to the total energy determination method provided in the above embodiment. And then, determining a value corresponding to a level set evolution equation corresponding to the contour curve after the evolution processing according to the total energy corresponding to the contour curve after the evolution processing. The value corresponding to the level set evolution equation corresponding to the contour curve after the evolution process can be determined according to the value corresponding to the level set evolution equation provided in the above embodiment.
And step S106, carrying out segmentation processing on the image to be processed by utilizing the segmentation curve.
According to the image segmentation method provided by the embodiment of the invention, the global energy and the local energy corresponding to the contour curve are fused to obtain the total energy, the total energy is used for carrying out evolution processing on the contour curve until the value corresponding to the level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, then, the contour curve after the evolution processing is used as the segmentation curve to carry out segmentation processing on the image to be processed, the target image is extracted from the image to be processed, and the accuracy of target image extraction is improved.
Based on the same inventive concept, an embodiment of the invention also provides an image segmentation device.
Fig. 2 shows a schematic structural diagram of an image segmentation apparatus according to an embodiment of the present invention. Referring to fig. 2, the apparatus comprises at least: a setting module 210, configured to set an initial contour curve in the image to be processed; the first determining module 220 is configured to determine global energy and local energy corresponding to the initial contour curve, and determine total energy corresponding to the initial contour curve according to the global energy and the local energy; a second determining module 230, configured to determine, according to the total energy, a value corresponding to a level set evolution equation corresponding to the initial contour curve; a judging module 240, configured to judge whether a value corresponding to a level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold; an evolution processing module 250, configured to, if the determination result is negative, perform evolution processing on the initial contour curve according to the total energy until a value corresponding to a level set evolution equation corresponding to the contour curve after the evolution processing is consistent with a preset threshold, and use the contour curve after the last evolution processing as a segmentation curve; and the segmentation module 260 is used for performing segmentation processing on the image to be processed by using the segmentation curve.
In an embodiment of the present invention, the first determining module 220 is further configured to: determining global energy corresponding to the initial contour curve according to the gray value of each pixel point in the image to be processed, a first gray parameter obtained by weighting the gray mean value and the gray median value of all pixel points in the initial contour curve and a second gray parameter obtained by weighting the gray mean value and the gray median value of all pixel points outside the initial contour curve; and/or the first determination module is further configured to 220: setting image areas by taking each pixel point on the initial contour curve as a center, wherein each image area is divided into a first image area and a second image area by taking the initial contour curve as a boundary in each image area; and for an image area corresponding to any pixel point on the initial contour curve, determining the local energy of the image area corresponding to any pixel point according to the gray value of each pixel point in the image area corresponding to any pixel point, the first gray median of the first image area and the second gray median of the second image area.
In an embodiment of the present invention, the image area is a circular image area or a square image area that is set up with each pixel point on the initial contour curve as a center.
In one embodiment of the present invention, the initial contour curve is any one of a circular curve, a square curve, and a triangular curve.
Fig. 3 is a schematic diagram showing a hardware configuration of an image segmentation apparatus according to an embodiment of the present invention. Referring to fig. 3, the image segmentation apparatus includes: a memory 320 and a processor 310. The memory 320 stores executable instructions that control the processor 310 to operate to perform the image segmentation method provided according to any one of the above embodiments.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions 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). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (7)

1. An image segmentation method, comprising:
setting an initial contour curve in an image to be processed;
determining global energy and local energy corresponding to the initial contour curve, and determining total energy corresponding to the initial contour curve according to the global energy and the local energy;
determining a value corresponding to a level set evolution equation corresponding to the initial contour curve according to the total energy;
judging whether a value corresponding to a level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold value or not;
if not, performing evolution processing on the initial contour curve according to the total energy until a value corresponding to a level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, and taking the contour curve after the last evolution processing as a segmentation curve;
carrying out segmentation processing on the image to be processed by utilizing a segmentation curve;
the determining the global energy corresponding to the initial contour curve includes:
determining the global energy corresponding to the initial contour curve according to the gray value of each pixel point in the image to be processed, a first gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points in the initial contour curve and a second gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points outside the initial contour curve, wherein the weighting coefficients of the gray mean value and the gray median value of all the pixel points in the initial contour curve are determined according to the target image to be segmented, the weighting coefficients of the gray mean value and the gray median value of all the pixel points outside the initial contour curve are determined according to the target image to be segmented,
the determining the local energy corresponding to the initial contour curve includes:
setting image areas by taking each pixel point on the initial contour curve as a center, wherein in each image area, the initial contour curve is taken as a boundary line to divide each image area into a first image area and a second image area;
and for an image area corresponding to any pixel point on the initial contour curve, determining the local energy of the image area corresponding to any pixel point according to the gray value of each pixel point in the image area corresponding to any pixel point, the first gray median of the first image area and the second gray median of the second image area.
2. The method according to claim 1, wherein the image area is a circular image area or a square image area centered on each pixel point on the initial contour curve.
3. The method according to any one of claims 1-2, wherein the initial profile curve is any one of a circular curve, a square curve, and a triangular curve.
4. An image segmentation apparatus, comprising:
the setting module is used for setting an initial contour curve in the image to be processed;
the first determining module is used for determining global energy and local energy corresponding to the initial contour curve and determining total energy corresponding to the initial contour curve according to the global energy and the local energy;
the second determining module is used for determining a value corresponding to a level set evolution equation corresponding to the initial contour curve according to the total energy;
the judging module is used for judging whether a value corresponding to a level set evolution equation corresponding to the initial contour curve is consistent with a preset threshold value or not;
the evolution processing module is used for carrying out evolution processing on the initial contour curve according to the total energy when the judgment result is negative until the value corresponding to the level set evolution equation corresponding to the contour curve after the evolution processing is consistent with the preset threshold value, and taking the contour curve after the last evolution processing as a segmentation curve;
a segmentation module for performing segmentation processing from the image to be processed by using a segmentation curve,
wherein the first determining module is further configured to:
determining the global energy corresponding to the initial contour curve according to the gray value of each pixel point in the image to be processed, a first gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points in the initial contour curve and a second gray parameter obtained by weighting the gray mean value and the gray median value of all the pixel points outside the initial contour curve, wherein the weighting coefficients of the gray mean value and the gray median value of all the pixel points in the initial contour curve are determined according to the target image to be segmented, the weighting coefficients of the gray mean value and the gray median value of all the pixel points outside the initial contour curve are determined according to the target image to be segmented,
the first determination module is further to:
setting image areas by taking each pixel point on the initial contour curve as a center, wherein in each image area, the initial contour curve is taken as a boundary line to divide each image area into a first image area and a second image area;
and for an image area corresponding to any pixel point on the initial contour curve, determining the local energy of the image area corresponding to any pixel point according to the gray value of each pixel point in the image area corresponding to any pixel point, the first gray median of the first image area and the second gray median of the second image area.
5. The apparatus of claim 4, wherein the image area is a circular image area or a square image area centered on each pixel point on the initial contour curve.
6. The apparatus of claim 4 or 5, wherein the initial profile curve is any one of a circular curve, a square curve, and a triangular curve.
7. An image segmentation apparatus, comprising: a memory and a processor, wherein the memory stores executable instructions that control the processor to operate to perform the image segmentation method according to any one of claims 1-3.
CN201810085004.2A 2018-01-29 2018-01-29 Image segmentation method and device Active CN108038863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810085004.2A CN108038863B (en) 2018-01-29 2018-01-29 Image segmentation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810085004.2A CN108038863B (en) 2018-01-29 2018-01-29 Image segmentation method and device

Publications (2)

Publication Number Publication Date
CN108038863A CN108038863A (en) 2018-05-15
CN108038863B true CN108038863B (en) 2021-02-19

Family

ID=62096885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810085004.2A Active CN108038863B (en) 2018-01-29 2018-01-29 Image segmentation method and device

Country Status (1)

Country Link
CN (1) CN108038863B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110335287A (en) * 2019-07-15 2019-10-15 北华航天工业学院 The extracting method and device of Architectural drawing data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631867A (en) * 2015-12-25 2016-06-01 中国科学院深圳先进技术研究院 Full-automatic contrast-enhanced ultrasonic image segmentation method
CN107103917A (en) * 2017-03-17 2017-08-29 福建星网视易信息系统有限公司 Music rhythm detection method and its system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7706610B2 (en) * 2005-11-29 2010-04-27 Microsoft Corporation Segmentation of objects by minimizing global-local variational energy
CN103093473A (en) * 2013-01-25 2013-05-08 北京理工大学 Multi-target picture segmentation based on level set
CN103093474B (en) * 2013-01-28 2015-03-25 电子科技大学 Three-dimensional mammary gland ultrasound image partition method based on homoplasmon and partial energy
CN104077778B (en) * 2014-07-04 2017-02-15 南京通用电器有限公司 Method for obtaining eye state on basis of distance-regular variational level set
CN104361613B (en) * 2014-11-20 2017-11-21 安徽工业大学 Scene video object method for extracting region in baking box based on level set
CN105989598A (en) * 2015-02-13 2016-10-05 中国科学院沈阳自动化研究所 Eye fundus image vessel segmentation method based on local enhancement active contour module

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631867A (en) * 2015-12-25 2016-06-01 中国科学院深圳先进技术研究院 Full-automatic contrast-enhanced ultrasonic image segmentation method
CN107103917A (en) * 2017-03-17 2017-08-29 福建星网视易信息系统有限公司 Music rhythm detection method and its system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Automatic segmentation of the nasal cavity and paranasal sinuses from cone-beam CT images;Nhat Linh Bui et al;《Int J CARS》;20141212;第1-9页 *
基于模糊聚类及活动轮廓模型的图像分割技术研究;江晓亮;《中国博士学位论文全文数据库 信息科技辑》;20170415;I138-22 *

Also Published As

Publication number Publication date
CN108038863A (en) 2018-05-15

Similar Documents

Publication Publication Date Title
CN108229504B (en) Image analysis method and device
CN109584357B (en) Three-dimensional modeling method, device and system based on multiple contour lines and storage medium
US9824494B2 (en) Hybrid surfaces for mesh repair
WO2021143207A1 (en) Image processing method and apparatus, computation processing device, and medium
US10769866B2 (en) Generating estimates of failure risk for a vehicular component
US10733537B2 (en) Ensemble based labeling
CN110633717A (en) Training method and device for target detection model
CN112488999A (en) Method, system, storage medium and terminal for detecting small target in image
CN113870334A (en) Depth detection method, device, equipment and storage medium
CN113627536A (en) Model training method, video classification method, device, equipment and storage medium
US11295439B2 (en) Image recovery
CN114926849A (en) Text detection method, device, equipment and storage medium
CN108038863B (en) Image segmentation method and device
US9514256B1 (en) Method and system for modelling turbulent flows in an advection-diffusion process
CN109543557B (en) Video frame processing method, device, equipment and storage medium
CN116580407A (en) Training method of text detection model, text detection method and device
CN111160554A (en) Information processing method and device, electronic equipment and storage medium
CN111860214A (en) Face detection method, training method and device of model thereof and electronic equipment
CN111626401B (en) Operation method and device
CN110705633B (en) Target object detection method and device and target object detection model establishing method and device
CN113361719A (en) Incremental learning method based on image processing model and image processing method
CN109559271B (en) Method and device for optimizing depth image
US10691845B2 (en) Data driven shrinkage compensation
CN109308721B (en) Image key point positioning method and device, storage medium and electronic equipment
CN112990165B (en) Method, electronic device and storage medium for table recognition

Legal Events

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

Effective date of registration: 20210720

Address after: 264300 No. 699, Jiangjun South Road, Rongcheng City, Weihai City, Shandong Province

Patentee after: Rongcheng goer Technology Co.,Ltd.

Address before: 266104 Room 308, North Investment Street Service Center, Laoshan District, Qingdao, Shandong.

Patentee before: GOERTEK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right