Digital Image Processing Assign9-1
Digital Image Processing Assign9-1
Digital Image Processing Assign9-1
Solution for (a): (Refer to the matlab window in the next page for the implementation of the
ff. steps):
1. Checking for the file in the current directory.
2. Reading the image FigP5.1(a) (Noisy_superconductor_mage).tif to “a”.
3. Extracting the region of interest by using the fnction ROI.
Note: To obtain the PDF of the noise, we use the roipoly to extract data from region
with relatively constant background. Figure 2 in page 3 shows this region.
4. Determining the relevant noise parameter(s) using the histogram of ROI.
5. Setting the axis limits for the plot.
6. Obtaining the mean and variance of the histogram.
Note: Comparing figure 3 (in page 3) to the histogram of random numbers in Fig. 5.2 p.151
in our text book, we note that the nearest match is that of Figure 5.2(e), the histogram for
an exponential function. This PDF start as 0 while that of figure 3 in p. 3 starts at 64
(approx.). If we subtract 64 to PDF, we make them similar, thus, mean becomes 82.36 – 64
= 18.36 or approximately 18. We then generate npix exponential random variables using
function imnoise2 with a = 1/18 (see Table 5.1) and add 64 back so that the resulting
histogram can be compared with p from (a):
4
5
6
Figure 4: Histogram of the exponential random variables generated using the variables
obtained from the ROI data
2. Spatial Noise Reduction
The tradeoff in your selection of a filter in (a) and (b) should be to produce the cleanest
image possible with as little image distortion (e.g., blurring) as possible.
8
The best choices in spfilt for the elimination of salt noise are median and
contraharmonic mean filters. We give solutions for both..
Median filter
Contraharmonic filter