GB2399629A - Automatic thresholding algorithm method and apparatus - Google Patents

Automatic thresholding algorithm method and apparatus Download PDF

Info

Publication number
GB2399629A
GB2399629A GB0401385A GB0401385A GB2399629A GB 2399629 A GB2399629 A GB 2399629A GB 0401385 A GB0401385 A GB 0401385A GB 0401385 A GB0401385 A GB 0401385A GB 2399629 A GB2399629 A GB 2399629A
Authority
GB
United Kingdom
Prior art keywords
image
thresholding
threshold
areas
area
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.)
Withdrawn
Application number
GB0401385A
Other versions
GB0401385D0 (en
Inventor
Dongbin Chen
Gary Holloway
Martin Lewin
Mansoor Sarhadi
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.)
Brunel University
Original Assignee
Brunel 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 Brunel University filed Critical Brunel University
Publication of GB0401385D0 publication Critical patent/GB0401385D0/en
Publication of GB2399629A publication Critical patent/GB2399629A/en
Withdrawn legal-status Critical Current

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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper

Landscapes

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

Abstract

The present invention provides a multi-threshold algorithm which is used to categorise areas of an image into a plurality of different categories. Each area or group of areas is then subjected to its own thresholding algorithm. The method provides for accurate identification of features of an image, such as edge features. By using a first thresholding algorithm a threshold applicable to each of a plurality of image areas is determined and image areas are classified based on these determined thresholds. For image areas which include a plurality of classification possibilities, a second thresholding step is performed within said area to determine a threshold related to an image parameter (e.g. intensity). The area may be divided into up to seven vertical areas as part of this second thresholding step. In order to visualise edges more clearly, the image may be presented as a three value image after the first thresholding step, for example, with different thresholds being subsequently applied within image areas including plural classifications to enhance edge visualisation.

Description

AUTOMATIC THRESHOLDING ALGORITHM METHOD AND APPARATUS
The present invention is directed to a method and apparatus for providing automatic thresholding in, for example, an imaging system.
It is known for material surface analysis to use an imaging system to capture images from the material surface and to analyse the features of the material surface by image processing methods. Edge information, such as amount, lengths and widths, is often used to analyse the material surface. Thresholding algorithms are one of the basic methods to obtain edges from images.
The goal of thresholding algorithms is to divide an image into regions that correspond to same characteristic objects in the scene. The key to automatic thresholding algorithms is how to obtain automatically the proper threshold values from images. Most thresholding algorithms are based on the statistics of the grey level histogram of an image or the two-dimensional co-occurrence matrix of an image. In another view, thresholding algorithms can be divided into two classes as point-based thresholding algorithms and region-based thresholding algorithms. Regionbased thresholding algorithms assign pixels to a certain region by taking local image properties into account. It is to analyse the neighbourhood of a pixel for the occurrence of properties that cluster for a region.
Searching regions of similar image properties uses two methods. These are pixel clustering and boundary determination. Pixel clustering is a region growing process, which method is to select a seed pixel in an area of interest region and then to expand it in all directions until the properties of the image change. The boundary of the image is found implicitly by this method. The boundary determination is explicitly aimed at locating the boundary of an image initially. Then, the located boundary implicitly determines its region. The two kinds of image thresholding algorithms have their own advantages in different applications. Sometimes, a combined algorithm is most adequate.
Many existing automatic thresholding algorithms can obtain good segment results for different images. For example, the grey histogram is obtained for those pixels that are dark and for those pixels that are bright. The lowest value between the two groups of the clusters in the histogram is chosen as the threshold. Moment preserving thresholding is another method that segments an image based on the condition that the threshold image has the same moments as the original image. Otsu's method described in "A Threshold Selection Method from Gray-Level Histogram", IEEE Transactions on System Man Cybernetics, Vol. SMC-9, No. 1, 1979, pp. 62-66, chooses the optimal thresholds by maximising the between-class variance with an exhaustive search.
The methods based on the two-dimensional co-occurrence matrix of an image essentially segment an image by using spatial information in an image. Kirby and Rosenfeld in [copy 3] proposed a two-dimensional thresholding method that simultaneously considers both the pixel gray level and the local statistics of its neighboring pixels. Entropic thresholding algorithm is a particular two- dimensional method. It makes use of spatial entropy to find the optimal thresholds. As Abutaleb in [copy 4], and [copy 5] presenteed that optimal thresholds can be selected by maximizing the sum of the posterior entropies of two classes.
However, their method is very time-consuming at determining the twodimensional total entropy of the resulting two classes.
In current automatic thresholding algorithms, the global feature statistic information is used to obtain the threshold to segment or to binate material images in material vision inspection. The main shortcoming of all above algorithms is that they cannot obtain an ideal result when material images are not perfect, such as sunshine just illuminates the partial image when the image is captured, or the light source you used does not have a good even distribution on the imaging surface. They are common problems in industrial applications.
The present invention seeks to provide an improved system and apparatus for calculating thresholds of an image and an improved imaging system.
According to an aspect of the present invention, there is provided a method of determining a threshold for analysing an image, including the steps of using a first thresholding algorithm to determine the threshold applicable to each of a plurality of image areas, classifying the image areas based upon the determined threshold in the first thresholding step, determining if the image areas fall within a plurality of classifications and if so then carrying out a second thresholding step to determine a threshold related to an image parameter for each image area in a said area classification.
In the preferred embodiment, the image parameter is light intensity. The first multi-thresholding step is carried out for the purpose of classifying the image areas to obtain intensity distribution of an image. The results of the intensity distribution are then used to divide the image into several geometrical areas. In each area, a thresholding algorithm is used to obtain the threshold of that area and to segment the area.
In the preferred embodiment, the first and second thresholding steps use the same thresholding algorithm. Most preferably, the algorithm used is Otsu's algorithm.
According to another aspect of the present invention, there is provided a system for determining a threshold for analysing an image, including means for reading an image, processing means providing a first thresholding algorithm for determining the threshold applicable to each of a plurality of image areas, for classifying the image areas based upon the determined threshold in the first thresholding step, for determining if the image areas fall within a plurality of classifications and if so for carrying out a second thresholding step to determine a threshold related to an image parameter for each image area in a said area classification.
Embodiments of the present invention are described below, by way of example only, with reference to the accompanying drawings, in which: Figure 1 shows a flow chart of a preferred embodiment of method of automatic thresholding; Figure 2 is a flow diagram of a preferred embodiment of searching strategy; Figure 3 shows an original image with 256 grey intensity; Figure 4 shows the edge of the image analysed by the Sobel operator; Figure 5 shows a segmented image of Figure 4 obtained by Otsu's thresholding algorithm; Figure 6 shows a segmented image of the edge image of Figure 4, which has been segmented by a method according to an embodiment of the present invention; Figure 7 is a classified intensity image of the original image; and Figure 8 is a table of thresholds and their image areas according to the methods of Figures and 6.
The success of histogram thresholding algorithms depends entirely on the separability of the grey level bands in the histogram and of the spatial occurrence of the grey levels. Otsu used a clustered analysis to calculate automatically the histogram threshold from the image, and then used this threshold to binarise the image. Suppose that the original image is f(x, y), its binary image is 8(x, y) and threshold value is T. The automatic image thresholding algorithm based on an adapted histogram threshold consists of the following six steps: Step 1: uses a statistical method to calculate the histogram of fix, y). It is defined as h(i).
Step 2: uses Eq.1 to calculate the grey level average FIT. 25s
pT = Zih(i) Eq. 1 i=o Step 3: calculates the zero order moment c(k) and first order moment p(k). Here k is a series of integers from O to 255.
00(k) = Hi) Eq. 2 i=o k P(k) = ih(i) Eq. 3 i=o Step 4: calculates the clustering function c,B(k) by the Eq. 4. Here k is the same as the above k.
(k) [,uTa)(k)-,u(k)]2 Eq. 4 Step 5: searching the maximum value of aB(k). The k that corresponds to the maximum value aB(k) is the optimum threshold T in the image.
T = Arg Max{crB(k)} Eq. 5 Step 6: using the optimum threshold T to binarise the image f(x, y). The output threshold image 8(x, y) is given by: g(x,y) = 255,f(x,y) 2 T E 6 g(x,y) = 0,f(x,y) < T q.
Figure 5 shows the resulting image of the Otsu's thresholding algorithm. Figure 3 is the original fibre image that was captured from the real world.
Otsu's algorithm can be extended to obtain multi-thresholds from an image. Supposing that an image is divided into M classes by M-1 thresholds, {to, t2,...tM I}, which depend on its histogram of pixel intensity. The M-1 thresholds, {to, t2,...tM I}, are selected by maximum aB(t, t2,...tM I). The M classes are clustered, such as by Cal [0, 1,...,t], C2 [to + 1, ,t2], Cj [tj I+ 1, ,tj], , and CM [tM l+1, ,255] (J8(t',t2,---,tM ') = () folk)] Eq. 7 k=! o)(k)[1- o)(k)] {Tl,T2,...,T" -1}= Arg MaX{B(tl,t2,...,tM - I)} Eq. 8 The thresholds {t', t2,. . .tM} are determined by Eq. 7 and Eq. 8.
The preferred automatic thresholding algorithm can be said to include the following steps.
The first step uses Otsu's multi-thresholding algorithm to cluster the intensity histogram of an image as three classes and to present the image and three-value image according to the classification result, the values being 0, 127 and 255 in this embodiment. Depending on the three-value image, in the second step, the developed searching strategy is used to divide the image into up to seven vertical areas. In every separated vertical area, it is in a third step that Otsu's thresholding algorithm is applied to obtain the threshold and using the threshold binaries the local image. The procedure of the automatic thresholding algorithm is shown in Figure 1.
The task of the searching strategy divides an image into seven or fewer vertical areas in which the areas have similar intensity distributions. According to its three-value image, the search strategy is developed as described below.
Suppose that each twenty neighbour vertical image lines in the image are considered as a searching group. We define the first searching rule that the local image of the searching group belongs to A class if most pixels are O in the searching group, that the local image of the searching group belongs to B class if most pixels are 127 in the searching group, belongs to C class if most pixels are 255 in the searching group. When the neighbour searching groups belong to a same class they are categorised into one area. When the neighbour groups do not belong to a same class, the second searching rule is used to find to which class the image lines in the neighbour groups belong. The second rule provides that each five neighbour vertical image lines are divided into a small searching group if the two neighbour searching groups do not belong to the same class. Then, the first rule is used to determine to which class the local image of the small searching groups belong.
The third searching rule provides that the searching group is extended to fifty vertical image lines if the divided areas are more than seven in the image when the first rule and the second rule are used to classify the image. Then, depending on the first rule and the second rule, the searching group that is defined in the third rule is used to classify the Image agam.
A real world image, a fibre material image, was selected for evaluating the performance of the automatic thresholding algorithm described above. The task was to obtain the edge information of the fibre material surface. A Sobel operator and the automatic thresholding algorithm described above were applied to obtain the edge information from the fibre material image.
This image was captured under a light source of which its illumination distribution was not even on the imaging surface because of the structure of the light source. The original image is shown in Figure 3, which has 590 x 590 pixels with 256 grey intensities. Figure 4 is the edge image of the original image obtained by the Sobel operator. Figure 5 is the segmented image of Figure 4 obtained by Otsu's thresholding algorithm disclosed herein.
Figure 6 is the segmented image of the original image, which algorithm is a multi-thresholding algorithm based on Otsu. Figure 8 shows the threshold values of both Figure 5 and Figure 6, and the classified image areas by the automatic thresholding algorithm.
As can be seen, Figure 6 provides a segmented result which is better than Figure 5. The left part of Figure 6 shows the edge details more than Figure 5. The reason is that the threshold values of Figure 6 are for a smaller area than Figure 5. These threshold values are shown in Figure 8. Figure 6, right part, shows the noise less than Figure 5, right part.
Because the threshold value of Figure 6, right part, is larger than in Figure 5, the noise of Figure 6, right part, is constrained much more than in Figure 5. Therefore the disclosed automatic thresholding algorithm is more adaptive than Otsu's thresholding algorithm and other thresholding algorithms with single threshold.
Thus, the described preferred algorithm uses the Otsu thresholding algorithm to classify the grey intensities of the image. A new searching strategy is thus provided.
The fibre material image verified that this method is reliable and feasible in terms of abstracting the edge information in an industrial environment. The method can be used to analyse material surfaces especially when a vision system work in the normal environment where the illumination conditions are not ideal or randomly disturbed. The automatic thresholding algorithm can provide that the vision system obtains a better segmented result in any working environment than from prior art systems.
On the basis of the description herein, the skilled person will immediately appreciate the system components required to implement the method taught, including the provision of an image capture device, processing means and user interface means.

Claims (19)

1. A method of determining a threshold for analysing an image, including the steps of using a first thresholding algorithm to determine the threshold applicable to each of a plurality of image areas, classifying the image areas based upon the determined threshold in the first thresholding step, determining if the image areas fall within a plurality of classifications and if so then carrying out a second thresholding step to determine a threshold related to an image parameter for each image area in a said area classification.
2. A method according to claim 1, wherein the image parameter is light intensity.
3. A method according to claim 1 or 2, wherein the first thresholding step is carried out for the purpose of classifying the image areas to obtain intensity distribution of an image.
4. A method according to claim 3, wherein the results of the intensity distribution are used to divide the image into several geometrical areas.
5. A method according to any preceding claim, wherein In each area, a thresholding algorithm is used to obtain the threshold of that area and to segment the area.
6. A method according to any preceding claim, wherein the first and second thresholding steps use the same thresholding algorithm.
7. A method according to claim 6, wherein the algorithm used is Otsu's algorithm.
8. A method according to any preceding claim, wherein the first thresholding step separates an image in up to three classes and presents the image as an up to three-value image according to the classification result.
9. A method according to claim 8, wherein the classification step divides the image into up to seven vertical areas.
10. A method according to claim 9, wherein for every separated vertical area, the second thresholding algorithm is applied to obtain the threshold.
11. A method according to any preceding claim, wherein neighbouring image areas are grouped together and assigned a classification related to the most common classification in the group.
12. A system for determining a threshold for analysing an image, including means for reading an image, processing means providing a first thresholding algorithm for determining the threshold applicable to each of a plurality of image areas, for classifying the image areas based upon the determined threshold in the first thresholding step, for determining if the image areas fall within a plurality of classifications and if so for carrying out a second thresholding step to determine a threshold related to an image parameter for each image area in a said area classification.
13. A system according to claim 12, wherein the image parameter is light intensity.
14. A system according to claim 12 or 13, wherein the first thresholding step is carried out for the purpose of classifying the image areas to obtain intensity distribution of an Image.
15. A system according to claim 14, wherein the processing means is operable to use the results of the intensity distribution to divide the image into several geometrical areas.
16. A system according to any one of claims 12 to 15, wherein the processing means is operable to use for each area a thresholding algorithm to obtain the threshold of that area and to segment the area.
17. A system according to any one of claims 12 to 16, wherein the processing means uses the same thresholding algorithm for the first and second thresholding steps.
18. A system according to claim 17, wherein the processing means uses Otsu's algorithm.
19. A system according to any one of claims 12 to 18, wherein the processing means is operable to group neighbouring image areas together and to assign a classification related to the most common classification in the group.
GB0401385A 2003-01-22 2004-01-22 Automatic thresholding algorithm method and apparatus Withdrawn GB2399629A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GBGB0301434.7A GB0301434D0 (en) 2003-01-22 2003-01-22 A new automatic thresholding algorithm based on multi-thresholds

Publications (2)

Publication Number Publication Date
GB0401385D0 GB0401385D0 (en) 2004-02-25
GB2399629A true GB2399629A (en) 2004-09-22

Family

ID=9951574

Family Applications (2)

Application Number Title Priority Date Filing Date
GBGB0301434.7A Ceased GB0301434D0 (en) 2003-01-22 2003-01-22 A new automatic thresholding algorithm based on multi-thresholds
GB0401385A Withdrawn GB2399629A (en) 2003-01-22 2004-01-22 Automatic thresholding algorithm method and apparatus

Family Applications Before (1)

Application Number Title Priority Date Filing Date
GBGB0301434.7A Ceased GB0301434D0 (en) 2003-01-22 2003-01-22 A new automatic thresholding algorithm based on multi-thresholds

Country Status (1)

Country Link
GB (2) GB0301434D0 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7978917B2 (en) 2004-10-28 2011-07-12 British Telecommunications Public Limited Company Method and system for processing video data including foreground extraction
CN102324099A (en) * 2011-09-05 2012-01-18 广东工业大学 Step edge detection method oriented to humanoid robot
CN104732519A (en) * 2015-01-20 2015-06-24 中国科学院半导体研究所 Robust global threshold segmentation method
CN106600606A (en) * 2016-12-19 2017-04-26 上海电气自动化设计研究所有限公司 Ship painting profile detection method based on image segmentation
CN107490584A (en) * 2017-09-16 2017-12-19 河北工业大学 A kind of disconnected grid defect inspection method of solar battery sheet EL tests
CN108108739A (en) * 2017-12-18 2018-06-01 上海联影医疗科技有限公司 Detection method, device, x-ray system and the storage medium of image target area
CN108247649A (en) * 2018-01-30 2018-07-06 深圳源广安智能科技有限公司 It is a kind of that there is the intelligent robot of tourism guiding
CN108288388A (en) * 2018-01-30 2018-07-17 深圳源广安智能科技有限公司 A kind of intelligent traffic monitoring system
CN108520498A (en) * 2018-03-19 2018-09-11 大连理工大学 A kind of high efficiency crystalline shade noise remove method in crystal structure process monitoring

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658424B (en) * 2018-12-07 2022-12-30 中央民族大学 Improved robust two-dimensional OTSU threshold image segmentation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0239936A2 (en) * 1986-03-31 1987-10-07 Wang Laboratories Inc. A tresholding algorithm selection apparatus
US4710822A (en) * 1982-09-21 1987-12-01 Konishiroku Photo Industry Co., Ltd. Image processing method
JPH0888770A (en) * 1994-09-16 1996-04-02 Toshiba Corp Image processing unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4710822A (en) * 1982-09-21 1987-12-01 Konishiroku Photo Industry Co., Ltd. Image processing method
EP0239936A2 (en) * 1986-03-31 1987-10-07 Wang Laboratories Inc. A tresholding algorithm selection apparatus
JPH0888770A (en) * 1994-09-16 1996-04-02 Toshiba Corp Image processing unit

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7978917B2 (en) 2004-10-28 2011-07-12 British Telecommunications Public Limited Company Method and system for processing video data including foreground extraction
CN102324099A (en) * 2011-09-05 2012-01-18 广东工业大学 Step edge detection method oriented to humanoid robot
CN104732519B (en) * 2015-01-20 2019-03-12 中国科学院半导体研究所 The global threshold dividing method of robust
CN104732519A (en) * 2015-01-20 2015-06-24 中国科学院半导体研究所 Robust global threshold segmentation method
CN106600606A (en) * 2016-12-19 2017-04-26 上海电气自动化设计研究所有限公司 Ship painting profile detection method based on image segmentation
CN107490584A (en) * 2017-09-16 2017-12-19 河北工业大学 A kind of disconnected grid defect inspection method of solar battery sheet EL tests
CN107490584B (en) * 2017-09-16 2020-06-09 河北工业大学 Solar cell EL test broken grid defect detection method
CN108108739A (en) * 2017-12-18 2018-06-01 上海联影医疗科技有限公司 Detection method, device, x-ray system and the storage medium of image target area
CN108108739B (en) * 2017-12-18 2021-11-16 上海联影医疗科技股份有限公司 Method and device for detecting image target area, X-ray system and storage medium
CN108247649A (en) * 2018-01-30 2018-07-06 深圳源广安智能科技有限公司 It is a kind of that there is the intelligent robot of tourism guiding
CN108288388A (en) * 2018-01-30 2018-07-17 深圳源广安智能科技有限公司 A kind of intelligent traffic monitoring system
CN108520498A (en) * 2018-03-19 2018-09-11 大连理工大学 A kind of high efficiency crystalline shade noise remove method in crystal structure process monitoring
CN108520498B (en) * 2018-03-19 2020-11-03 大连理工大学 Efficient crystal shadow noise removal method in crystal crystallization process monitoring

Also Published As

Publication number Publication date
GB0401385D0 (en) 2004-02-25
GB0301434D0 (en) 2003-02-19

Similar Documents

Publication Publication Date Title
CN104834912B (en) A kind of weather recognition methods and device based on image information detection
US8311338B2 (en) Method and system for learning a same-material constraint in an image
WO2011084142A1 (en) Image segregation system with method for handling textures
US8200013B2 (en) Method and device for segmenting a digital cell image
JP4098021B2 (en) Scene identification method, apparatus, and program
CN114004834B (en) Method, equipment and device for analyzing foggy weather condition in image processing
GB2399629A (en) Automatic thresholding algorithm method and apparatus
Soriano et al. Image classification of coral reef components from underwater color video
Biswas et al. A global-to-local approach to binarization of degraded document images
JP2004045356A (en) Surface defect detection method
CA2375314A1 (en) Computer aided detection of masses and clustered microcalcification strategies
Huang et al. Image segmentation using edge detection and region distribution
Nammalwar et al. A generic framework for colour texture segmentation
JP4088019B2 (en) Defect inspection equipment
Banerjee et al. Color image segmentation technique using natural grouping of pixels
Fang et al. A novel adaptive colour segmentation algorithm and its application to skin detection
Lin et al. Foreground object detection in highly dynamic scenes using saliency
Shrestha et al. Segmentation of plant from background using neural network approach
Li et al. Biomedical image segmentation based on shape stability
CN113139936B (en) Image segmentation processing method and device
Aziz et al. Color segmentation for a region-based attention model
Singh et al. Detection of new image objects in video sequences using neural networks
Saberkari Accurate fruits fault detection in agricultural products using an efficient algorithm
Peng et al. Adaptive local thresholding for fluorescence cell micrographs
Rawashdeh et al. Hierarchical Image Segmentation by Structural Content.

Legal Events

Date Code Title Description
WAP Application withdrawn, taken to be withdrawn or refused ** after publication under section 16(1)