Gray-scale image--a survey of image segmentation threshold processing

Source: Internet
Author: User
Tags scale image

Study Dip 51st Day
Reprint please indicate the source of this article:Http://blog.csdn.net/tonyshengtan , out of respect for the work of the author, reprint please indicate the source! Article code is hosted, Welcome to co-development:Https://github.com/Tony-Tan/DIPpro

The opening crap.

New Year's first blog, image segmentation to the threshold processing, the front edge detection, and then connect the edge, to achieve the purpose of the segmentation area, the basic principle used is the change of gray image, and threshold processing is used to the same threshold value, that is, the same or similar grayscale of a class of pixels defined as a region, Define and differentiate an area according to this feature. The threshold can be understood as a boundary, or a division, beyond which a region is divided into another region, and the core problem determines the threshold.

Overview of threshold values

The only formula used for threshold processing is as follows, which is the core operation of threshold processing:

In the equation, T is our threshold, and the algorithm we are going to learn is to determine this T.
Of course, this is a single threshold method, if there are multiple patterns when we will also use multi-threshold value, but the multi-threshold value is more difficult, generally rarely used.
Thresholds can be divided into the following types of thresholds, depending on how the thresholds are obtained:

The visible thresholds can be divided into global thresholds, local thresholds, and dynamic thresholds, and these different thresholds are determined using different methods depending on the image situation.
Understanding thresholds we can think of an image as a three-dimensional scene, the image length and width of the x-axis and the y-axis in three-dimensional space, and the gray intensity of the z-axis, for the Lena diagram, with Matlab, three-dimensional image rotation along the x-axis:




Look at this diagram from other angles:




We use a simple threshold processing, such as the use of 128 as a threshold, more than 128 gray is set to 128, less than 128 remains unchanged, can be understood as a cross-cutting knife, the effect is the following:

Threshold processing by observing the histogram of the original image can also be obtained a good understanding, when the graph is Shuangfeng, and the deeper the trough is wider, the use of threshold processing is better.
Threshold processing can produce two value graphs or other grayscale graphs, which can produce the desired results as needed, generally producing the following results for a single threshold value:

Minvalue最小值,最小灰度值,0Maxvalue最大值,最大灰度值,255dst(x,y)=src(x,y)>T?src(x,y):Minvalue;dst(x,y)=src(x,y)>T?Maxvalue:src(x,y);dst(x,y)=src(x,y)>T?Maxvalue:Minvalue;//此处产生二值图像dst(x,y)=src(x,y)>T?Minvalue:Maxvalue;//此处产生二值图像,将反转
Factors that affect the processing of threshold values

The two main factors that affect threshold processing are two grayscale images of noise and illumination.
Original:

Original histogram:

Add a standard deviation of 1% (255 of 1%) with a mean of 0 Gaussian noise:

Histogram:

Add a standard deviation of 3% (255 of 3%) with a mean of 0 Gaussian noise:

Histogram:

Add a standard deviation of 5% (255 of 5%) with a mean of 0 Gaussian noise:

Histogram:

Add a standard deviation of 7% (255 of 7%) with a mean of 0 Gaussian noise:

Histogram:


Add a standard deviation of 10% (255 of 10%) with a mean of 0 Gaussian noise:

Histogram:


Add a standard deviation of 15% (255 of 15%) with a mean of 0 Gaussian noise:

Histogram:

The above histogram changes can be clearly found, for the original image can be easily used to divide into two parts, when the noise is increasingly divided more difficult, the threshold selection is more and more difficult, when the noise to 15%, the Shuangfeng diagram disappears, becomes a single peak, the threshold of the determination of a great difficulty.
For threshold processing the second serious effect is uneven illumination, when the image has polarized light, the image histogram will drift as follows:

Using polarized light irradiation:

Original histogram:

Offset histogram:

Background factor Graph:

Background histogram:

For these factors, before threshold processing requires the corresponding operation to noise or change the impact of the bias, the method can be used to use the top hat operation or the use of inverse light template processing, or use variable threshold value to process.

The key factors that affect the histogram thresholds are:

    1. Distance between peaks, the farther away the crest, the better chance of separating these patterns
    2. The noise content in the image is broadened by the increase of the noise.
    3. Relative dimensions of objects and backgrounds
    4. Uniformity of the light source
    5. Uniformity of image reflection characteristics

      A series of algorithms are developed for these characteristics and special cases, so that the threshold processing achieves real-time and effective segmentation of target and background.

Algorithm classification

According to different methods the threshold algorithm can be divided into the following categories:

These include:
1. Mean Value method
2. P-tile method
2. Histogram method
3. Maximum Edge Technology
4. Visual Technique method

Summarize

Threshold processing is a relatively simple method of segmentation (for a single threshold), the key is to determine the threshold value, the following will be described in detail several threshold determination methods.
Wishing you a happy New year.
Cond....

Gray-scale image--a survey of image segmentation threshold processing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.