CN104574405B - A kind of coloured image threshold segmentation method based on Lab space - Google Patents

A kind of coloured image threshold segmentation method based on Lab space Download PDF

Info

Publication number
CN104574405B
CN104574405B CN201510018987.4A CN201510018987A CN104574405B CN 104574405 B CN104574405 B CN 104574405B CN 201510018987 A CN201510018987 A CN 201510018987A CN 104574405 B CN104574405 B CN 104574405B
Authority
CN
China
Prior art keywords
image
color
segmentation
threshold
background
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
CN201510018987.4A
Other languages
Chinese (zh)
Other versions
CN104574405A (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.)
Beijing Tianhang Huachuang Technology Co Ltd
Original Assignee
Beijing Tianhang Huachuang Technology 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 Beijing Tianhang Huachuang Technology Co Ltd filed Critical Beijing Tianhang Huachuang Technology Co Ltd
Priority to CN201510018987.4A priority Critical patent/CN104574405B/en
Publication of CN104574405A publication Critical patent/CN104574405A/en
Application granted granted Critical
Publication of CN104574405B publication Critical patent/CN104574405B/en
Active 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

Abstract

The present invention discloses a kind of color image segmentation method, image segmentation is carried out by the way that RGB color image is transformed into Lab space, isolate brightness L, and OSTU Threshold segmentations are carried out on two Color Channels of ab, the color characteristic of different types of foreground image is considered not only, the color images being also applied under illumination variation occasion improve color images accuracy and robustness.

Description

A kind of coloured image threshold segmentation method based on Lab space
Technical field
The invention belongs to image processing fields, are related to a kind of method of color images, specifically, referring to a kind of base In the coloured image threshold segmentation method of Lab space.
Background technology
Image segmentation refers to that image is divided into the image group for not being overlapped mutually, being connected in itself according to the uniform criterion of phase Sihe The process of member, is the committed step from image procossing to image analysis, the quality of image segmentation quality, after largely decide The effect of continuous image analysis.Coloured image provides more abundant information than gray level image, is split to coloured image, both Suitable color space is selected, again using the partitioning algorithm for being suitble to this space.
There are many kinds of classification, histogram thresholding method, field method, space clustering method, wavelet transformations for Segmentation of Color Image Method, genetic algorithm etc..Wherein histogram thresholding method is most intuitive, but sensitive to noise and the uneven comparison of field color, and not Consider spatial information, is only applicable to the coloured image of segmentation noise very little.Region rule is to insensitive for noise and calculates simple fast Speed, but it is classified to image according to the similarity criteria pre-defined, and the selection of seed point is more difficult, it is desirable that Pixel differences between different zones must be very big.Space clustering method is a kind of unsupervised statistical method, has and is intuitively easily achieved The characteristics of, but need to provide initial parameter, and it is very sensitive to noise.Wavelet Transform has fast algorithm in realization, calculates Complexity is low, and noise resisting ability is strong, but its is computationally intensive, and real-time is poor.Since the complexity of object itself adds acquiring way Etc. factors influence, to image it is effective segmentation always be difficulties, often will appear over-segmentation or less divided the phenomenon that, It is illuminated by the light the influence of condition in addition, it is difficult to obtain satisfied effect.
Bibliography [1] (science and technology and engineering in January, 2007(The 1st phase of volume 7)China of Peng Zhao Yongzhi state) side Boundary is characterized in that the important information of image, threshold value are to discriminate between the Main Basiss of image slices vegetarian refreshments.The binarization method of image is had studied, Elaborate a kind of self-adaption binaryzation method based on mathematical morphology.Experiment shows that this method can preferably retain artwork Boundary characteristic information, binaryzation effect is good.This method is using simple, but it is due to having ignored different types of foreground image Color characteristic, for needs, to extract the accuracy with foreground color feature be unfavorable.
The traditional image threshold point of bibliography [2] (computer and modernization the 8th phase poplar Jing Zhu Lei in 2010) It is that coloured image is converted to gray level image to be split again to cut algorithm.It the characteristics of by analyzing RGB color, carries herein Go out the Threshold Segmentation Algorithm based on RGB color, using new decision criteria, original is replaced with cube in color space The tetrahedron come, is directly split coloured image.Analysis and experiments have shown that, improved judgment criterion can overcome due to Gradation conversion causes to judge by accident caused by colouring information loss, under the premise of ensureing that original Threshold Segmentation Algorithm is quick, simple, More accurate segmentation can be carried out to coloured image.Algorithm is suitable for the case where color of object is black, and can be generalized to The case where color of object is other colors.The use of rgb space is the combination that all colors are regarded as to three primary colours, this three-component Between there are very strong correlations, therefore be unsuitable for being directly used in the image segmentation based on three component operation independents.It is same The rgb value of color is in different location, and since intensity of illumination changes, image is more big changes, RGB color model be easy by To the influence of intensity of illumination, it is unfavorable for the robustness of image segmentation.It is an object of the invention to fully consider the Lab of coloured image The different colours feature of foreground image on channel, coloured image to be split and known background color image are processed into respectively Gray level image on two channels ab obtains 2 optimal thresholds using OSTU thresholding methods, and 2 segmentation results is carried out Then region merging technique is filtered noise reduction and obtains segmentation image to the end.
Invention content
The present invention discloses a kind of color image segmentation method comprising:
(1)Coloured image to be split and known background color image are transformed into Lab color spaces;
(2)Lab images are extracted, brightness L are detached, on the channels ab, by image to be split and known background image Make difference, obtains the gray level image of two background difference images;
(3)It will(2)Gray level image OSTU Threshold segmentation processing is carried out on two Color Channels of ab, obtain two most Excellent threshold value;
(4)Using(3)Two obtained optimal thresholds carry out two-value to the gray-scale map of the background difference image on the channels ab Change is handled;
(5)Region after binarization segmentation is merged;
(6)To the region after merging, morphologic filtering is carried out, the result of color images is obtained.
The beneficial effects of the present invention are:
Coloured image is split in Lab space, has considered not only the color characteristic of different types of foreground image, again Brightness L is separated expression, so being suitable for the occasion of intensity of illumination variation, contributes to the foreground and background of coloured image Image segmentation improves color images accuracy and robustness.
Specific implementation mode
The present invention provides a kind of coloured image threshold segmentation method based on Lab space.Used technical solution is:It is first It will first wait for that coloured image and known background coloured image are transformed into Lab space, and isolate brightness L, and make ash on the channels ab respectively Image difference is spent, two background difference images are obtained, OSTU thresholding methods is then carried out respectively and region is carried out to gray level image Segmentation, extracts the image-region of closed communicating, and obtain two best threshold values, the knot made binary conversion treatment and will divided twice Fruit carries out region merging technique, and the region of acquisition is finally carried out to certain morphologic filtering, obtains segmentation result to the end.
For ease of understanding, first OSTU thresholding methods, image binaryzation and morphologic filtering are briefly described:
OSTU thresholding methods(Da-Jin algorithm)It being proposed in 1979 by big Tianjin, OSTU algorithms are also known as maximum variance between clusters, Because variance is a kind of measurement of intensity profile uniformity, variance yields is bigger, illustrates that two parts difference for constituting image is bigger, works as portion Subhead mislabels to be divided into target and all two parts difference can be caused to become smaller for background or part background, therefore keeps inter-class variance maximum Segmentation means misclassification probability minimum.
Image binaryzation principle sets a certain threshold value T, the data of image can be divided into two parts with T:Picture more than T Plain group and pixel group less than T.If input picture is, exporting image is, then
Above-mentioned is exactly the binary conversion treatment principle of image, that is, Threshold segmentation, purpose be only seek a threshold value T, and Target and background two parts are divided the image into T.
Morphologic filtering is to go to measure and extract the corresponding trait in image with the structural element with certain form to reach To the purpose to image analysis and identification.One of the most common is exactly opening operation and closed operation.The opening operation of image first carries out rotten It is expanded after erosion, separating objects, the boundary of smooth larger object while not changing its face for eliminating wisp, at very thin point Product.The closed operation of image first carries out expansion post-etching, is commonly used to the region separated to target image and is attached and in image Fine gap is filled up, and the result of filling up of image is made to have certain geometric properties.For minuscule hole, company in filler body It connects adjacent object, its smooth boundary while not changing its area.
The present invention includes the following steps:
Step 1:RGB color image to be split is transformed into Lab color spaces, brightness L is separated, and obtains the channels ab Gray level image;
Wherein, the L * component in Lab color spaces is used to indicate the brightness of pixel, and value range is [0,100], indicate from Black is to pure white;A indicates the range from red to green, and value range is [127, -128];B indicates the model from yellow to blue It encloses, value range is [127, -128].RGB color image is gone to the detailed process of Lab color spaces, first by rgb color sky Between be converted to XYZ space, such as following formula:
Step 2:The processing that rapid 1 is synchronized to known background color image obtains the gray level image on the channels ab;
Step 3:Respectively on two channels ab, the gray level image that step 1 and step 2 are obtained carries out difference processing, obtains To two background difference images;
Step 4:Respectively on two channels ab, OSTU threshold values point are carried out to two background difference images that step 3 obtains Method processing is cut, 2 optimal thresholds are obtained;
OSTU thresholding methods obtain the specific method of optimal threshold T:To image Image, note t is point of foreground and background Threshold value is cut, it is W that foreground points, which account for image scaled,0, average gray U0;It is W that background points, which account for image scaled,1, average gray is U1;The overall average gray scale of image is:u=W0×U0+W1×U1;T is traversed from minimum gradation value to maximum gradation value, as t so that value g= W0×(U0-u)2+ W1×(U1-u)2, t is the optimal threshold T divided when maximum;
Step 5:Respectively on the channels ab, background difference image is obtained to step 3 and carries out binary conversion treatment;
Step 6:The result that step 5 is obtained to binarization segmentation twice carries out region merging technique;
Step 7:Morphologic filtering processing, first carries out the closed operation of expansion post-etching, eliminates exiguous space in region, connection Adjacent domain is smoothly not obvious while its boundary and changes its area, obtains the result of color images.

Claims (4)

1. a kind of color image segmentation method carries out coloured image threshold value point by the way that RGB color image is transformed into Lab space It cuts, which is characterized in that include the following steps:
(1) coloured image to be split and known background color image are transformed into Lab color spaces;
(2) Lab images are extracted, brightness L is detached, on the channels ab, it is poor that image to be split and known background image are made Point, obtain the gray level image of two background difference images;
(3) gray level image of (2) is carried out to OSTU Threshold segmentation processing on two Color Channels of ab, obtains two optimal thresholds Value;
(4) two optimal thresholds obtained using (3) carry out at binaryzation the gray-scale map of the background difference image on the channels ab Reason;
(5) region after binarization segmentation is merged;
(6) to the region after merging, morphologic filtering is carried out, the result of color images is obtained;
Wherein, step (1) specific steps for coloured image being transformed into Lab color spaces:
Rgb color space is first converted into XYZ space, such as following formula:
L=116f (Y) -16,
F (s)=7.787s+0.138, s≤0.008856;S > 0.008856.
2. a kind of color image segmentation method according to claim 1, which is characterized in that step (3) the OSTU threshold values Split plot design obtains the specific method of optimal threshold T:To image Image, note t is the segmentation threshold of foreground and background, foreground points It is W to account for image scaled0, average gray U0;It is W that background points, which account for image scaled,1, average gray U1;The overall average ash of image Degree is:U=W0×U0+W1×U1;T is traversed from minimum gradation value to maximum gradation value, as t so that value g=W0×(U0-u)2+W1× (U1-u)2T is the optimal threshold T divided when maximum.
3. a kind of color image segmentation method according to claim 1, which is characterized in that the step (4) completes two-value After change processing, region merging technique is carried out.
4. a kind of color image segmentation method according to claim 1, which is characterized in that the step (6) to image into Row morphologic filtering first carries out the closed operation of expansion post-etching, eliminates exiguous space in region, connection adjacent domain, it is smooth its It is not obvious while boundary and changes its area, obtain the result of color images.
CN201510018987.4A 2015-01-15 2015-01-15 A kind of coloured image threshold segmentation method based on Lab space Active CN104574405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510018987.4A CN104574405B (en) 2015-01-15 2015-01-15 A kind of coloured image threshold segmentation method based on Lab space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510018987.4A CN104574405B (en) 2015-01-15 2015-01-15 A kind of coloured image threshold segmentation method based on Lab space

Publications (2)

Publication Number Publication Date
CN104574405A CN104574405A (en) 2015-04-29
CN104574405B true CN104574405B (en) 2018-11-13

Family

ID=53090377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510018987.4A Active CN104574405B (en) 2015-01-15 2015-01-15 A kind of coloured image threshold segmentation method based on Lab space

Country Status (1)

Country Link
CN (1) CN104574405B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184790A (en) * 2015-08-31 2015-12-23 中国烟草总公司广东省公司 Tobacco field image segmentation method
CN107766878B (en) * 2017-09-28 2020-12-04 北京华航无线电测量研究所 Hazardous article detection method based on Lab color space K-means clustering
CN108765443B (en) * 2018-05-22 2021-08-24 杭州电子科技大学 Sign enhancement processing method for self-adaptive color threshold segmentation
CN109920018A (en) * 2019-01-23 2019-06-21 平安科技(深圳)有限公司 Black-and-white photograph color recovery method, device and storage medium neural network based
CN110648336B (en) * 2019-09-23 2022-07-08 无限极(中国)有限公司 Method and device for dividing tongue texture and tongue coating
CN110751660B (en) * 2019-10-18 2023-01-20 南京林业大学 Color image segmentation method
CN111210455B (en) * 2019-12-11 2023-08-01 泰康保险集团股份有限公司 Method and device for extracting preprinted information in image, medium and electronic equipment
CN113627217A (en) * 2020-05-08 2021-11-09 山东理工大学 Full-automatic gesture recognition method based on slope difference distribution
CN112070771B (en) * 2020-07-24 2022-11-01 安徽农业大学 Adaptive threshold segmentation method and device based on HS channel and storage medium
CN112507911B (en) * 2020-12-15 2023-04-07 浙江科技学院 Real-time recognition method of pecan fruits in image based on machine vision
CN117237506B (en) * 2023-11-15 2024-02-02 中国科学院长春光学精密机械与物理研究所 Method for generating simulated laser point cloud image by aerial image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103247059A (en) * 2013-05-27 2013-08-14 北京师范大学 Remote sensing image region of interest detection method based on integer wavelets and visual features
CN103891697A (en) * 2014-03-28 2014-07-02 南通职业大学 Drug spraying robot capable of moving indoors autonomously and variable drug spraying method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103752B (en) * 2010-11-26 2012-07-04 浙江工业大学 Method for detecting color code blocks in human-computer interaction
CN103761736B (en) * 2014-01-14 2016-09-07 宁波大学 A kind of image partition method based on Bayes's harmony degree

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103247059A (en) * 2013-05-27 2013-08-14 北京师范大学 Remote sensing image region of interest detection method based on integer wavelets and visual features
CN103891697A (en) * 2014-03-28 2014-07-02 南通职业大学 Drug spraying robot capable of moving indoors autonomously and variable drug spraying method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Color Transform Based Approach for Disease Spot Detection on Plant Leaf";Piyush Chaudhary 等;《IJCST》;20120630;第3卷(第6期);第III节第2-3段,第III节A部分第3-5段,图5 *
"基于视频的目标检测与跟踪的研究";王英妹;《中国优秀硕士论文全文数据库 信息科技辑》;20120315(第3期);图2.1、2.6、2.8,第2.3.2、2.4.2节,第16页倒数第1段 *

Also Published As

Publication number Publication date
CN104574405A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104574405B (en) A kind of coloured image threshold segmentation method based on Lab space
CN108537239B (en) Method for detecting image saliency target
CN109636784B (en) Image saliency target detection method based on maximum neighborhood and super-pixel segmentation
WO2019062092A1 (en) Superpixel- and multivariate color space-based body outline extraction method
US6289110B1 (en) Object extracting method using motion picture
CN101436252A (en) Method and system for recognizing vehicle body color in vehicle video image
CN104657980A (en) Improved multi-channel image partitioning algorithm based on Meanshift
Duan et al. A WBC segmentation methord based on HSI color space
CN112330561B (en) Medical image segmentation method based on interactive foreground extraction and information entropy watershed
CN110749598A (en) Silkworm cocoon surface defect detection method integrating color, shape and texture characteristics
US20080310685A1 (en) Methods and Systems for Refining Text Segmentation Results
CN109741337B (en) Region merging watershed color remote sensing image segmentation method based on Lab color space
CN117173416B (en) Railway freight train number image definition processing method based on image processing
CN108805865B (en) Bone marrow leukocyte positioning method based on saturation clustering
CN107123102A (en) A kind of adherent cell growth degrees of fusion automatic analysis method
CN104268845A (en) Self-adaptive double local reinforcement method of extreme-value temperature difference short wave infrared image
Alex et al. Underwater image enhancement using CLAHE in a reconfigurable platform
Avinash et al. Color hand gesture segmentation for images with complex background
CN109493361B (en) Fire smoke image segmentation method
Azad et al. A robust and adaptable method for face detection based on color probabilistic estimation technique
CN110223253B (en) Defogging method based on image enhancement
CN111611940A (en) Rapid video face recognition method based on big data processing
CN106339995A (en) Space-time multiple feature based vehicle shadow eliminating method
CN113379785B (en) Saliency target detection method integrating boundary priori and frequency domain information
Chi et al. Wavelet-based texture-characteristic morphological component analysis for colour image enhancement

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant