Digital Image processing: Chapter Three grayscale histogram

Source: Internet
Author: User
Tags scale image

Chapter Three Gray histogram

Catalogue

1. Grayscale Histogram

2. Histogram equalization

3. Histogram Normalization

4. Color histogram

Homework

1. Grayscale Histogram

The grayscale histogram (histogram) is a grayscale function that represents the number of pixels in the image that have each grayscale level, reflecting the frequency at which each grayscale appears in the image. As shown in the figure below, the horizontal axis of the gray histogram is the gray level, the vertical axis is the frequency of the gray level, is the most basic statistical characteristics of the image.

From the point of view of probability, the frequency of the occurrence of the grayscale can be seen as the probability of its occurrence, so that the histogram corresponds to the probability density function pdf (probability density function), and the probability distribution function is the accumulation of the histogram, that is, the probability density function integral, as shown in the following figure:



If you look directly at the histogram of the number of pixels representing each grayscale, the following expressions are commonly used:



The gray histogram calculation is very simple, according to the definition, if the image has L (usually l=256, that is, 8-bit gray level) level of gray, the size of the gray-scale image of MXN f (x, y) Gray histogram hist[0 ... L-1] can be obtained using the following calculations:

1. Initialization of hist[k]=0; K=0,..., L-1

2. Statistical hist[f (x, y)]++; X, y =0,..., M-1, 0,..., N-1

3. Standardized hist[f (x, y)]/=m*n

2. Histogram equalization

Histogram equalization is the process of converting one image to another with a balanced histogram, that is, having the same pixel points on each gray level.

The gray-scale transform S=f (R) is a non-reduced continuous micro-function with a finite slope, which converts the input image a (x, y) to the output image B (x, y), the histogram of the input image is ha (R), and the histogram of the output image is HB (s), then their relationship can be exported by


 


 

For example, the image below is the histogram equalization of the aircraft picture and its histogram, it can be seen that the histogram and the original histogram is very balanced, but it must be explained that the discrete situation is not possible to make absolute agreement.

 

3. Histogram normalization

Histogram normalization means that an image is transformed by a gray scale so that it has a specific histogram form, such as a histogram with the same image as a standard image, or a histogram that has a particular function form for the image.

As shown in the following figure, you want to transform image a (x, y) to Image C (x, y) with a specific histogram H3 (D). Firstly, histogram equalization is used to transform image a (x, y) into image B (x, y) with flat histogram, then B (x, y) is transformed to C (x, y) using the second grayscale transformation:

 



4. Color Histogram

Color histogram is a special case of high-dimensional histogram, it statistics the frequency of color, that is, the probability distribution of color information. Often this requires a quantitative process that divides the color into a number of non-overlapping categories. Generally not directly in the RGB color space statistics, but after the brightness separation, the representative of the color portion of the information statistics, such as in HSI Space HS subspace, YUV space UV subspace, as well as other reflection of human visual characteristics of the color space representation. For example, the following figure is an example of how skin tones are distributed.

 

(Image source: Lv Fengjun, Ai Haizhou, et.al, face Detection Based on Skin Color and Template Matching, Icig ' $, aug.16-18, 2000 .)

Job

1. Compile histogram equalization and histogram normalization program (input and output image format bmp).

Return to home directory to return to this chapter

Computer Department of Tsinghua University Aihaizhou

Last modified: January 10, 2000


Http://media.cs.tsinghua.edu.cn/~ahz/digitalimageprocess/chapter03/chapt03_ahz.htm

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.