龙空技术网

「数字图像处理」灰度直方图你了解多少?

PLC学习社 101

前言:

眼前姐妹们对“直方图可表示整幅图像的灰度范围”都比较关心,看官们都想要知道一些“直方图可表示整幅图像的灰度范围”的相关文章。那么小编在网摘上网罗了一些对于“直方图可表示整幅图像的灰度范围””的相关知识,希望我们能喜欢,各位老铁们一起来了解一下吧!

灰度直方图

在数字图像处理中,正确使用与分析灰度直方图是很重要的,在什么情况下使用?有哪些检测标准?直方图曲线表示什么意思?通过阅读这篇文章,你就有了答案。

When to Use 何时使用

The histogram is a fundamental image analysis tool that describes the distribution of the pixel intensities in an image直方图是一种基本的图像分析工具,用来描述图像中像素强度的分布

Use the histogram to determine if the overall intensity in the image is high enough for your inspection task使用直方图确定图像中的整体强度是否足够高,以完成检查任务

You can use the histogram to determine whether an image contains distinct regions of certain grayscale values可以使用直方图确定图像是否包含某些灰度值的不同区域

You also can use a histogram to adjust the image acquisition conditions你也可以使用直方图调整图像采集条件

You can detect two important criteria by looking at the histogram你可以通过查看直方图来检测两个重要标准

(饱和度与反差不足)

1、saturation-饱和度:

Too little light in the imaging environment leads to underexposure of the imaging sensor成像环境中光线太少会导致成像传感器曝光不足

while too much light causes overexposure, or saturation而过多的光线会导致过度曝光或饱和

Images acquired under underexposed or saturated conditions will not contain all the information that you want to inspect from the scene being observed在曝光不足或饱和条件下获取的图像将不包含您希望从正在观察的场景中检查的所有信息

It is important to detect these imaging conditions and correct for them during setup of your imaging system在设置成像系统时,检测并纠正这些成像条件非常重要

You can detect whether a sensor is underexposed or saturated by looking at the histogram您可以通过查看直方图来检测传感器是否曝光不足或饱和

An underexposed image contains a large number of pixels with low gray-level values曝光不足的图像包含大量灰度值较低的像素

This appears as a peak at the lower end of the histogram这在直方图的下端显示为一个峰值

An overexposed or saturated image contains a large number of pixels with very high gray-level values

曝光过度或饱和的图像包含大量灰度值极高的像素

2、Lack of contrast反差不足

A widely-used type of imaging application involves inspecting and counting parts of interest in a scene

一种广泛使用的图像应用程序或系统包括检查和计算场景中感兴趣的部分

A strategy to separate the objects from the background relies on a difference in the intensities of both

将物体与背景分离的策略依赖于两者强度的差异

for example, a bright part and a darker background例如,明亮的部分和较暗的背景

in this case 在这种情况下

the analysis of the histogram of the image reveals two or more well-separated intensity populations

对图像直方图的分析显示了两个或多个分离良好的强度数量

Tune your imaging setup until the histogram of your acquired images has the contrast required by your application. 调整图像设置,直到所采集图像的直方图具有应用程序所需的对比度。

Concepts灰度直方图函数的概念

The histogram is the function H defined on the grayscale range [0, . . ., k, . . ., 255]

直方图是灰度范围在[0, . . ., k, . . ., 255]区间的功能函数H

H(K)=NK

k is the gray-level value

k是灰度值

nk is the number of pixels in an image with a gray-level value equal to k

nk是图像里边灰度值=K的像素数量

nk from k = 0 to 255 is the total number of pixels in an image.

从k=0到255是图像中的像素总数。

灰度直方图的曲线分析

The histogram plot in the following figure reveals which gray levels occur frequently and which occur rarely.下图中的直方图显示了哪些灰度值经常出现,哪些很少出现。

Two types of histograms can be calculated: the linear and cumulative histograms可以计算两种类型的直方图:线性直方图和累积直方图

In both cases, the horizontal axis represents the gray-level value that ranges from 0 to 255在这两种情况下,水平轴表示从0到255的灰度值

For a gray-level value k,对于灰度值k

the vertical axis of the linear histogram indicates the number of pixels nk set to the value k

线性直方图的垂直轴表示灰度K值所对应的像素数量nk

and the vertical axis of the cumulative histogram indicates the percentage of pixels set to a value less than or equal to k而累积直方图的纵轴表示为小于或等于k的值的像素百分比

总结:

灰度直方图是关于灰度级分布的函数,是对图像中灰度级分布的统计。灰度直方图是将数字图像中的所有像素,按照灰度值的大小,统计其出现的频率。灰度直方图是灰度级的函数,它表示图像中具有某种灰度级的像素的个数,反映了图像中某种灰度出现的频率。

标签: #直方图可表示整幅图像的灰度范围