Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 The Gray-Level Histogram ( 灰度直方图 ) The gray-level histogram is a function showing, for each gray level, the number of pixels in the image that.

Similar presentations


Presentation on theme: "Chapter 5 The Gray-Level Histogram ( 灰度直方图 ) The gray-level histogram is a function showing, for each gray level, the number of pixels in the image that."— Presentation transcript:

1 Chapter 5 The Gray-Level Histogram ( 灰度直方图 ) The gray-level histogram is a function showing, for each gray level, the number of pixels in the image that have that gray level. The abscissa of a gray-level histogram is gray level and the ordinate is frequency of occurrence (number of pixels)

2 Image Lenna The Histogram of Lenna

3 Another way to define the Gray-level histogram Contour lines in an image A(D) A(D+  D)

4 For continuous image, the histogram H(D) is defined as: (1) Where A(D) is the threshold area function of a continuous image. For the case of digital functions, fix D=1, (2)

5 The Two-Dimensional Histogram The two-dimensional histogram shows how the pixels are distributed among combinations of two gray levels For two images, obtained through colored filters, in red and blue light, the value of the two-dimensional histogram at the coordinate is the number of corresponding pixel pairs having gray level in the red image and gray level in the blue image.

6 Properties of the Histogram (3) (4) For a discrete image, (5)

7 If an image contains a single uniformly gray object on a contrasting background, and the boundary of that object has the contour line defined by gray level D 1, then (6)

8 500 象素 *546 象素 = 273000 ,最左侧直方 图峰值的灰度级为 33

9 从灰度 54 到 255 级 约占图象总面积的 60%

10 Probability density function(PDF): Normalize the gray-level histogram by dividing by the area of the image, i.e., Cumulative distribution function (CDF):

11 USES OF THE HISTOGRAM Digitizing Parameters Checking the histogram can bring problems into the open before much time has been wasted

12 Boundary Threshold Selection Suppose an image contains a dark object on a light background, its histogram is a bimodal one A threshold gray level chosen in the area of the dip will produce a reasonable boundary for the object

13

14 显然如果阈值对应于直方图的谷,阈值从 T 增加到 T+ ΔT ,只会导致面积略微变化。因此可以把阈值的选择 误差对面积测量的影响降到最低。 上例中当灰度级从 115 变化到 144 时,象素为 1850 , 占图象总面积的 1% 。因此把阈值选取为 130 ,此时 树叶的面积约占总面积 28.87% 。

15 Integrated Optical Density (IOD) For a digital image It can be written as where N k is the number of pixels with gray level k

16 For continuous image and If an object within the image if enclosed by a threshold boundary at gray level T,

17 The mean interior gray level is the ratio of IOD to area:

18 RELATIONSHIP BETWEEN HISTOGRAM AND IMAGE One dimension Consider the one-dimensional Gaussian pulse given by

19 The area is merely the inverse of the image function The histogram is given by

20 The histogram of the Gaussian pulse

21 Two Dimensions The image function in polar coordinates is given by A Contour of constant gray level P is a circle of radius Such a contour encloses an area

22

23

24 The histogram is given by

25 SUMMARY OF IMPORTANT POINTS 1. The gray-level histogram is the negative of the derivative of the threshold area function. 2. The histogram shows how many pixels occur at each gray level. 3. Inspection of the histogram points out improper digitization. 4. The area and IOD of a simple object can be computed from the histogram of its image. 5. The histogram of an image of specified functional form can be derived with the aid of the area function.

26 习题 P68 第 3 题 解:

27 习题

28 从图中观察阈值灰度约可定在 100 物体的 IOD= 物体的面积 =

29 习题 P68 第 4 题 解:黑色象素数 =520+920+490+30+40+5910=7910 白色象素数 =6050+80+20+80+440+960+420=7970 足球的总象素 =7910+7970=15880 足球的面积 =41457.6 平方毫米 象素的间距 =41457.6/15880=2.6 毫米

30 上机实习 1 、在 matlab 软件中编制读取图象并输出其直方图的 程序。 ( 不使用 imhist 函数 )


Download ppt "Chapter 5 The Gray-Level Histogram ( 灰度直方图 ) The gray-level histogram is a function showing, for each gray level, the number of pixels in the image that."

Similar presentations


Ads by Google