当前位置:网站首页>Fundamentals of digital image processing (Gonzalez) II: gray transformation and spatial filtering
Fundamentals of digital image processing (Gonzalez) II: gray transformation and spatial filtering
2022-04-23 05:54:00 【Zuo Xiaotian ^ o^】
among f(x, y) It's an input image , 8(x, y) It's the processed image ,T It's at the point (x,y) Defined on the neighborhood of f An operator of .
Image enhancement processing is to process the image , A process that makes the result more suitable for a specific application than the original image .
Basic gray transformation function
r and s Represent the pixel values before and after processing .
As an introduction to gray transformation , Consider the picture 3.3, This figure shows three basic functions commonly used in image enhancement : Linear function ( Inversion and identity transformation )、 Logarithmic function ( Logarithmic and anti number transformations ) And power-law functions (n The sum of powers n The second root transformation ). Identity function is the most general case , Its output gray is equal to the transformation of input gray , In the figure 3.3 It is included only for completeness .
Image reversal
Is to flip pixels , It's not image space inversion
Logarithmic transformation
among c It's a constant , And suppose r≥0. chart 3.3 The shape of the medium logarithm curve indicates , The transformation maps the low gray value with narrow range in the input to the gray value with wide range in the output , By contraries , The same is true for high input gray values . We ] Use this type of transformation to expand the value of dark pixels in the image , At the same time, compress the values of higher gray levels . The function of anti number transformation is the opposite .
With graph 3.3 Any curve of the general shape of the logarithmic function shown , Can complete the expansion of image gray level / Compress , however , The power-law transformation discussed in the next section is more general for this purpose . Logarithmic functions have an important feature , That is, it compresses the dynamic range of the image with large changes in pixel values . A typical application where pixel values have a large dynamic range is Fourier spectrum , This will be in the 4 The chapter discusses . Now? , We only focus on spectral features . Usually , The spectrum values range from 0 To 10%, Even higher . Although computers can handle this range of numbers without problem , However, the image display system usually can not reproduce such a large range of gray values . thus , The final result is that many important gray details are lost in the display of typical Fourier spectrum .
Power law ( gamma ) Transformation
For image acquisition 、 Various devices for printing and display generate responses according to the power law .
Habitually , Power law equation ( power function ) The exponent in is called gamma [ So in the form (3.2-3) This symbol is used in ].** The process used to correct these power-law response phenomena is called gamma correction .** for example , crt (CRT) The device has a gray scale - Voltage response , The response is an exponential variation in the range of 1.8~ 2.5 The power function of . In the figure 3.6 in , use γ= 2.5 Reference curve at , We see , The image produced by this display system is often darker than the expected image . This result is shown in figure 3.7 Explain . chart 3.7(a) Shows a picture Simple grayscale ramp into the monitor ( The gradient ) Images . As expected , The monitor shows that the output is darker than the input , Pictured 3.7(b) Shown . under these circumstances , Gamma correction is simple . All we need to do is preprocess the image before inputting it to the monitor , That is to say s=r(1/25) =r(0.4) Transformation , The result is shown in Fig. 3.7 Shown . When input to the same monitor , This gamma corrected input produces an output that looks close to the original image , Pictured 3.7(d) Shown . Similar analysis is also applicable to other image devices , Such as scanners and printers . The only difference is the gamma value depending on the device .
Piecewise linear transformation function
Contrast stretch
One of the simplest piecewise linear functions is the contrast stretch transform . Low contrast images can be caused by insufficient illumination 、 The dynamic range of imaging sensor is too small , Even in the process of image acquisition, the lens aperture setting error causes . Contrast stretching is the process of expanding the dynamic range of image gray level , therefore , It can span the whole gray range of recording medium and display device .
Bit plane layering
A pixel is a number of bits . for example , stay 256 Gray level image , The gray level of each pixel is determined by 8 The bit ( That is to say 1 Bytes ) Composed of . Instead of highlighting the gray level range , We can highlight specific bits to contribute to the overall image appearance . Pictured 3.13 As explained , A picture 8 The bit image may be considered as 8 individual 1 The bit plane consists of , And the plane 1 Contains the lowest order bit of all pixels in the image , And plane 8 Contains the highest order bits of all pixels in the image .
Histogram Processing
Histogram equalization
Perform gray level statistics , Then histogram statistics , Finally, balance .
Histogram matching ( Prescriptive )
Sometimes it may be more useful if we want the processed image to have a specified histogram shape . This method for generating processed histograms is called histogram matching or histogram specification .
Local histogram processing
Process the local image .
Fundamentals of spatial filtering
In the figure 3.1 in , We briefly explained , Space filter (1) A neighborhood ( Typically a smaller rectangle ), (2) Predefined operations performed on the image pixels surrounded by the neighborhood . Filtering produces a new pixel , The coordinates of the new pixel are equal to the coordinates of the center of the neighborhood , The value of the pixel is the result of the filtering operation . The center of the filter accesses each pixel in the input image , Processing is generated ( wave filtering ) The image after . If a linear operation is performed on an image pixel , Then the filter is called linear space filter . otherwise , The filter is called nonlinear spatial filter . First , We focus on linear filters , then , Explain some simple nonlinear filters .
Spatial correlation and convolution
When performing linear spatial filtering , Two similar concepts must be clearly understood . One is related to , The other is convolution .
Correlation is the process of moving the filter template across the image and calculating the sum of the product of each position .
The mechanism of convolution is similar , But the filter must first rotate 180. The best way to explain the difference between the two concepts is to give examples . Let's start with a one-dimensional example .
Vector representation of linear filtering
Transformation :
Smooth spatial filter
Smooth linear filter
Smooth the output of linear spatial filter ( Respond to ) Is a simple average of the pixels contained in the neighborhood of the filter template . These filters are sometimes called mean filters . As mentioned in the previous section , They can also be classified as low-pass filters .
The basic concept of smoothing filter is very intuitive . It uses the average gray value of pixels in the neighborhood determined by the filter template to replace the value of each pixel in the image , The result of this processing reduces the gray level of the image “ Sharp ” change . Because the typical random noise is composed of sharp changes in gray level , therefore , Common smoothing applications are noise reduction ,
Statistical sorting ( nonlinear ) filter
Statistical sorting filter is a nonlinear spatial filter , The response of this filter is based on the order of pixels contained in the image area surrounded by the filter ( line up ) Based on , Then, the value determined by the statistical sorting result is used instead of the value of the central pixel .** The best-known filter in this category is the median filter ,** As its name implies , It is the median value of the gray level in the pixel neighborhood ( Include the original pixel value in the median calculation ) Replace the value of the pixel . Median filter is widely used , This is because for - - A certain type of random noise , It provides an excellent denoising ability , And the fuzziness is obviously lower than that of the linear smoothing filter of the same size . Median filter is very effective in dealing with impulse noise , This kind of noise is also called salt and pepper noise , Because this noise is superimposed on the image in the form of black and white dots .
Sharpen spatial filter
Unsharp masking and high lift filtering
Use a first-order differential pair ( nonlinear ) Image sharpening a gradient
版权声明
本文为[Zuo Xiaotian ^ o^]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230543244329.html
边栏推荐
- ValueError: loaded state dict contains a parameter group that doesn‘t match the size of optimizer‘s
- 多线程与高并发(3)——synchronized原理
- mysql实现主从复制/主从同步
- Pytorch学习记录(十三):循环神经网络((Recurrent Neural Network)
- 治療TensorFlow後遺症——簡單例子記錄torch.utils.data.dataset.Dataset重寫時的圖片維度問題
- 2 - principes de conception de logiciels
- 开发环境 EAS登录 license 许可修改
- delete和truncate
- 手动删除eureka上已经注册的服务
- Pytorch learning record (IX): convolutional neural network in pytorch
猜你喜欢
Conda 虚拟环境管理(创建、删除、克隆、重命名、导出和导入)
一文读懂当前常用的加密技术体系(对称、非对称、信息摘要、数字签名、数字证书、公钥体系)
手动删除eureka上已经注册的服务
去噪论文阅读——[CVPR2022]Blind2Unblind: Self-Supervised Image Denoising with Visible Blind Spots
域内用户访问域外samba服务器用户名密码错误
JVM family (4) -- memory overflow (OOM)
Ptorch learning record (XIII): recurrent neural network
Development environment EAS login license modification
Latex quick start
Multithreading and high concurrency (1) -- basic knowledge of threads (implementation, common methods, state)
随机推荐
Object to map
Ora: 28547 connection to server failed probable Oracle net admin error
Postfix变成垃圾邮件中转站后的补救
mysql如何将存储的秒转换为日期
Anaconda安装PyQt5 和 pyqt5-tools后没有出现designer.exe的问题解决
mysql sql优化之Explain
The list attribute in the entity is empty or null, and is set to an empty array
Split and merge multiple one-dimensional arrays into two-dimensional arrays
Get the value of state in effects in DVA
idea插件---背景播放歌曲
深入源码分析Servlet第一个程序
Pytorch learning record (IX): convolutional neural network in pytorch
MySql基础狂神说
POI exports to excel, and the same row of data is automatically merged into cells
自定义异常类
容器
创建企业邮箱账户命令
The attendance client date of K / 3 wise system can only be selected to 2019
Pytorch——数据加载和处理
No.1.#_ 6 Navicat shortcuts