CN106056031A - Image segmentation algorithm - Google Patents

Image segmentation algorithm Download PDF

Info

Publication number
CN106056031A
CN106056031A CN201610108090.5A CN201610108090A CN106056031A CN 106056031 A CN106056031 A CN 106056031A CN 201610108090 A CN201610108090 A CN 201610108090A CN 106056031 A CN106056031 A CN 106056031A
Authority
CN
China
Prior art keywords
image
image segmentation
threshold
segmentation
evaluation function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610108090.5A
Other languages
Chinese (zh)
Inventor
王燕妮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JIANGSU MEILUN IMAGING SYSTEMS Co Ltd
Original Assignee
JIANGSU MEILUN IMAGING SYSTEMS Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JIANGSU MEILUN IMAGING SYSTEMS Co Ltd filed Critical JIANGSU MEILUN IMAGING SYSTEMS Co Ltd
Priority to CN201610108090.5A priority Critical patent/CN106056031A/en
Publication of CN106056031A publication Critical patent/CN106056031A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text

Abstract

The invention relates to an image segmentation algorithm, and belongs to the technical field of electronic image segmentation. The image segmentation algorithm comprises the steps of (1) forming a one-dimensional histogram according to an original image; (2) determining best dual thresholds based on a Fisher evaluation function image segmentation method of the one-dimensional histogram. The beneficial effects are that the image segmentation algorithm provided by the invention has excellent image segmentation effects, and three types of segmentations for images can be realized reasonably. As for three types of grayscale images with frames, characters and backgrounds, the backgrounds, the frames and the characters can be well segmented out independently.

Description

A kind of image segmentation algorithm
Technical field
The present invention relates to a kind of image segmentation algorithm, belong to electronic image segmentation technology.
Background technology
Digital image processing is the important content of computer vision, accomplishes fluently solid foundation for further image recognition, Mainly include the contents such as noise filtering, pixel interpolation, image enhaucament and image segmentation.Image segmentation is one of them crucial ring Joint.The method having occurred in that thousands of kinds of image segmentations at present, does not has a kind of dividing method all to have very for all of image Good segmentation effect.The quality of segmentation result directly influences the correctness of problem solving in high-rise vision.Especially for three The class image i.e. image of band text border, background, existing image segmentation algorithm segmentation effect is poor, the picture effect dealt Tend not to meet the demand of client.
Summary of the invention
In order to solve the problems referred to above, the present invention is directed to band frame, word and the gray level image of background three class, it is provided that Yi Zhongneng Enough well by image segmentation algorithm independent to background, frame and word three class.
The technical scheme that the present invention provides is: a kind of image segmentation algorithm, the method comprises the steps:
Step one, is generated one dimensional image rectangular histogram by original image;
Step 2, determines optimal dual threshold based on one dimensional image histogrammic Fisher evaluation function image segmentation;
1. the w of three classifications it is provided with0、w1And w2A, B, C tri-part, with Fisher evaluation function J (Y) to three classifications Between separating degree be quantitatively described, it is defined as:
(formula 2.1)
Wherein, m0, m1And m2It is respectively w0、w1And w2Classification meansigma methods,WithFor w0、w1And w2Class in side Difference;
2. Lenna image histogram is carried out Double Thresholding Segmentation, select suitable two threshold values s1 and s2, image slices vegetarian refreshments (m, gray value n) be f (m, n) ∈ [0, L-1], each several part probability of three classifications is:
(formula 2.2)
(formula 2.3)
(formula 2.4)
Its average u0(s), u1(s), u2S () is respectively as follows:
(formula 2.5)
(formula 2.6)
(formula 2.7)
Wherein PiRepresent the probability of gray scale, Pi=fi/ N, fiFor the pixel of gray value i, N is total pixel;
3. three class w0、w1And w2Variance within clusters be respectively as follows:
(formula 2.8)
(formula 2.9)
(formula 3.0)
According to Fisher evaluation function single threshold image partition method, when image carries out three classes segmentations, utilize one-dimensional directly Side figure on projection meet each cluster between group variable sum two-by-two and intra-class variance and ratio reach very big, then comment based on Fisher The interpretational criteria of valency function Dual-threshold image segmentation method is:
The threshold value corresponding when J (s1, s2) obtains maximumFor optimal threshold, three classes separated is best, image Segmentation effect is optimal, and therefore using this Fisher evaluation function as the criterion of image Double Thresholding Segmentation, its threshold value is chosen as:
Step 3, on one dimensional histograms, does Double Thresholding Segmentation, and for pixel, (m n) has
Wherein, fs1,s2(m n) is segmentation result image, threshold valueFor optimal threshold, gray scale be f (m, n).
The beneficial effect that the present invention is reached:
What the present invention provided has good image segmentation, energy based on Fisher evaluation function Double Thresholding Segmentation method Three classes of image are split by enough reasonably realization.To band frame, word and the gray level image of background three class, can well be the back of the body Scape, frame and word three class individual segmentation are out.
Accompanying drawing explanation
Fig. 1 is the Two dimensional Distribution schematic diagram of the two class cluster situations of the present invention.
Fig. 2 is the Two dimensional Distribution schematic diagram of the three class cluster situations of the present invention.
Fig. 3 is the schematic diagram of the image histogram Double Thresholding Segmentation of the present invention.
Detailed description of the invention
The invention will be further described below in conjunction with the accompanying drawings.Following example are only used for clearly illustrating the present invention Technical scheme, and can not limit the scope of the invention with this.
One, the Fisher in pattern recognition is theoretical
In pattern recognition theory, it is possible to use evaluation function carries out feature selection, it is assumed that N-dimensional feature X is in a straight line Projection, should select a projection straight line, and the distance between formula class is maximum.As it is shown in figure 1, for two classifications w0And w1, it is assumed that all kinds of Feature be Two dimensional Distribution, such as the A in Fig. 1, part B, they are projected on straight line Y1 and Y2, linear group of feature vector, X Close y to be expressed as with (formula 1.1):
Y=YTX (formula 1.1)
When | | Y | | is when=1, then y is exactly X projection on Y-direction straight line.
In FIG, A represents that X belongs to w0Distribution;B represents that X belongs to w1Distribution;C representsX belongs to w1Distribution;D RepresentX belongs to w0Distribution;E representsX belongs to w0Distribution;F representsX belongs to w1Distribution.
Belong to wiMeansigma methods u of feature vector, XiRepresent with (formula 1.2):
(formula 1.2)
Wherein, niRepresent and belong to wiThe number of class X, converts X with (formula 1.1), obtains meansigma methods m of yiAnd variance within clusters
(formula 1.3)
(formula 1.4)
In order to make w0And w1Effectively identifying, what the feature of two classes should separate opens better and better, it is therefore necessary to an evaluation Function describes the separating degree between two classes, and Fisher evaluation function J (Y) faces and puts forward based on this thought, and it is permissible Separating degree between two classifications is carried out quantitative description, and it is defined as:
(formula 1.5)
m0For w0Classification meansigma methods, m1For w1Classification meansigma methods, from (formula 1.5) it can be seen that when two classifications are put down Average spacing is the biggest and all kinds of variance is the least, the meansigma methods spacing of two classifications and variance within clusters and ratio reach very big Time, J (Y) obtains maximum, and two class separating effects are optimal.
Two, Dual-threshold image segmentation method based on Fisher evaluation function
Be divided into the needs of three classes for some image, the present invention proposes a kind of dual threashold based on Fisher evaluation function Value image partition method.The half-tone information that this process employs image slices vegetarian refreshments projects, and image carries out three class segmentations.
Fig. 2 is three class cluster situation schematic diagrams, and in the drawings, A represents that X belongs to w0Distribution;B represents that X belongs to w1Distribution;C Represent that X belongs to w2Distribution;E representsX belongs to w0Distribution;F representsX belongs to w1Distribution;G representsX belongs to In w2Distribution;L representsX belongs to w2Distribution;M representsX belongs to w1Distribution;N representsX belongs to w0Point Cloth.
W for three classifications0、w1And w2A, B, C tri-part, in order to make w0、w1And w2Effectively identify, three classes What feature should separate opens better and better, during three classes segmentations when three classification meansigma methodss two-by-two distance the biggest and each variance within clusters of sum it The least, the average distance sum of like members two-by-two of each segmentation classification and all kinds of variance within clusters and ratio segmentation effect when reaching very big Most preferably, what three classes separated is best.Utilize Fisher evaluation function J (Y) that the separating degree between three classifications is quantitatively described, its It is defined as:
(formula 2.1)
m0For w0Classification meansigma methods, m1For w1Classification meansigma methods, m2For w2Classification meansigma methods,For w0Class in side Difference,For w1Variance within clusters,For w2Variance within clusters.When three classification meansigma methods the biggest and all kinds of differences of spacing sum and The least, when between the class two-by-two of each segmentation classification, average distance sum reaches very big with all kinds of variance within clusters sum ratios, segmentation effect is Good, J (Y) obtains maximum.
It is therefore desirable to utilize image histogram, choose two suitable threshold values, as it is shown on figure 3, image is carried out three classes Image segmentation.(m, gray value n) is that (m, n) image is divided into three to f by ∈ [0, L-1], threshold value s1 and s2 to image slices vegetarian refreshments Point, the probability of each several part:
(formula 2.2)
(formula 2.3)
(formula 2.4)
Its average u0(s), u1(s), u2S () is respectively as follows:
(formula 2.5)
(formula 2.6)
(formula 2.7)
Wherein PiRepresent the probability of gray scale, Pi=fi/ N, fiFor the pixel of gray value i, N is total pixel.
The variance within clusters of three classes is respectively as follows:
(formula 2.8)
(formula 2.9)
(formula 3.0)
According to Fisher evaluation function single threshold image partition method, when image carries out three class segmentations, it is considered to all kinds of Prior probability, utilize the projection on one dimensional histograms meet each cluster between group variable sum two-by-two and intra-class variance and ratio reach Greatly, then interpretational criteria based on Fisher evaluation function Dual-threshold image segmentation method is:(formula 3.1)
The threshold value corresponding when J (s1, s2) obtains maximumFor optimal threshold, three classes separated is best, image Segmentation effect is optimal, and therefore using this Fisher evaluation function as the criterion of image Double Thresholding Segmentation, its threshold value is chosen as:
For each pixel (m, n) its gray scale be f (m, n), then Double Thresholding Segmentation is determined as:
(formula 3.3)
According to above-mentioned analysis, can state such as based on one dimensional histograms Fisher evaluation function Dual-threshold image segmentation method Under:
(1) one dimensional histograms is formed by original image;
(2) Fisher evaluation function image segmentation based on one dimensional histograms determines optimal dual threshold;
(3) on one dimensional histograms, doing Double Thresholding Segmentation, for pixel, (m n) has
Wherein, fs1,s2(m n) is segmentation result image.
By Dual-threshold image segmentation method based on Fisher evaluation function, it is possible to well realize gray level image three The segmentation of class.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For Yuan, on the premise of without departing from the technology of the present invention principle, it is also possible to make some improvement and deformation, these improve and deformation Also should be regarded as protection scope of the present invention.

Claims (6)

1. an image segmentation algorithm, is characterized in that, the method comprises the steps:
Step one, is generated one dimensional image rectangular histogram by three original class images;
Step 2, determines optimal dual threshold based on one dimensional image histogrammic Fisher evaluation function image segmentation;
Step 3, on one dimensional histograms, does Double Thresholding Segmentation, and for pixel, (m n) has
Wherein, fS1, s2(m n) is segmentation result image, threshold valueFor optimal threshold, gray scale be f (m, n).
A kind of image segmentation algorithm the most according to claim 1, is characterized in that: described step 2 specifically includes:
1. the w of three classifications it is provided with0、w1And w2A, B, C tri-part, with Fisher evaluation function J (Y) to three classifications between Separating degree is quantitatively described, and it is defined as:
Wherein, m0, m1And m2It is respectively w0、w1And w2Classification meansigma methods,WithFor w0、w1And w2Variance within clusters;
2. one dimensional image rectangular histogram is carried out Double Thresholding Segmentation, select suitable two threshold values s1 and s2, and image slices vegetarian refreshments (m, n) Gray value be that (m, n) ∈ [0, L-1], each several part probability of three classifications is w to f0(s), w1(s), w2S (), its average is u0(s), u1(s), u2(s);
3. three class w0、w1And w2Variance within clusters be respectively as follows:
Wherein PiRepresent the probability of gray scale, Pi=fi/ N, fiFor the pixel of gray value i, N is total pixel;
According to Fisher evaluation function single threshold image partition method, when image carries out three class segmentations, utilize one dimensional histograms On projection meet each cluster between group variable sum two-by-two and intra-class variance and ratio reach very big, then based on Fisher evaluate letter The interpretational criteria of number Dual-threshold image segmentation method is:
The threshold value corresponding when J (s1, s2) obtains maximumFor optimal threshold, three classes separated is best, and image is split Best results, therefore using this Fisher evaluation function as the criterion of image Double Thresholding Segmentation.
A kind of image segmentation algorithm the most according to claim 2, is characterized in that: the threshold value choosing of described Fisher evaluation function It is selected as:
Wherein s1 and s2 is threshold value.
A kind of image segmentation algorithm the most according to claim 1, is characterized in that: three described classifications w0、w1And w2Each portion Point probability calculation formula is:
Wherein PiRepresenting the probability of gray scale, s1 and s2 is threshold value.
A kind of image segmentation algorithm the most according to claim 1, is characterized in that: its average u0(s), u1(s), u2(s)
Computing formula is respectively as follows:
Described w0、w1And w2It it is each several part probability of three classifications.
A kind of image segmentation algorithm the most according to claim 1, is characterized in that: described three class images are band word, background Image with frame.
CN201610108090.5A 2016-02-29 2016-02-29 Image segmentation algorithm Pending CN106056031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610108090.5A CN106056031A (en) 2016-02-29 2016-02-29 Image segmentation algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610108090.5A CN106056031A (en) 2016-02-29 2016-02-29 Image segmentation algorithm

Publications (1)

Publication Number Publication Date
CN106056031A true CN106056031A (en) 2016-10-26

Family

ID=57484339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610108090.5A Pending CN106056031A (en) 2016-02-29 2016-02-29 Image segmentation algorithm

Country Status (1)

Country Link
CN (1) CN106056031A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107966454A (en) * 2017-12-25 2018-04-27 陕西科技大学 A kind of end plug defect detecting device and detection method based on FPGA

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853494A (en) * 2010-05-24 2010-10-06 淮阴工学院 Color image segmentation method based on coring fuzzy Fisher criterion clustering
CN102542561A (en) * 2011-11-23 2012-07-04 浙江工商大学 Active contour synthetic aperture radar (SAR) image segmentation method based on Fisher distribution
US20140310314A1 (en) * 2013-04-16 2014-10-16 Samsung Electronics Co., Ltd. Matching performance and compression efficiency with descriptor code segment collision probability optimization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853494A (en) * 2010-05-24 2010-10-06 淮阴工学院 Color image segmentation method based on coring fuzzy Fisher criterion clustering
CN102542561A (en) * 2011-11-23 2012-07-04 浙江工商大学 Active contour synthetic aperture radar (SAR) image segmentation method based on Fisher distribution
US20140310314A1 (en) * 2013-04-16 2014-10-16 Samsung Electronics Co., Ltd. Matching performance and compression efficiency with descriptor code segment collision probability optimization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龚淑柯: "基于Fisher评价函数的图像分割方法", 《中国优秀博硕士学位论文全文数据库 (硕士)信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107966454A (en) * 2017-12-25 2018-04-27 陕西科技大学 A kind of end plug defect detecting device and detection method based on FPGA

Similar Documents

Publication Publication Date Title
CN110210413B (en) Multidisciplinary test paper content detection and identification system and method based on deep learning
CN104751142B (en) A kind of natural scene Method for text detection based on stroke feature
Yi et al. Text detection in natural scene images by stroke gabor words
WO2018145470A1 (en) Image detection method and device
CN107491730A (en) A kind of laboratory test report recognition methods based on image procossing
CN104408449B (en) Intelligent mobile terminal scene literal processing method
CN110866896B (en) Image saliency target detection method based on k-means and level set super-pixel segmentation
JP2003515230A (en) Method and system for separating categorizable symbols of video stream
CN101122953A (en) Picture words segmentation method
CN101122952A (en) Picture words detecting method
Jia et al. Deep convolutional neural network based HEp-2 cell classification
CN110889311A (en) Financial electronic facsimile document identification system and method
Gattal et al. Automatic parameter tuning of k-means algorithm for document binarization
Yogarajah et al. A dynamic threshold approach for skin tone detection in colour images
Shivakumara et al. A new RGB based fusion for forged IMEI number detection in mobile images
CN110334631B (en) Sitting posture detection method based on face detection and binary operation
CN109272522B (en) A kind of image thinning dividing method based on local feature
CN101802844B (en) Applying a segmentation engine to different mappings of a digital image
JP3923243B2 (en) Character extraction method from color document image
CN106056031A (en) Image segmentation algorithm
Liu et al. Detection and segmentation text from natural scene images based on graph model
CN106446904A (en) Image recognition method based on global binarization
Sreedevi et al. Ngfica based digitization of historic inscription images
CN116246298A (en) Space occupation people counting method, terminal equipment and storage medium
JP2012003358A (en) Background determination device, method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161026