[Dip] Digital Image Processing (MatLab) ch05

Source: Internet
Author: User

--- Slowly go through the dip and the MATLAB, and write down some fragmented knowledge points for yourself to review later.

 

Dip ch05 Image Restoration and Reconstruction

First, there are some ways to add noise in the spatial and frequency domains. In this book, imnoise2 and imnoise3 are compiled to add noise in the spatial and frequency domains respectively (the frequency domain noise corresponds to the spatial periodic noise ). Here, imnoise2 mainly uses the functions rand () and randn () to generate random numbers of the uniform distribution (U () and Gaussian distribution (N (), and works with find () functions are used to generate noise. imnoise3 uses the knowledge in chapter 4 and uses functions such as fftshift, ifftshift, fft2, and ifft2 to generate periodic noise in the spatial domain. Note that the pulse must appear in pairs in the frequency domain ).

 

Section 5.3.1 focuses on noise-only restoration and spatial filtering. Spfilt is written in the book, which can be used for arithmetic mean filtering, geometric mean filtering, harmonic mean filtering, inverse harmonic mean filtering, median filtering, maximum value filtering, and minimum value filtering, alpha mean Filtering for Midpoint filtering and correction.

Compared with arithmetic mean filtering, geometric mean filtering can also smooth, but has less distortion;

The inverse harmonic mean filtering can be converted into arithmetic mean filtering (q = 0) and harmonic mean filtering (q =-1) when different values are obtained for the Q parameter ), pepper Noise is applicable when Q is positive, and salt noise is applicable when Q is negative;

The maximum and minimum filters are suitable for pepper noise and salt noise respectively;

Mid-point filtering combines statistical sorting and averaging, making it suitable for random distribution noise;

The modified Alpha mean filtering is suitable for multiple kinds of noise conditions;

Use the knowledge of space filtering in Chapter 3 and use fspecial () and imfilter () to construct the above filter process;

(1) the output image type matches the input image type, while the operation process maintains double precision.

Inclass = Class (g); G = im2double (g);...; (calculate, F through g) F = changeclass (inclass, F );

(2) In the implementation of geometric mean filtering, the product of elements is converted into elements (after ln operation) and (through the constant equation a * B = exp (Ln (A * B) = exp (Ln (A) + Ln (B ))), in this way, you can use the existing imfilter ('average') function;

(3) When a matrix element is used to calculate the power of a negative number, an extremely small number can be added to the entire matrix to prevent the occurrence of the 0 element. In Matlab, the following variable is preset: EPS;

(4) imlincomb = image linear combination;

(5) linear filtering usually uses replicate to process boundary padding, while sorted filtering often uses hierarchical Ric;

 

Section 5.3.2 implements an adaptive spatial filter (adaptive median filter). The Matlab code is provided in appendix C. (TBC)

[Dip] Digital Image Processing (MatLab) ch05

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.