Welcome![Sign In][Sign Up]
Location:
Search - rightimagemedianfilteringofthesourcecode

Search list

[GDI-Bitmap对图像进行中值滤波处理的源代码

Description: 平滑滤波 一般来说,图像的能量主要集中在其低频部分,噪声所在的频段主要在高频段,同时系统中所要提取的汽车边缘信息也主要集中在其高频部分,因此,如何去掉高频干扰又同时保持边缘信息,是我们研究的内容。为了去除噪声,有必要对图像进行平滑,可以采用低通滤波的方法去除高频干扰。图像平滑包括空域法和频域法两大类,在空域法中,图像平滑的常用方法是采用均值滤波或中值滤波,对于均值滤波,它是用一个有奇数点的滑动窗口在图像上滑动,将窗口中心点对应的图像像素点的灰度值用窗口内的各个点的灰度值的平均值代替,如果滑动窗口规定了在取均值过程中窗口各个像素点所占的权重,也就是各个像素点的系数,这时候就称为加权均值滤波;对于中值滤波,对应的像素点的灰度值用窗口内的中间值代替。实现均值或中值滤波时,为了简便编程工作,可以定义一个n*n的模板数组。另外,读者需要注意一点,在用窗口扫描图像过程中,对于图像的四个边缘的像素点,可以不处理;也可以用灰度值为"0"的像素点扩展图像的边缘。下面给出了采用加权均值滤波的图像平滑函数代码和效果图:-smoothing filter general, the image of energy is mainly focused on the low-frequency part of the noise lies mainly in the high-frequency band, which system to extract the vehicle Edge Information has been concentrated in some of its high frequency, therefore, how to remove high-frequency interference at the same time, maintain the edge information, we Institute enforcement of the content. In order to remove noise, it is necessary for smooth images can be used to the low-pass filter to remove high-frequency interference. Image Smoothing including airspace and frequency domain method two categories, in the airspace law, the common image smoothing method is used Mean Median filter or filter for filtering mean, it is an odd point in the sliding window on the sliding images of the corresponding
Platform: | Size: 44032 | Author: | Hits:

CodeBus www.codebus.net