CN100580694C - Rapid multi-threshold value dividing method for gray-scale image - Google Patents
Rapid multi-threshold value dividing method for gray-scale image Download PDFInfo
- Publication number
- CN100580694C CN100580694C CN200810064059A CN200810064059A CN100580694C CN 100580694 C CN100580694 C CN 100580694C CN 200810064059 A CN200810064059 A CN 200810064059A CN 200810064059 A CN200810064059 A CN 200810064059A CN 100580694 C CN100580694 C CN 100580694C
- Authority
- CN
- China
- Prior art keywords
- array
- peak value
- gray scale
- gray
- threshold value
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the digital image processing technical field, and discloses a method used for a quick multi-threshold segmentation to a gray image. The method comprises the following steps of reading the gray image firstly, and calculating a gray histogram for the gray image; smoothing the obtained histogram to obtain a smooth histogram, selecting a plurality of maximum peak points from the smooth histogram and acquiring a gray value array corresponding to the maximum peak points; expanding two ends of the gray value array, making two adjacent elements in the expanded array added and divided by two to obtain a threshold required by the multi-threshold segmentation, thereby realizing the multi-threshold segmentation.
Description
Technical field
What the present invention relates to is a kind of digital image processing techniques, specifically a kind ofly is used for the method that the gray level image rapid multi-threshold value is cut apart.
Background technology
Cutting techniques is the image model base of recognition, has purposes widely, all is a hot research problem in the middle of scientific research, production.Many Threshold Segmentation can be used for discerning the target with different color or gray scale or be used for discerning the target that gray scale changes in close limit very.As in side-scan sonar Target Recognition task, shade can be used as a feature of target, but because the echo strength and the shadow region of seabed background are close, so generally speaking, the two-value partitioning algorithm is difficult to the shadow region is extracted.And present numerous many Threshold Segmentation technology are because the big reason of calculated amount is difficult to requirement of real time.
Summary of the invention
The invention provides a kind of many Threshold Segmentation that can realize gray level image, and the method that the gray level image rapid multi-threshold value is cut apart that is used for of the real-time requirement that is content with very little.
The object of the present invention is achieved like this:
(1) read gray level image to be split, and it is deposited among the two dimensional image array A, each gray values of pixel points is all in 0~255 scope;
(2) traversing graph obtains the grey level histogram of image as array A;
(3) make grey level histogram pass through a low-pass filter, obtain smoothed histogram;
(4) open up two arrays of peak value array and gray scale array, and two arrays all are initialized as 0, peak value array and grey group are preserved the gray scale of histogram peak and peak value correspondence respectively, and the element that the peak value array is identical with the gray scale array index is one to one;
(5) traversal smoothed histogram deposits the gray scale that newly obtains peak value and peak value correspondence in peak value array and gray scale array last respectively, then with peak value array and gray scale array sort;
(6) the gray scale array of utilizing step (5) to obtain is determined each threshold value of many Threshold Segmentation;
(7) traversing graph is as array A, and each threshold ratio that obtains in each element and the step (6) among the A obtains a label, deposits the corresponding position of two-dimentional label array B in, realizes that the rapid multi-threshold value of gray level image is cut apart.
The present invention can also comprise some features like this:
1. peak value array described in the step (4) and gray scale array size equal the preset threshold value number n.
2. the ordering described in the step (5), peak value array are by the direct method ordering, and the gray scale array is made corresponding the change according to the variation of peak value array, make peak value corresponding gray scale value constant.
3. each threshold value determination method of the many Threshold Segmentation described in the step (6) is for to carry out descending sort with the gray scale array, take out preceding n-1 element in the gray scale array then, its the right and left is expanded, the extensible element on the left side is 0, the extensible element on the right is 255, obtain a new one-dimension array C, first left element from C, the adjacent element addition of this element and its right just obtains the threshold value array D that requires divided by 2 again, this process lasts till n the element of array C always, and each element among the array D is a n threshold value of requirement.
The present invention is based on many Threshold Segmentation of grey level histogram.Because multiobject existence, grey level histogram has multimodal, and therefore the some corresponding gray scale is one as threshold value and more reasonably estimates among adjacent two peaks, and this is the core concept of this gray level image rapid multi-threshold value dividing method just also.
Experiment shows, be of a size of 330 * 244 gray level image for a width of cloth, at a CPU is AMD1600+, operating system is Windows2000, programmed environment is under the condition of VC6.0, carry out 10 milliseconds consuming time altogether of 2 Threshold Segmentation, 3 Threshold Segmentation, 4 Threshold Segmentation and 5 Threshold Segmentation simultaneously, can reach the real-time requirement fully.And other many thresholding algorithms do not provide the data of the execution time aspect of algorithm at present.
Description of drawings
Fig. 1 is a FB(flow block) of the present invention.
Fig. 2 is the array C described in the step 6 of the present invention.
Fig. 3 is the array D described in the step 6 of the present invention.
Fig. 4 is a gray level image of 330 * 244 that is of a size of to be split.
Fig. 5 is with the binary segmentation result of Otsu method to Fig. 4.
Fig. 6 utilizes the four Threshold Segmentation results of the present invention to Fig. 4.
Embodiment
The invention will be further described for example below in conjunction with accompanying drawing.
1. read gray level image to be split (Fig. 4), and it is deposited among the two dimensional image array A, each gray values of pixel points is all in 0~255 scope.
2. traversing graph obtains the grey level histogram of image as array A.
3. make grey level histogram pass through a low-pass filter, obtain smoothed histogram.
4. open up two arrays---peak value array and gray scale array, and two arrays all are initialized as 0.Peak value array and grey group are preserved the gray scale of histogram peak and peak value correspondence respectively, and the element that the peak value array is identical with the gray scale array index is one to one, and peak value array and gray scale array size should equal the preset threshold value number n.
5. the traversal smoothed histogram deposits the gray scale that newly obtains peak value and peak value correspondence in peak value array and gray scale array last respectively, then with peak value array and gray scale array sort.The peak value array is by the direct method ordering, and the gray scale array is made corresponding the change according to the variation of peak value array, make peak value corresponding gray scale value constant.
6. the gray scale array is carried out descending sort, take out preceding n-1 element in the gray scale array then, this n-1 element the right and left expanded, the extensible element on the left side is 0, the extensible element on the right is 255, obtain a new one-dimension array C (as shown in Figure 2), this array comprises n+1 element, from the first left element, this element and its right adjacent element addition have just obtained the threshold value array D (as shown in Figure 3) that requires divided by 2 again, and this process lasts till n the element of array C always.Comprise n element among the array D altogether, this n element is exactly a n threshold value of requirement.
7. traversing graph is as array A, and each threshold ratio among the A among each element and the D obtains a label, deposit the corresponding position of two-dimentional label array B in, thereby the rapid multi-threshold value of having realized gray level image is cut apart.Wherein, each element is D[0 among the D] ... D[n-1], when the element among the A smaller or equal to D[k] time (k=0,1 ... n-1), then in B correspondence position give label k, when element among the A greater than D[n-1] time, then correspondence position is given label n in B, thereby realizes the many Threshold Segmentation to image.
Claims (3)
1. one kind is used for the method that the gray level image rapid multi-threshold value is cut apart, and it is characterized in that comprising the steps:
(1) read gray level image to be split, and it is deposited among the two dimensional image array A, each gray values of pixel points is all in 0~255 scope;
(2) traversing graph obtains the grey level histogram of image as array A;
(3) make grey level histogram pass through a low-pass filter, obtain smoothed histogram;
(4) open up two arrays of peak value array and gray scale array, and two arrays all are initialized as 0, peak value array and grey group are preserved the gray scale of histogram peak and peak value correspondence respectively, and the element that the peak value array is identical with the gray scale array index is one to one;
(5) traversal smoothed histogram deposits the gray scale that newly obtains peak value and peak value correspondence in peak value array and gray scale array last respectively, then with peak value array and gray scale array sort;
(6) the gray scale array is carried out descending sort, take out preceding n-1 element in the gray scale array then, this n-1 element the right and left expanded, the extensible element on the left side is 0, the extensible element on the right is 255, obtain a new one-dimension array C, this array comprises n+1 element, from the first left element, the adjacent element addition of this element and its right just obtains the threshold value array D that requires divided by 2 again, this process lasts till n the element of array C always, comprises n element among the array D altogether, and this n element is exactly a n threshold value of requirement;
(7) traversing graph is as array A, and each threshold ratio that obtains in each element and the step (6) among the A obtains a label, deposits the corresponding position of two-dimentional label array B in, realizes that the rapid multi-threshold value of gray level image is cut apart.
2. according to claim 1ly be used for the method that the gray level image rapid multi-threshold value is cut apart, it is characterized in that: peak value array described in the step (4) and gray scale array size equal the preset threshold value number n.
3. according to claim 1 and 2ly be used for the method that the gray level image rapid multi-threshold value is cut apart, it is characterized in that: the ordering described in the step (5), the peak value array is by the direct method ordering, and the gray scale array is made corresponding the change according to the variation of peak value array, make peak value corresponding gray scale value constant.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810064059A CN100580694C (en) | 2008-03-03 | 2008-03-03 | Rapid multi-threshold value dividing method for gray-scale image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810064059A CN100580694C (en) | 2008-03-03 | 2008-03-03 | Rapid multi-threshold value dividing method for gray-scale image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101236607A CN101236607A (en) | 2008-08-06 |
CN100580694C true CN100580694C (en) | 2010-01-13 |
Family
ID=39920212
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810064059A Expired - Fee Related CN100580694C (en) | 2008-03-03 | 2008-03-03 | Rapid multi-threshold value dividing method for gray-scale image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100580694C (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101887584B (en) * | 2010-07-07 | 2012-03-28 | 清华大学 | Fitness random search behavior-based multi-threshold image segmentation method |
CN102663390B (en) * | 2012-04-28 | 2014-04-30 | 长春迪瑞医疗科技股份有限公司 | Flow-cytometry microscopic image binaryzation method |
CN102819841B (en) * | 2012-07-30 | 2015-01-28 | 中国科学院自动化研究所 | Global threshold partitioning method for partitioning target image |
CN102843492A (en) * | 2012-08-10 | 2012-12-26 | 北京航空航天大学 | Overlap scanning and image separating method based on transmission scanning |
CN102915538B (en) * | 2012-09-18 | 2016-05-18 | 成都金盘电子科大多媒体技术有限公司 | A kind of bianry image automatic Selection of Image Threshold based on biological vision |
CN103295226B (en) * | 2013-04-25 | 2016-05-04 | 哈尔滨工程大学 | A kind of non-supervisory sonar image dividing method based on MRF model |
CN104243820B (en) * | 2014-09-03 | 2018-02-16 | 奇瑞汽车股份有限公司 | A kind of method and device for determining image boundary |
CN104318575B (en) * | 2014-11-04 | 2017-02-15 | 江西理工大学 | Multi-threshold image segmentation method based on comprehensive learning differential evolution algorithm |
CN105701807B (en) * | 2016-01-12 | 2019-05-10 | 西北工业大学 | A kind of image partition method based on temporal voting strategy |
CN106327497A (en) * | 2016-08-29 | 2017-01-11 | 湖南文理学院 | Gray-scale image threshold segmentation method based on super-extensive entropy |
CN111145130B (en) * | 2019-12-06 | 2023-05-30 | Oppo广东移动通信有限公司 | Image processing method and device and storage medium |
-
2008
- 2008-03-03 CN CN200810064059A patent/CN100580694C/en not_active Expired - Fee Related
Non-Patent Citations (4)
Title |
---|
几种阈值分割法在工程图自动识别中的应用. 赖有华,叶海建.江西理工大学学报,第27卷第4期. 2006 |
几种阈值分割法在工程图自动识别中的应用. 赖有华,叶海建.江西理工大学学报,第27卷第4期. 2006 * |
基于过渡区提取的多阈值图像分割. 闫成新,桑农,张天序.华中科技大学学报(自然科学版),第33卷第1期. 2005 |
基于过渡区提取的多阈值图像分割. 闫成新,桑农,张天序.华中科技大学学报(自然科学版),第33卷第1期. 2005 * |
Also Published As
Publication number | Publication date |
---|---|
CN101236607A (en) | 2008-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100580694C (en) | Rapid multi-threshold value dividing method for gray-scale image | |
Bruno et al. | Fractal dimension applied to plant identification | |
CN110866896B (en) | Image saliency target detection method based on k-means and level set super-pixel segmentation | |
CN112132153B (en) | Tomato fruit identification method and system based on clustering and morphological processing | |
CN102324099A (en) | Step edge detection method oriented to humanoid robot | |
CN112365511B (en) | Point cloud segmentation method based on overlapped region retrieval and alignment | |
CN105787492A (en) | Local ternary pattern texture feature extraction method based on mean sampling | |
CN114332086B (en) | Textile defect detection method and system based on style migration and artificial intelligence | |
CN106558033A (en) | Binary Images Processing method based on morphological dilations erosion algorithm | |
CN101526994A (en) | Fingerprint image segmentation method irrelevant to collecting device | |
CN103903275A (en) | Method for improving image segmentation effects by using wavelet fusion algorithm | |
CN105976385B (en) | A kind of image partition method based on image data field | |
CN102411776A (en) | Robot visual image segmentation method based on statistics and fractal dimension | |
CN117911437A (en) | Buckwheat grain adhesion segmentation method for improving YOLOv x | |
CN117522864A (en) | European pine plate surface flaw detection method based on machine vision | |
CN113239785A (en) | Method, system, storage medium and electronic device for automatically identifying house type based on convolutional neural network | |
CN110930423B (en) | Object edge feature recognition and extraction method | |
CN108536769B (en) | Image analysis method, search method and device, computer device and storage medium | |
CN103793886A (en) | Image median filtering method based on incomplete rapid sorting algorithm | |
WO2015168362A1 (en) | Method and apparatus for processing block to be processed of urine sediment image | |
CN100573551C (en) | Phase displacement fuzzy difference binaryzation method during fingerprint digital picture is handled | |
CN112184730A (en) | Improved multispectral image segmentation method based on superpixel | |
CN107665487A (en) | Model organism IMAQ digitlization shape extraction reconstructing method | |
CN104156696A (en) | Bi-directional-image-based construction method for quick local changeless feature descriptor | |
Ding et al. | Fast morphology algorithm with parallel processing structures |
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100113 Termination date: 20120303 |