Efficient Block Matching for Removing Impulse Noise is a technique used in image processing to effectively reduce the impact of impulse noise, such as salt-and-pepper noise, on digital images. Here's a detailed description of the method:
### Introduction:
Impulse noise, characterized by random pixel values with high or low intensity, can significantly degrade image quality and affect subsequent processing tasks. Efficient Block Matching for Removing Impulse Noise aims to identify and replace noisy pixels with more accurate estimates based on neighboring pixel values.
### Algorithm Steps:
1. **Block Division:**
- The image is divided into non-overlapping blocks of fixed size.
- Each block contains a set of pixels, and the algorithm operates independently on each block.
2. **Noise Detection:**
- Within each block, the algorithm detects pixels affected by impulse noise.
- Impulse noise typically manifests as pixel values significantly different from neighboring values.
3. **Block Matching:**
- For each noisy pixel detected, the algorithm performs block matching to find similar blocks within the image.
- Similarity metrics such as sum of absolute differences (SAD) or sum of squared differences (SSD) are commonly used to measure block similarity.
4. **Replacement Pixel Selection:**
- Once similar blocks are identified, the algorithm selects replacement pixels from corresponding positions in these blocks.
- The replacement pixel values are chosen based on various criteria, such as the median or mean of the pixels in the matching blocks.
5. **Output Image Reconstruction:**
- After replacing noisy pixels in each block, the original image is reconstructed by combining the modified blocks.
### Key Concepts:
- **Block-Based Approach:** Efficient Block Matching for Removing Impulse Noise operates on non-overlapping blocks of pixels instead of processing individual pixels. This block-based approach reduces computational complexity and improves efficiency.
- **Similarity Measure:** Block matching relies on a similarity measure to identify blocks with similar content. Common metrics include SAD and SSD, which quantify the difference between pixel values in corresponding positions of two blocks.
- **Replacement Strategy:** The algorithm selects replacement pixel values from similar blocks to estimate the true pixel values affected by impulse noise. Strategies such as median filtering or mean filtering are commonly used for replacement.
- **Adaptive Thresholding:** To differentiate between noise and actual image content, the algorithm may use adaptive thresholding techniques. These techniques adjust threshold values based on local image characteristics to improve noise detection accuracy.
- **Performance Optimization:** Various optimizations, such as parallelization and hardware acceleration, can be employed to enhance the efficiency of the block matching process, particularly for large images or real-time applications.
##
Efficient block matching for removing impulse noise
1. TERM PAPER ON
EFFICIENT BLOCK MATCHING FOR
REMOVING IMPULSE NOISE
GUIDED BY:
Dr.M.Pompapathi
PRESENTED BY:
V.Yuvraj(Y20IT124)
T.Bharath kumar(Y20IT114)
Mohammad Afride(Y20IT077)
2. CONTENTS
1 . ABSTRACT
2 . KEYWORDS
3 . FLOW CHART
4 . ALGORITHM FOR PROPOSED WORK
5 . PROCESS OF THE ALGORITHM
6 . EXPERIMENTAL RESULTS
7 . CONCLUSION
8 . REFERENCES
3. ABSTRACT
A number of block-based image-denoising methodshave been presented in
the literature. Those methods, however,are generally adapted to denoising
the Gaussian noise, and sub sequently do not show good performance for
denoising random valued impulse, and salt-and-pepper noise. We propose
an efficient block-based image-denoising method, which is devised
specially forfast denoising of impulse noise. The method first constructs a
setof array pointers to image blocks containing a specific pixel valueat a
specific location. With this scheme, finding of blocks similar to a given
block can be done by considering only the blockspointed by the pointers
corresponding to the pixel values of theblock without comparing all the
blocks in the input image. The experimental results show that the proposed
method can achievesuperior denoising performance in terms of
computational timeand signal-to-noise ratio measure.
4. KEYWORDS
1 .IMAGE DENOISING : Computer vision task that involves removing
noise from an image.
2 .SALT & PEPPER NOISE : Form of noise that can be seen on images.
3 .MEDIAN FILTER : Non-linear digital filtering technique , often used to
remove noise from images or signal.
4 .BMLUT ALGORITHM : Block matching by look up table.
5 .EUCLEDIAN DISTANCE : The straight-line distance between two
pixels. The city block distance metric measures the path between the pixels
based on a 4-connected neighborhood. Pixels whose edges touch are 1 unit
apart; pixels diagonally touching are 2 units apart.
5. 6 .TOLERENCE FUNCTION : The percentage of pixels that can be a
mismatch between the two images and the images are considered to still be a
match.
7 .DIRECTIONAL WEIGHTED MEDIAN FILTER : The directional
weighted median filter [DWMF] is used to calculate the sum of absolute
difference between the gray scale values in all the four directions of the
selected window.
8 .PEAK SIGNAL TO NOISE(PSNR) : An expression for the ratio between
the maximum possible value (power) of a signal and the power of distorting
noise that affects the quality of its representation.
6. 9 . NOISY PIXELS : Pixels that are made up of the sum of the original
values plus the gaussian noise pixels.
9. BMLUT ALGORITHM
Input: noisy image I, Output: denoised image J,
Set the window size: 3x3, Set the threshold T,
Set the sufficient number of matching blocks: #S
1 Scan I with a stride of one pixel to obtain a set of matching
blocks, BM= {M: the number of noise in M is less than 5}.
2 Scan I with a stride of 3 pixels to obtain a set of non-overlapping
target blocks, BT = { T: the number of noise in T' is less than 5},
and a set of non-overlapping noisy blocks BN = {N: N=I, N&BT}.
3 From BM, construct a 3-D array A[0..8][0..255][MAX_PIX]
4 For tolerance d increasing by Ad from ds to de do:
5 While the number of T's in B¹ decreases do:
10. 6 For each T' in BT do:
7 For each clean pixel of value p at location X₁ do:
8 Search the lists pointed by A[i][p-d..p+d] for
matching blocks and move the blocks to Σ(Τ).
9 If the number of collected matching bocks is
greater than #S for each of all the noise in T, then
stop the search.
10 Compute the mean of clean pixel values for M's in
Σ(7) and replace the noise in Twith the means.
11 If all noise in T'is denoised, move T from BT to BM,
and write the denoised pixels to J
11. 12 For each N in BN do:
Divide N into four blocks, and if noise in some blocks are
less than 5, register them as new target blocks, and do
the operations of step 5 through 8.
13 If BT is not empty, go to step 4.
14 If BT and BN are not empty, the blocks in BT and BN are divided
into 2x2 blocks containing only one noisy pixel, and block
matching is performed until both BT and BN are empty.
12. PROCESS OF THE ALGORITHM :
A. Identification of Noisy Pixels
We determine if a pixel is corrupted by the local homogeneity assumption
around a pixel [8]. First, we build a two-dimensional(2-D) histogram H of
size 256 × 256, where (i, j)th element H(i, j), is the total number of
neighboring pixels of value j aroundpixels of value i. Fig. 1 shows the shape
of H where the vertical cross section of H at some point i on the x-axis
denotes the distributions of pixel values adjacent to all the pixels of valuei.
For each pixel value i and a given percentage δ, we definethe range of δ-
homogeneity by two values: 1) lowδ (i); and 2)upδ (i), so that the sum of H(i,
j) with j running from lowδ (i) toupδ (i) equals to δ percent of the sum of all
the bins on the cross section at i .
13. After all of lowδ (i) and upδ (i) for all i from 0 to 255 have been computed ,
noisy pixels are determined as follows. For eachpixel q adjacent to p, if p is in
the range of q’s δ-homogeneity, then the counter is increased by 1. After all the
eight neigh-boring pixels are considered, if the counter is less than a threshold,
then p is class-ified as noise.
B. Construction of Pointer Arrays for Matching Blocks
Once all noisy pixels have been determined, a sliding windowW of size 3 × 3
moves over the input image I pixel by pixel, andnoisy pixels in W are counted.
If the number of noisy pixels in W is greater than a predefined threshold, it is
class-ified as a noisy block. Otherwise, the block is initially classified as a
matching block.
14. Among the matching blocks, the blocks including at least one noisy pixel are
tar-get blocks to be denoised using othersimilar matching blocks. In order to
reduce the computing time in searching similar blocks, we represent the pixel
locations in
a 3 × 3 window as numbers from 1 through 9, and maintain a set of 256-D
arrays of pointers {Ai[ 0 ... 255]: i = 1, 2,...,9} where each i corresponds to a
pixel loca-tion as shown in Fig. 2. Arrays {Ai} play a role of a lookup-table in
which the
information of “a pixel of value p is occurring at position i ina 3 × 3 block” is
recorded in the list pointed by Ai[p]. Thus, because Ai[p] points to the list
conta-ining the coordinates ofall the matching blocks whose ith pixel has value
of p, search of similar blocks can be done just by looking up the lists.
15. C. Noise Removal
Denoising of Target Blocks. Let Inoise denote the set of noisypixels in I.
Suppose the arrays Ai, i = 1, 2, . . . , 9, have beenconstructed as described earlier.
Next step is to collect similar matching blocks for each target block.
Computation of the distance between target and matching blocks involves noise,
and hence the Eucl-idian distance cannot be directly employed because
comparison of noise is mean-ingless. We propose a conceptof tolerance level d
16. Tolerance function determines whether two pixels are similar or not. Now,
supp-ose we are comparing a target block T = [t1 , t2 ,..., t9 ] where ti is a pixel
value at position i and amatching block M = [p1 , p2 , ..., p9 ] which is stored
in the lists pointed by Ai’s. We define the similarity of T and M as
In (3), noise cannot be involved in computing the similarity of two blocks. Our
goal is to build a set of matching blocks Σ(T) for T, which satisfy the following
condition for a threshold τ :
17. The search process continues until sufficient number #S, say atleast five, of
matching blocks are collected in Σ(T). If the number of matching blocks in Σ(T)
is not sufficient, tolerance level d is increased by Δd and the search process
starts again until sufficient numbers of matching blocks are collected.
Denoising of T is done by replacing the noisy pixels in T with the average of all
the clean pixels at the corresponding location of all the matching blocks in Σ(T).
18. On the left-hand side,target block T = [10, 15, 9, •, •, •, 8, •, 5] is given, where
“•” denotes noise. As x1 of T is 10 and d is 1, all the blocks pointed byA1 [ 10
− d..10 + d] = A1 [ 9..11] are candidates for matching to T. Among them, Fig. 3
shows that only M1 and M2 are matching to T, because simil(T, M1 ) = 4, and
simil(T, M2 ) =4, and hence M1 and M2 satisfy the condition of (5).
19. EXPERIMENTAL RESULTS
We evaluated the proposed BMLUT method using four images corrupted by
random-valued impulse noise of various rates. Fig. 6 shows the test images
along with 30% noisy images. In the first experiments, we assessed the gain of
comp-utational time of the proposed BMLUT method over the exhaustive
search_x0002_based method, and the running time of the directional weighted
median filter (DWMF) [9] was included just for comparing to nonblocking
matching method. Table I provides the average run time of each method on the
Intel Core i7-6700 3.40 GHz pro_x0002_cessor with 16 GB memory. The
tolerance level was set to from 3 to 9 increasing by Δd = 2. One can see that
the proposed BMLUT method greatly outperforms other methods. Fig. 7
showsthe intermediate denoising result of the Lena with 30% impulsenoise
after the iterations from steps 4 13 is over. Some noisypixels inside the circles
could not be denoised by 3 × 3 matching blocks within the tolerance less than
10, and therefore we need to divide the blocks containing the noisy pixels.
20. We also evaluated the denoising capability of the BMLUT method and
compared the results with other methods, includingthe standard median filter
using the peak signal to noise (PSNR) measure,
21.
22. where MAXI refers to the max of the gray level which is 255 for 8-bit images
and MSE stands for mean-squared error between the input and the restored
images. Table II shows the quality of the denoised images for the four test
images. One can see that the proposed BMLUT method consistently
outperforms other methods, including the recently published three valued
weighted filter (TVWF) approach [5]. In addition to the objective measure
PSNR, we compared the subjective visual quality of the restored images as
illustrated in the Supplementary material.
23. CONCLUSION
We proposed an efficient block-matching method, which is superior for
denoising the input image corrupted by random valued impulse noise. In the
preprocessing stage, the noisy pixels are identified using the local
homogeneity property. With this information of locations of noisy pixels, the
proposed method divides blocks into matching and noisy blocks, based on the
number of noisy pixels in the block. Among matching blocks, nonoverlapping
blocks containing at least one noisy pixel are called target blocks and are
subject to denoising. The denoising operation is carried out using the array of
pointers, which allows to determine what pixel values occur at which
locations in the image, and hence reduces the search time to find the matching
blocks. Our method has shown superior performance gain in terms of
computing time and quality of the restored images.
24. REFERENCES
[1] N. Yao and K. K. Ma, “Adaptive rood pattern search for fast block-
matching
motion estimation”. IEEE Trans. Image Process., vol. 11 no. 12, pp. 1442–1448,
Dec. 2002.
[2] C. Je and H.-M. Park, “Optimized hierarchical block matching for fast and
acc-urate image registration,” Signal Process.: Image Commun., vol. 28, no. 7,
pp. 779–791, 2013.
[3] K. Dabov, A. Foi, and K. Egiazarian“Image denoising by sparse 3D
transform-domain collaborative filtering,” IEEE Trans. Image Process.,vol. 16,
no. 8, pp. 2080–2095, Aug. 2007.
[4] B. Ahn and N. I. Cho, “Block-matching convolutional neural network
forimage denoising,” CoRR abs/1704.00524, 2017.
25. [5] A. Roy, J. Singha, S. S. Devi, and R. H. Laskar, “Impulse noise removal
using SVM classification based fuzzy filter from gray scale images,” Signal
Process., vol. 28, pp. 262–273, 2016.
[6] A. Roy and R. H. Laskar, “Non-casual linear prediction based adaptive
filter for removal of high density impulse noise from color images,” AEU Int. J.
Electron. Commun. vol. 72, pp. 114–124, 2017.
[7] G. Pok, J. C. Liu, and A. S. Nair, “Selective removal of impulse noise
based on homogeneity level information,” IEEE Trans. Image Process., vol. 12,
no. 1, pp. 85–92, Jan. 2003.
[8] Y. Dong and S. Xu, “A New Directional weighted median filter for removal
of random-valued impulse noise,” IEEE Signal Process. Lett.,vol. 14, no. 3, pp.
193–196, Mar. 2007.