CN110033458A - It is a kind of based on pixel gradient distribution image threshold determine method - Google Patents
It is a kind of based on pixel gradient distribution image threshold determine method Download PDFInfo
- Publication number
- CN110033458A CN110033458A CN201910183935.0A CN201910183935A CN110033458A CN 110033458 A CN110033458 A CN 110033458A CN 201910183935 A CN201910183935 A CN 201910183935A CN 110033458 A CN110033458 A CN 110033458A
- Authority
- CN
- China
- Prior art keywords
- gradient
- pixel
- image
- value
- threshold
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10072—Tomographic images
- G06T2207/10081—Computed x-ray tomography [CT]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
The invention discloses a kind of image thresholds based on pixel gradient distribution to determine method.It is in the image of Unimodal Distribution for intensity profile histogram, calculate the gradient of each pixel in image, and, the pixel gradient distribution histogram of drawing image for statistical analysis to gradient value obtained, and optimal segmentation threshold is determined based on the form of pixel gradient distribution histogram.The present invention can quickly and accurately determine that intensity profile histogram in the segmentation threshold of the image of Unimodal Distribution, improves the segmentation effect of image.
Description
Technical field
The invention belongs to digital image informations to extract field, in particular to a kind of image threshold based on pixel gradient distribution
It is worth the method for determination.
Background technique
Have benefited from the digital imaging technology (CT, SEM, FIB/SEM) rapidly developed, the micropore structure of sample interior obtains
Intuitively to present.Image apparent for target and background contrast, i.e. its intensity profile histogram present apparent bimodal or more
Peak distribution, existing algorithm is by choosing the trough point between two wave crests as optimal threshold, thus to target and background in image
Carry out accurate and effective Ground Split.In addition to this, still some image due to target area for background area area
Grayscale transition between smaller or target and background is more gentle, i.e., apparent Unimodal Distribution is presented in its intensity profile histogram.It is real
Trample show existing algorithm to intensity profile histogram in the segmentation of Unimodal Distribution image there are biggish error, segmentation result
Authenticity and reliability are lower.
Summary of the invention
In order to solve the technical issues of above-mentioned background technique proposes, the invention proposes a kind of based on pixel gradient distribution
Image threshold determines method, quickly and accurately determines that intensity profile histogram in the segmentation threshold of the image of Unimodal Distribution, improves
The segmentation effect of image.
In order to achieve the above technical purposes, the technical solution of the present invention is as follows:
A kind of image threshold based on pixel gradient distribution determines method, for intensity profile histogram in Unimodal Distribution
Image calculates the gradient of each pixel in image, and, the pixel of drawing image for statistical analysis to gradient value obtained
Gradient distribution histogram, and optimal segmentation threshold is determined based on the form of pixel gradient distribution histogram.
Preferred embodiment based on the above-mentioned technical proposal, comprising the following steps:
(1) gradient operator template is selected;
(2) matrix of the gradient operator template of step (1) selection is moved on needing the image for carrying out gradient calculating, is counted
The gradient value of each pixel on nomogram picture;
(3) statistics is overlapped to the gradient value of the pixel of different gray values, draws gradient distribution histogram;
(4) peak regions in the gradient distribution histogram of image are corresponding to picture in target and background borderline region in image
Vegetarian refreshments, and valley regions then correspond to the pixel in the same area classification;Picture corresponding with wave crest and trough is found out respectively
There is a possibility that maximum to be located at boundary and background, determine therefrom that segmentation threshold for the gray value of vegetarian refreshments, the two gray values.
Preferred embodiment based on the above-mentioned technical proposal, in step (1), the gradient operator stencil-chosen 3 × 3
Sobel operator.
Preferred embodiment based on the above-mentioned technical proposal is averaged to the gradient value under each gray value in step (3)
Processing, obtains its average gradient value, draws gradient distribution histogram according to average gradient value.
Preferred embodiment based on the above-mentioned technical proposal finds out pixel corresponding with wave crest and trough in step (4)
Gray value, the mean value both taken is as optimal segmenting threshold.
By adopting the above technical scheme bring the utility model has the advantages that
Compared to existing digital picture Threshold, the present invention is by taking into account the gradient characteristics of neighborhood of pixels
Come, more accurately and effectively grey level histogram effectively can be divided in the image of Unimodal Distribution, compensate for existing skill
The disadvantage that art error is big, precision is low.Meanwhile the present invention relates to algorithm it is easy, calculation amount is small, and computation rate is fast.
Detailed description of the invention
Fig. 1 is flow chart of the method for the present invention;
Fig. 2 is the test chart provided in embodiment;
Fig. 3 is the corresponding grey level histogram of Fig. 2;
Fig. 4 is the segmentation result figure using Otsu algorithm process Fig. 2;
Fig. 5 is the segmentation result figure using MaxEntropy algorithm process Fig. 2;
Fig. 6 is the segmentation result figure using Valley-Emphasis algorithm process Fig. 2;
Fig. 7 is the gradient map obtained using the present invention;
Fig. 8 is the intensity profile histogram obtained using the present invention;
Fig. 9 is the threshold figure obtained using the present invention;
Figure 10 is the segmentation result figure obtained using the present invention.
Specific embodiment
Below with reference to attached drawing, technical solution of the present invention is described in detail.
It is in the image of Unimodal Distribution for intensity profile histogram, introduces certain property of neighborhood of pixels to carry out threshold value
It determines.The present invention selects the gradient of pixel as research object, studies have shown that pixel gradient size reflects between different zones
The size of otherness.By carrying out gradient calculating to each pixel in original image, and gradient value obtained is carried out
Statistical analysis, the pixel gradient distribution histogram of drawing image, based on pixel gradient distribution histogram form determine it is optimal
Segmentation threshold.As shown in Figure 1, the specific steps are as follows:
Step 1: the selection of gradient operator template
Sobel operator is by being assigned to different weighted values to the pixel at different location, thus the pixel made
Gradient value is more accurate.Therefore, in the present embodiment, 3 × 3 Sobel template is selected to carry out subsequent pixel gradient value
It calculates.
Step 2: the calculating of pixel gradient value
The minor matrix of Sobel operator template is moved on needing the image for carrying out gradient calculating, in each pixel point
The place of setting carries out the gradient value that convolution operation calculates the pixel.
Step 3: the drafting of gradient distribution histogram
Statistics is overlapped to the gradient value of the pixel of different gray values, it is contemplated that the boundary pixel point between different zones
Negligible amounts, it is extremely limited to the protrusion effect of boundary point in histogram even if being overlapped calculating to its gradient value.Cause
This, is averaging processing the gradient value under each gray value in the present invention, its average gradient value is obtained, to eliminate pixel
The influence of quantity.
Step 4: the determination of optimal segmenting threshold
Peak regions in image gradient distribution histogram correspond in image pixel in target and background borderline region,
And valley regions then correspond to the pixel in the same area classification.Pixel corresponding with wave crest and trough is found out respectively
There is a possibility that highest to be located at boundary and background for gray value, two gray values, in the present embodiment, the mean value of the two be taken to make
For determining optimal threshold.
In the present embodiment, by the method for the present invention and existing three kinds of Threshold Segmentation Algorithms --- Otsu, MaxEntropy,
Valley-Emphasis is compared, to verify effectiveness of the invention.
Select 4 picture (a) shown in Fig. 2, (b), (c), (d) as test picture, corresponding grey level histogram is such as
(abscissa is gray value, and ordinate is frequency) shown in Fig. 3.4 test pictures are successively by Otsu, MaxEntropy, Valley-
Segmentation figure after Emphasis algorithm process is as Figure 4-Figure 6.As can be seen that the threshold value mistake that Otsu and MaxEntropy is determined
Greatly, a large amount of pixels is caused accidentally to be divided, and Valley-Emphasis algorithm is not sufficiently stable, and the segmentation of certain images is imitated
Fruit can receive, and other image then there is a problem of identical as Otsu and MaxEntropy algorithm, namely illustrate Valley-
The robustness of Emphasis algorithm is poor.
Then same test image is split using the present invention, process is as follows.
Firstly, obtaining the gradient map of image, brighter pixels point represents high gradient, and darker pixel represents low gradient, such as Fig. 7
It is shown.
Secondly, obtaining the gradient distribution histogram of image, (abscissa is gray value, and ordinate is average ladder as shown in Figure 8
Degree).
Again, top and lowest trough position are determined, obtains optimal threshold, as shown in Figure 9.
Finally, being split using determining threshold value to image, the results are shown in Figure 10.
, it is apparent that segmentation performance of the invention is substantially better than the segmentation result of other common threshold algorithms, it was demonstrated that
The present invention is accurate and effective.
Embodiment is merely illustrative of the invention's technical idea, and this does not limit the scope of protection of the present invention, it is all according to
Technical idea proposed by the present invention, any changes made on the basis of the technical scheme are fallen within the scope of the present invention.
Claims (5)
1. a kind of image threshold based on pixel gradient distribution determines method, which is characterized in that be in for intensity profile histogram
The image of Unimodal Distribution calculates the gradient of each pixel in image, and for statistical analysis to gradient value obtained, draws
The pixel gradient distribution histogram of image, and optimal segmentation threshold is determined based on the form of pixel gradient distribution histogram.
2. determining method based on the image threshold of pixel gradient distribution according to claim 1, which is characterized in that including following
Step:
(1) gradient operator template is selected;
(2) matrix of the gradient operator template of step (1) selection is moved on needing the image for carrying out gradient calculating, calculates figure
As the gradient value of upper each pixel;
(3) statistics is overlapped to the gradient value of the pixel of different gray values, draws gradient distribution histogram;
(4) peak regions in the gradient distribution histogram of image are corresponding to pixel in target and background borderline region in image
Point, and valley regions then correspond to the pixel in the same area classification;Pixel corresponding with wave crest and trough is found out respectively
There is a possibility that maximum to be located at boundary and background, determine therefrom that segmentation threshold for the gray value of point, the two gray values.
3. determining method based on the image threshold of pixel gradient distribution according to claim 1, which is characterized in that in step
(1) in, the Sobel operator of the gradient operator stencil-chosen 3 × 3.
4. determining method based on the image threshold of pixel gradient distribution according to claim 1, which is characterized in that in step
(3) in, the gradient value under each gray value is averaging processing, its average gradient value is obtained, is drawn according to average gradient value
Gradient distribution histogram.
5. determining method based on the image threshold of pixel gradient distribution according to claim 1, which is characterized in that in step
(4) in, the gray value of pixel corresponding with wave crest and trough is found out, takes the mean value of the two as optimal segmenting threshold.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910183935.0A CN110033458A (en) | 2019-03-12 | 2019-03-12 | It is a kind of based on pixel gradient distribution image threshold determine method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910183935.0A CN110033458A (en) | 2019-03-12 | 2019-03-12 | It is a kind of based on pixel gradient distribution image threshold determine method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110033458A true CN110033458A (en) | 2019-07-19 |
Family
ID=67235134
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910183935.0A Pending CN110033458A (en) | 2019-03-12 | 2019-03-12 | It is a kind of based on pixel gradient distribution image threshold determine method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110033458A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111028258A (en) * | 2019-11-14 | 2020-04-17 | 中国科学院力学研究所 | Self-adaptive threshold value extraction method for large-scale gray level image |
CN111489371A (en) * | 2020-04-22 | 2020-08-04 | 西南科技大学 | Image segmentation method for scene with histogram approximate to unimodal distribution |
CN112200800A (en) * | 2020-10-30 | 2021-01-08 | 福州大学 | Electrowetting display defect detection method based on gray level histogram gradient weighted target variance |
CN112396061A (en) * | 2020-11-25 | 2021-02-23 | 福州大学 | Otsu target detection method based on target gray scale tendency weighting |
WO2021087700A1 (en) * | 2019-11-04 | 2021-05-14 | 深圳市汇顶科技股份有限公司 | Image processing apparatus, processor chip and electronic device |
CN113592750A (en) * | 2021-07-30 | 2021-11-02 | 成都市晶林科技有限公司 | Infrared enhancement method based on gradient histogram |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101950116A (en) * | 2010-09-14 | 2011-01-19 | 浙江工业大学 | Video automatic focusing method applied to multi-main-body scene |
CN102982534A (en) * | 2012-11-01 | 2013-03-20 | 北京理工大学 | Canny edge detection dual threshold acquiring method based on chord line tangent method |
CN102999916A (en) * | 2012-12-12 | 2013-03-27 | 清华大学深圳研究生院 | Edge extraction method of color image |
CN108596932A (en) * | 2018-04-18 | 2018-09-28 | 哈尔滨理工大学 | A kind of overlapping cervical cell image partition method |
-
2019
- 2019-03-12 CN CN201910183935.0A patent/CN110033458A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101950116A (en) * | 2010-09-14 | 2011-01-19 | 浙江工业大学 | Video automatic focusing method applied to multi-main-body scene |
CN102982534A (en) * | 2012-11-01 | 2013-03-20 | 北京理工大学 | Canny edge detection dual threshold acquiring method based on chord line tangent method |
CN102999916A (en) * | 2012-12-12 | 2013-03-27 | 清华大学深圳研究生院 | Edge extraction method of color image |
CN108596932A (en) * | 2018-04-18 | 2018-09-28 | 哈尔滨理工大学 | A kind of overlapping cervical cell image partition method |
Non-Patent Citations (6)
Title |
---|
A.M.GROENEWALD ET AL.: "related approaches to gradient-based thresholding", 《PATTERN RECOGNITION LETTERS》 * |
FATEME MOSTAJER KHEIRKHAH ET AL.: "modified histogram-based segmentation and adaptive distance tracking of sperm cells image sequences", 《COMPUTER METHODS AND PROGRAMS IN BIOMEDICINE》 * |
刘俊等: "一种基于梯度的直方图阈值图像分割改进方法", 《计算机与数字工程》 * |
岳贤军: "基于梯度直方图的产品表面缺陷图像自适应阈值分割方法研究", 《南通大学学报(自然科学版)》 * |
董慧颖等: "《典型目标识别与图像除雾技术》", 31 July 2016 * |
贾超等: "构件内部裂缝缺陷的有限元三维重建", 《燕山大学学报》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021087700A1 (en) * | 2019-11-04 | 2021-05-14 | 深圳市汇顶科技股份有限公司 | Image processing apparatus, processor chip and electronic device |
CN111028258A (en) * | 2019-11-14 | 2020-04-17 | 中国科学院力学研究所 | Self-adaptive threshold value extraction method for large-scale gray level image |
CN111028258B (en) * | 2019-11-14 | 2023-05-16 | 中国科学院力学研究所 | Large-scale gray level image self-adaptive threshold value extraction method |
CN111489371A (en) * | 2020-04-22 | 2020-08-04 | 西南科技大学 | Image segmentation method for scene with histogram approximate to unimodal distribution |
CN112200800A (en) * | 2020-10-30 | 2021-01-08 | 福州大学 | Electrowetting display defect detection method based on gray level histogram gradient weighted target variance |
CN112200800B (en) * | 2020-10-30 | 2022-10-28 | 福州大学 | Electrowetting display defect detection method based on gray level histogram |
CN112396061A (en) * | 2020-11-25 | 2021-02-23 | 福州大学 | Otsu target detection method based on target gray scale tendency weighting |
CN113592750A (en) * | 2021-07-30 | 2021-11-02 | 成都市晶林科技有限公司 | Infrared enhancement method based on gradient histogram |
CN113592750B (en) * | 2021-07-30 | 2023-10-20 | 成都市晶林科技有限公司 | Infrared enhancement method based on gradient histogram |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110033458A (en) | It is a kind of based on pixel gradient distribution image threshold determine method | |
CN111145161B (en) | Pavement crack digital image processing and identifying method | |
CN113109368B (en) | Glass crack detection method, device, equipment and medium | |
CN111811784A (en) | Laser spot center coordinate determination method, device and equipment | |
WO2021109697A1 (en) | Character segmentation method and apparatus, and computer-readable storage medium | |
CN101901342A (en) | Method and device for extracting image target region | |
CN105389793B (en) | A kind of method of automatic identification body surface fracture strike and width | |
CN110378893B (en) | Image quality evaluation method and device and electronic equipment | |
CN114170165A (en) | Chip surface defect detection method and device | |
CN117764989B (en) | Visual-aided display screen defect detection method | |
CN115439523A (en) | Method and equipment for detecting pin size of semiconductor device and storage medium | |
CN117522863B (en) | Integrated box body quality detection method based on image features | |
CN116071355A (en) | Auxiliary segmentation system and method for peripheral blood vessel image | |
CN116721099B (en) | Image segmentation method of liver CT image based on clustering | |
CN109978905A (en) | A kind of spray head spray angle measurement method and device based on Digital Image Processing | |
CN106846314B (en) | Image segmentation method based on postoperative cornea OCT image data | |
CN117635615B (en) | Defect detection method and system for realizing punching die based on deep learning | |
CN110084818B (en) | Dynamic down-sampling image segmentation method | |
US20210090235A1 (en) | Deposit detection device and deposit detection method | |
CN106023208B (en) | The method for objectively evaluating of picture quality | |
CN107194954A (en) | The sportsman's method for tracing and device of multi-angle video | |
CN116363097A (en) | Defect detection method and system for photovoltaic panel | |
CN103366376B (en) | A kind of image characteristic extracting method based on neighborhood dimensional variation | |
CN111415365A (en) | Image detection method and device | |
CN108961290B (en) | Adaptive image edge detection method based on Ratio operator of Otsu |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for 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: 20190719 |