CN104361612B - Non-supervision color image segmentation method based on watershed transformation - Google Patents

Non-supervision color image segmentation method based on watershed transformation Download PDF

Info

Publication number
CN104361612B
CN104361612B CN201410625139.5A CN201410625139A CN104361612B CN 104361612 B CN104361612 B CN 104361612B CN 201410625139 A CN201410625139 A CN 201410625139A CN 104361612 B CN104361612 B CN 104361612B
Authority
CN
China
Prior art keywords
segmentation
image
gradient
color image
rec
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.)
Expired - Fee Related
Application number
CN201410625139.5A
Other languages
Chinese (zh)
Other versions
CN104361612A (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.)
Lanzhou Jiaotong University
Original Assignee
Lanzhou Jiaotong University
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 Lanzhou Jiaotong University filed Critical Lanzhou Jiaotong University
Priority to CN201410625139.5A priority Critical patent/CN104361612B/en
Publication of CN104361612A publication Critical patent/CN104361612A/en
Application granted granted Critical
Publication of CN104361612B publication Critical patent/CN104361612B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/20112Image segmentation details
    • G06T2207/20152Watershed segmentation

Landscapes

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

Abstract

The invention provides a non-supervision color image segmentation method based on watershed transformation. The non-supervision color image segmentation method sequentially includes the following steps: (1), initializing operation parameters of a given program, and inputting a color image; (2), acquiring the gradient of the color image by a vector gradient calculation method; (3), performing self-adaptive gradient reconstruction on the gradient image according to a morphology reconstruction theory, and establishing structural elements changeable in size to adapt to different gradient values to effectively eliminate image structures with the small gradient values and keep the large gradient values unchanged; (4), performing parameter-free segmentation on the image according to stability of segmentation areas; (5), outputting a segmentation result. The non-supervision color image segmentation method can be applied to color image segmentation, and stable and accurate segmentation results can be acquired without setting of any parameters.

Description

A kind of unsupervised color image segmentation method based on watershed transform
Technical field
The invention belongs to technical field of image processing, is related to Morphological watersheds theory and color images, this The bright Fast Segmentation that can be applicable to coloured image, is that follow-up target classification and identification lay the foundation.
Background technology
Image segmentation is the committed step of computer vision, in graphical analyses and pattern recognition has important application.Mesh Before, scholars have been proposed for many image partition methods, in these methods, based on the watershed transform of mathematical morphology are A kind of effective partition tools.Image segmentation result based on dividing ridge method has the cut zone of closing, however, due to list One watershed transform is often very sensitive to irregular details and noise, is easily caused over-segmentation phenomenon.For the problem, in recent years Carry out scholars and done substantial amounts of research work, it is proposed that many improved watershed segmentation methods.At present, based on watershed The image partition method of conversion can substantially be divided into two classes:One class is the supervision watershed segmentation side expressed based on priori Method;Another kind of is the unsupervised watershed segmentation methods based on region.
In first kind watershed segmentation methods, the priori mainly spy such as the size of object to be split, shape, color Levy.Levner constructs topological Functions, and driving target and background region of classifying first, and seed will be driven to become for watershed Change, to realize image segmentation.However, topological surface is divided into two parts by the method rigidly, for more complicated or band noise pattern Picture, often cannot correctly distinguish the foreground and background of image, obtain the labelling seed of mistake, so as to the segmentation for causing mistake is tied Really.In order to improve image segmentation result, Richard proposes a kind of watershed transform of local restriction, and the method is by changing bottom The path that relied on of layer watershed transform remains many desirable watershed transform properties defining the constraints on border, Such as clear and definite stop condition and efficiently realization, while can be in the case of noise or border be imperfect, there is provided more stable divides Cut.
For the unsupervised watershed segmentation methods of Equations of The Second Kind, scholars are using mathematical morphology in analysis of the image and signal Advantage in the nonlinear methods such as geodetic structure, by using morphological reconstruction computing modifying gradient image, to solve over-segmentation Problem.Document " a kind of parameterized Morphological watersheds image partition method, railway society, 2013, Vol35 (1), p66-70 " A kind of parameterized Morphological watersheds image partition method is disclosed, the method is directed to some improved watershed segmentation methods There is the problem of position skew in the region contour after causing to split in smoothed image, using stickiness morphology slime flux model, build Functional relationship between vertical gradation levels and structural element, carries out parametrization using structural element of different sizes to gradient image Amendment, finally on the basis of the gradient image of amendment, realizes image segmentation using standard watershed.The advantage of the method is to build The functional relationship between structural element and gradient image is found so that the image partition method parameter based on Morphological watersheds Change.However, the method is not carried out the non-formaldehyde finishing of image, the determination of wherein parameter is a problem;Secondly, the method is only fitted Split for gray level image, it is difficult to be applied in color images.
The content of the invention
In order to overcome the deficiencies in the prior art, the present invention to provide a kind of unsupervised coloured image based on watershed transform point Segmentation method, calculates the gradient of coloured image using gradient of vector computational methods, and effectively being reduced using morphological reconstruction computing is caused The local minizing point of over-segmentation, and it is stable to reach segmentation using adaptive structure element, so that new dividing method is not Any parameter need to be set and can be obtained by stable segmentation result, the present invention has the advantages that method is simple, is easily achieved, and has Have wide practical use.
The technical solution adopted for the present invention to solve the technical problems is:Coloured silk is obtained first with gradient of vector computational methods The gradient of color image, then rebuilds optimization gradient image using morphology self-adaption gradient, finally using cut zone stability Obtain final segmentation result.Implement step as follows:
(1) input color image f, initial variable i=1 of definition, i represent collar plate shape structural element BiRadius, l=2 tables Show that by gradient image initial division be 2 grades;
(2) the gradient image g of coloured image f is calculated using gradient of vector method;
(3) reconstruction computing is carried out out to gradient image g, obtains revised gradient image g for the first timerec(1);
(4) to gradient image grec(1) standard watershed transform is carried out, the number of regions after statistics segmentation is Num (1);
(5) self-adaption gradient is rebuild, and obtains revised gradient image gm, comprise the following steps:
A () i adds 1, collar plate shape structural element BiFor the circular configuration of size (2i+1) × (2i+1), to grec(i-1) carry out Reconstruction is opened, revised gradient image g is obtainedrec(i);
(b) modifying gradient image
Wherein, binaryzation computing
Represent gradation levels interval;
C, if () i≤l, return to step (a), otherwise into next step;
(6) to gmThe standard of carrying out watershed transform, the result after being split are L2, counting the number of regions after segmentation is Num(l);
(7) judge the number of regions change after segmentation, if Num (l)=Num (l-1), exports final segmentation result L2;Otherwise, l adds 1, return to step (5).
The invention has the beneficial effects as follows:
1st, for the over-segmentation problem in watershed, gradient image is rebuild using adaptive structure element, so as to gram Having taken traditional single structure element causes the relatively low problem of segmentation precision.
2nd, the problem of parameter setting is depended on for existing color image segmentation method performance, using self adapting morphology Reconstruction theory combines the closure in watershed segmentation region, in the case where setting any parameter, obtains stable dividing Cut result.
Description of the drawings
Fig. 1 is the flow process theory diagram that the present invention realizes step.
Fig. 2 (a) is the test image " Peppers " in present invention experiment.
Fig. 2 (b) is in order to contrast the superiority of the method for the present invention, using control methods MSW pair in the present invention The segmentation result of " Peppers ".
Fig. 2 (c) is in order to contrast the superiority of the method for the present invention, using control methods HTFCM pair in the present invention The segmentation result of " Peppers ".
Fig. 2 (d) is in order to contrast the superiority of the method for the present invention, using control methods GRW pair in the present invention The segmentation result of " Peppers ".
Fig. 2 (e) is in order to contrast the superiority of the method for the present invention, using the inventive method pair in the present invention The segmentation result of " Peppers ".
Fig. 3 (a) is the test image " Plane " in present invention experiment.
Fig. 3 (b) is in order to contrast the superiority of the method for the present invention, using control methods MSW to " Plane " in the present invention Segmentation result.
Fig. 3 (c) is in order to contrast the superiority of the method for the present invention, using control methods HTFCM pair in the present invention The segmentation result of " Plane ".
Fig. 3 (d) is in order to contrast the superiority of the method for the present invention, using control methods GRW to " Plane " in the present invention Segmentation result.
Fig. 3 (e) is in order to contrast the superiority of the method for the present invention, using the inventive method to " Plane " in the present invention Segmentation result.
Specific embodiment
The present invention is further described with reference to the accompanying drawings and examples, and the present invention includes but are not limited to following enforcements Example.
Fig. 1 is the flow process theory diagram that the present invention realizes step, for color images problem, to present invention design A kind of printenv color image segmentation method based on watershed transform is described in detail below:
(1) initialize:Input color image f, picture size are the height and width that M × N, M and N represent f respectively, are defined Initial variable i=1, i represent collar plate shape structural element BiRadius, l=2 represent by gradient image initial division be 2 grades;
(2) the gradient image g of coloured image f is calculated using gradient of vector method,
A () calculates three components (R, G, B) of coloured image f both horizontally and vertically respectively using Sobel operators Gradient, wherein,
The gradient of vector of (b) calculated level and vertical direction
C () is according to gxx、gyyAnd gxyCalculated direction angle
D () determines gradient of vector g by orientation angle θ
G (x, y)=max (g1(x,y),g2(x,y))
G is g1、g2In the maximum at each point (x, y) place.
(3) reconstruction computing is carried out out to gradient image g, the image g after being rebuildrec(1);
A () initializes;B1Be size be (2i+1) × (2i+1) circular configuration element;I=1, k=1;
B () definition mask image is gmask, labelling image fmarker
gmask=g
fmarker=g Θ Bi
h1=fmarker
C () corrodes restructing operation;
D () judges, if hk+1=hk, then obtain corroding reconstructed results gε=hk;Otherwise, k adds 1, return to step (c);
(e) transfer mask image gmaskWith labelling image fmarker;I=1, k=1;
g'mask=(gε)c
f′marker=(gε)cΘBi
h′1=f 'marker
Wherein, (gε)cRepresent gεComplementary operation.
F computing is rebuild in () expansion;
G () judges, if h'k+1=h'k, then reconstructed results g are obtained outrec(1)=(h'k)c;Otherwise, k adds 1, returns step Suddenly (f);
(4) to the gradient image after reconstructionThe standard of carrying out watershed transform, the result after segmentation Number of regions after statistics segmentation is Num (1);
Wherein, WS represents standard watershed segmentation.
(5) self-adaption gradient is rebuild, and obtains revised gradient image gm
(a) structural element BiFor the circular configuration of size (2i+1) × (2i+1), 2≤i≤l, to grec(i-1) opened Rebuild, the gradient image after being rebuild is grec(i);
(b) modifying gradient image;
BW represents binaryzation computing:
Represent gradation levels interval.
(6) to revised gradient image gmThe standard of carrying out watershed transform, segmentation result is L2, and after counting segmentation Number of regions is Num (l);
L2=WS (gm)
Wherein, WS represents standard watershed segmentation.
(7) judge the number of regions change after segmentation, if Num (l)=Num (l-1), exports final segmentation result L2;Otherwise, l adds 1, return to step 5;
The effect of the present invention can be further illustrated by following experiment:
In order to test effectiveness and superiority of the present invention to color images, emulation experiment is in CPU:Intel (TM) carry out under the software environment of i3-3220,3.3GHz, the hardware environment of internal memory 4GB and MATLAB R2010a.Using three Plant control methods:MSW (multiple dimensioned watershed segmentation methods), HTFCM are (with reference to rectangular histogram and the color images side of FCM Method), GRW (watershed segmentation methods based on Gradient Reconstruction) and the inventive method respectively test image is split, test As a result referring to the drawings 2-3.In emulation experiment, for unified parameters, the structural element adopted by MSW methods, GRW methods is Circular configuration of the radius from 1 to 4, in HTFCM, the maximum iteration time of FCM is 150, and Fuzzy Exponential is 2, and the inventive method need not Set any parameter.Referring to the drawings 2-3, as MSW methods calculate multi-scale gradient images using 4 kinds of fixed structural elements, though Over-segmentation phenomenon can so be improved, but destroy the original gradient of image, therefore segmentation result error is larger.Based on color characteristic HTFCM method segmentation effects be better than MSW, but this dividing method have ignored the spatial structural form of image, therefore obtain More scatterplot region, it is difficult to form the cut zone of closing.GRW methods eliminate over-segmentation phenomenon, retain important region Profile, but due to carrying out Gradient Reconstruction using fixed-level structural element, therefore difference is obtained in the case of Parameters variation Segmentation result, especially when gradient image corresponding size of structure element is calculated, amount of calculation is larger.The inventive method is solved The problems referred to above, rebuild gradient image using the adaptation theory of structural element, and are realized according to region number determination stability The unsupervised image segmentation of any parameter is not needed, over-segmentation had both been solved the problems, such as, stably accurate segmentation result can be obtained again.

Claims (1)

1. a kind of unsupervised color image segmentation method based on watershed transform, it is characterised in that comprise the steps:
(1) input color image f, initial variable i=1 of definition, i represent collar plate shape structural element BiRadius, l=2 represented ladder Degree image initial is divided into 2 grades;
(2) the gradient image g of coloured image f is calculated using gradient of vector method;
(3) reconstruction computing is carried out out to gradient image g, obtains revised gradient image g for the first timerec(1);
(4) to gradient image grec(1) standard watershed transform is carried out, the number of regions after statistics segmentation is Num (1);
(5) self-adaption gradient is rebuild, and obtains revised gradient image gm, comprise the following steps:
A () i adds 1, collar plate shape structural element BiFor the circular configuration of size (2i+1) × (2i+1), to grec(i-1) carry out out weight Build, obtain revised gradient image grec(i);
(b) modifying gradient image g m = Σ i = 1 l g rec ( i ) × BW ( g , T , i ) ,
Wherein, binaryzation computing
T = max ( g ) - min ( g ) l Represent gradation levels interval;
C, if () i≤l, return to step (a), otherwise into next step;
(6) to gmThe standard of carrying out watershed transform, the result after being split are L2, the number of regions after statistics segmentation is Num (l);
(7) judge the number of regions change after segmentation, if Num (l)=Num (l-1), export final segmentation result L2;It is no Then, l adds 1, return to step (5).
CN201410625139.5A 2014-11-07 2014-11-07 Non-supervision color image segmentation method based on watershed transformation Expired - Fee Related CN104361612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410625139.5A CN104361612B (en) 2014-11-07 2014-11-07 Non-supervision color image segmentation method based on watershed transformation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410625139.5A CN104361612B (en) 2014-11-07 2014-11-07 Non-supervision color image segmentation method based on watershed transformation

Publications (2)

Publication Number Publication Date
CN104361612A CN104361612A (en) 2015-02-18
CN104361612B true CN104361612B (en) 2017-03-22

Family

ID=52528870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410625139.5A Expired - Fee Related CN104361612B (en) 2014-11-07 2014-11-07 Non-supervision color image segmentation method based on watershed transformation

Country Status (1)

Country Link
CN (1) CN104361612B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2536715A (en) * 2015-03-27 2016-09-28 Mas Innovation (Private) Ltd Image processing method
US10489970B2 (en) * 2015-11-06 2019-11-26 Microsoft Technology Licensing, Llc 2D image processing for extrusion into 3D objects
CN106530303A (en) * 2016-11-01 2017-03-22 陕西科技大学 Spectral clustering-based color image fast segmentation method
CN110458795A (en) * 2019-06-03 2019-11-15 赵旭东 A kind of breast lump ultrasound image supersonic region separation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542531A (en) * 2010-12-08 2012-07-04 江南大学 Method for segmenting textile and medicine images
CN102999888A (en) * 2012-11-27 2013-03-27 西安交通大学 Depth map denoising method based on color image segmentation
CN103020963A (en) * 2012-11-29 2013-04-03 北京航空航天大学 Multi-view stereo matching method based on self-adaptive watershed image segmentation
CN103914843A (en) * 2014-04-04 2014-07-09 上海交通大学 Image segmentation method based on watershed algorithm and morphological marker

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0130210D0 (en) * 2001-12-18 2002-02-06 Caladrius Ltd Segmentation of images using the watershed method
US7394933B2 (en) * 2004-11-08 2008-07-01 Siemens Medical Solutions Usa, Inc. Region competition via local watershed operators

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542531A (en) * 2010-12-08 2012-07-04 江南大学 Method for segmenting textile and medicine images
CN102999888A (en) * 2012-11-27 2013-03-27 西安交通大学 Depth map denoising method based on color image segmentation
CN103020963A (en) * 2012-11-29 2013-04-03 北京航空航天大学 Multi-view stereo matching method based on self-adaptive watershed image segmentation
CN103914843A (en) * 2014-04-04 2014-07-09 上海交通大学 Image segmentation method based on watershed algorithm and morphological marker

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自适应梯度重建分水岭分割算法;张志禹等;《中国图象图形学报》;20141016;第19卷(第10期);第1430-1437页 *

Also Published As

Publication number Publication date
CN104361612A (en) 2015-02-18

Similar Documents

Publication Publication Date Title
CN106778821B (en) Classification of Polarimetric SAR Image method based on SLIC and improved CNN
CN102592268B (en) Method for segmenting foreground image
CN104361612B (en) Non-supervision color image segmentation method based on watershed transformation
CN103984953B (en) Semantic segmentation method based on multiple features fusion Yu the street view image of Boosting decision forests
CN108898610A (en) A kind of object contour extraction method based on mask-RCNN
CN108154519A (en) Dividing method, device and the storage medium of eye fundus image medium vessels
Tan et al. Segmentation and counting algorithm for touching hybrid rice grains
CN106682569A (en) Fast traffic signboard recognition method based on convolution neural network
CN105718945A (en) Apple picking robot night image identification method based on watershed and nerve network
CN106650744B (en) The image object of local shape migration guidance is divided into segmentation method
Pandiselvi et al. Efficient framework for identifying, locating, detecting and classifying MRI brain tumor in MRI images
De et al. A parallel adaptive segmentation method based on SOM and GPU with application to MRI image processing
CN108596920A (en) A kind of Target Segmentation method and device based on coloured image
CN104732551A (en) Level set image segmentation method based on superpixel and graph-cup optimizing
CN109685045A (en) A kind of Moving Targets Based on Video Streams tracking and system
CN111046772A (en) Multi-temporal satellite remote sensing island shore line and development and utilization information extraction method
CN107808138A (en) A kind of communication signal recognition method based on FasterR CNN
CN108399430B (en) A kind of SAR image Ship Target Detection method based on super-pixel and random forest
CN103198479A (en) SAR image segmentation method based on semantic information classification
CN106056611A (en) Level set image segmentation method and system thereof based on regional information and edge information
CN103824300A (en) SAR (synthetic aperture radar) image segmentation method based on spatial correlation feature ultra-pixel block
CN106096615A (en) A kind of salient region of image extracting method based on random walk
CN108830131A (en) Traffic target detection and distance measuring method based on deep learning
CN110930514B (en) Three-dimensional grid model self-adaptive simplification method based on local region characteristics
Huang et al. Variational level set method for image segmentation with simplex constraint of landmarks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170322

Termination date: 20171107

CF01 Termination of patent right due to non-payment of annual fee