IPS: A New Flexible Framework For Image Processing
IPS: A New Flexible Framework For Image Processing
http://ijacsa.thesai.org/
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 2, No.1, January 2011
The IPS platform is simple to use and easily scalable, B. Stretching the histogram
and allows you to do the following: The histogram stretching (also called "histogram
The application of different types of noise on images ; linearization" or "expansion dynamics") is to allocate
Equalize the histogram of an image blurred; frequencies of occurrence of pixels on the width of the
histogram. Thus it is an operation to modify the
Edge detection ; histogram so to the best allocation of intensities on the
The filter color images and intensities; scale of values available. This amounts to extending the
Thresholding of images by defining a threshold histogram so that the value of the lowest intensity is zero
ranging; and the highest is the maximum value.
The change in format and extension images; That way, if the values of the histogram are very
Import and export images in various locations; close to each other, stretching will help to provide a
better distribution to make even clearer light pixels and
II. HISTOGRAMME dark pixels close to the black.
A histogram is a graph to represent the statistical
distribution of pixel intensities of an image, that is to say
the number of pixels for each intensity levels. By
convention, a histogram represents the level of intensity
in the x-axis ranging from the darkest (left) to the lightest
(right). In practice, for computing a histogram, it gives a
number of quantization levels, and for each level, we
count the number of pixels in the image corresponding to
that level. MATLAB function that performs the
calculation of a histogram is imhist [6]. It takes as
parameters like the image name and the number of
quantization levels desired.
A. Histogram equalization
The histogram equalization is a tool that is sometimes
useful to enhance some images of poor quality (poor
contrast, too dark or too bright, poor distribution of
intensity levels, etc.) [4]. This is to determine a Figure 3. Stretching the histogram
transformation of intensity levels that makes the
histogram as flat as possible. If a pixel has intensity i in It is thus possible to increase the contrast of an image.
the original image, its intensity is smoothed image f (i). For example, a picture is too dark can become more
In general, we chose a step function, and determine the "visible ".
width and height of the various steps in order to flatten III. NOISE
the image histogram equalized. MATLAB is performed
by histogram equalization histeq J = (I, n) where I denote Characterizes the noise or interference noise signal,
the original image, J equalized image, and n is the which is to say the parts locally distorted signal. Thus,
number of intensity levels in the image equalized. Avoid the noise of an image means the image pixels whose
choosing too large n (for n = 64 gives good results). intensity is very different from those of neighboring
pixels.
Noise can come from various causes:
Environment during the acquisition ;
Quality of the sensor ;
Quality of sampling.
2 2 (1)
With:
Figure 2.b. Equalized image
σ2 : Variance
101 | P a g e
http://ijacsa.thesai.org/
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 2, No.1, January 2011
m : median
B. Speckle noise
It is a noise (n), generated following the uniform law
with an average of 0 V is a variance equal to 0 .04
default. If I is the original image, the noisy is defined by:
J=I+n*I (2)
C. Salt and Pepper noise b. A. Gaussian noise
a. Original Image
This is a random signal generated by the Uniform
Law. For the noise spectral density (D), it will be
affected by noise D multiplied by the number of picture
elements. Its principle is to :
Determine the indices of its elements with a value
less than half its density. Then assign 0 to the pixels
corresponding to these indices in the image.
Determine the indices of its elements with a value
framed by half its density and its density. Then assign c. Salt and Pepper noise d. Speckle noise
1 to the pixels corresponding to the indices taken
from the processed image
D. POISSON noise
It is an additive noise generated by the Poisson:
ak a
P( x k ) e
k! (3)
With a positive quantity is called the parameter of the law. e. Poisson noise
Figure 4. Noising image (a, b , c, d and e)
The function provided by MATLAB, which can generate
noise that is IMNOISE, its syntax is: IV. IMAGE FILTERING
IMNOISE (I, TYPE) (4) A filter is a mathematical transformation (called
convolution product) for, for each pixel of the area to
I: is the original image which it applies, to change its value based on values of
surrounding pixels, multiplied by coefficients.
TYPE: is the type of noise to apply, it may take the
following values: The filter is represented by a table (matrix),
characterized by its dimensions and its coefficients,
'GAUSSIAN': Gaussian noise to generate the whose center is the pixel concerned. The coefficients in
function syntax IMNOISE will be as follows: Table determine the filter properties. An example of filter
IMNOISE (I, 'Gaussian', m, v), where m and v are 3 x 3 is described in Fig 5:
respectively the mean and variance of the noise
(Fig.4.a);
'POISSON': to generate the Poisson noise, the syntax
is: IMNOISE(I,'Poisson') (Fig. 4.e);
'SALT & PEPPER’: to generate the noise with salt
and pepper. The syntax is: IMNOISE(I,'salt &
pepper',D), where D is the density of noise (Fig.4.c);
‘SPECKLE’: to generate the speckle noise, the syntax
is: IMNOISE(I,'speckle',V), where V is the noise Figure 5. Filter 3x3
variance (Fig.4.d).
Thus the product matrix image, usually very large
because it represents the initial image (array of pixels),
the filter provides a matrix corresponding to the
processed image.
We can say that filtering is to apply a transformation
(called a filter) to all or part of a digital image by
applying an operator. One generally distinguishes the
following types of filters:
102 | P a g e
http://ijacsa.thesai.org/
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 2, No.1, January 2011
F ( x, y) h(a, b) I ( x a, y b)
a ,b
(5) Estimation of
the degradation
parameters
f ( x, y) h(a, b) I ( x a. y b) B( x, y )
a ,b
(6)
103 | P a g e
http://ijacsa.thesai.org/
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 2, No.1, January 2011
response is a square (a square of (2T +1) * (2T +1) pixels I (u, v). Starting from the equation (11) and replacing F
(where T is an integer) . We then: (u, v) by its expression (10), we obtain:
1
h( x, y ) a si x T ou si y T Î(u,v) = G(u,v) H(u,v) I(u,v)+ G(u,v) B(u,v) (12)
a Since, G(u,v) H(u,v)=1, on a :
(2T 1)2 h( x, y ) 0 sinon Î(u,v)= I(u,v)+ G(u,v) B(u,v) (13)
If the noise was zero, we would find exactly the
(8) original image. For nonzero noise, which will always be
The parameter to determine is T. the case in practice, a problem arises when H (u, v)
becomes very low, because we will have a very high
B. Candles value of G (u, v), which causes a strong noise
If the deterioration is due to shake can be a first amplification. A simple solution is to limit the possible
approximation, assuming that each point of the scene values of G (u, v):
image gives a spot-shaped line segment (the orientation If G(u,v)>S, then G(u,v)=S
of this segment depends on the direction of move) [5].
This is modeled by a filter whose impulse response is in
If G(u,v)<-S, then G(u,v)=-S
the shape of a segment.
For simplicity, assume here that this segment is Where, S is a positive threshold.
horizontal. Thus, degradation is modeled by a horizontal
filter But because of this thresholding, G is not exactly the
inverse of H, and degradation can’t be totally eliminated.
h= a , a ,...., a á 2T 1 coefficients . VI. THRESHOLDING
The operation called "simple thresholding" is set to
The value of coefficients is then: zero all pixels with a gray level below a certain value
(called threshold, English treshold) and the maximum
a 1 (2T 1) (9) value pixels with a higher value. Thus the result of
thresholding is a binary image containing black and
In reality, it is clear that the value of T is not white pixels (Fig.9), is the reason why the term is
necessarily right, that orientation may not be moved sometimes used for binarization. Thresholding can
horizontally, the spot defocusing provides disk-shaped highlight shapes or objects in an image. However the
and not square shaped. difficulty lies in choosing the threshold to adopt.
The degraded image is filtered by a filter g (x, y) the
inverse of h (x, y). The problem is that the calculation of
this filter is not always trivial, because it is the opposite
in the sense of convolution. That's why we pass in the
frequency domain using the Fourier transform. Indeed,
this transform converts convolution into multiplication.
In frequency, there will therefore:
G(u,v)= (10) Figure 9. Image thresholding
104 | P a g e
http://ijacsa.thesai.org/
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 2, No.1, January 2011
1 1 1 1 0 1 CONCLUSION
H= 0 V=
1 0 1
0 0 In this work, we developed software that we have
1 1 1 1 0 1 appointed IPS and which is developed on MATLAB
platform. This software is designed to allow the uninitiated
to handle different programming features of MATLAB for
From an image I, we calculate Gh and Gv, image image processing. IPS provides access to a set of
corresponding to the filtering of I h vs. we obtain the operations such as: filtering, sound effects, restoration,
contour image single: edge detection and format change. It has a graphical
interface easier to handle. We intend to improve this
G Gh2 Gv2 version by adding more functions.
(14)
REFERENCES
We seek a binary contour image. For this, we must [1] Agarwal S., Awan A. and D. Roth, Learning to detect objects in
choose a threshold of detection. All pixels of G whose images via a sparse, part-based representation, IEEE Trans. Pattern
intensity is above the threshold will increase to state 1. Anal. Mach. Intell. 26 (11) (2004), pp. 1475–1490
[2] Babaoğlu, Investigation of Reproduction Cells Using Digital Image
B. Sobel Filtre Processing Techniques, Institute of Science, Selcuk Univerity,
Konya (2004).
The Sobel filters horizontal and vertical are:
[3] Balasko B., J. Abonyi and B. Feil, Fuzzy Clustering and Data
Analysis Toolbox for Use with MATLAB, Veszprem University,
1 2 1 1 0 1 Hungary (2008)
H= 0 V= [4] Blanchet G. et Charbit M. : Signaux et images sous MATLAB,
0 0 2 0 2 Edition Hermes Sciences Europe Ltd, Paris 2001.
1 1 1 1 0 1
[5] Bres S., Jolion J.-M., LEbourgeois f. : Analyse et traitements des
images numérique, Edition Lavoisier 2003.
[6] Burel G. : Introduction au traitement d’image simulation sous
C. Robert Filtre MATLAB, Edition Hermes Sciences Europe Ltd, Paris et Floch,
Octobre 2001.
The Robert filters horizontal and vertical are:
[7] Caroline CHAUX : Analyse en ondelettes M-bandes en arbre dual
1 0 0 1 application à la restauration d’images, « http://igm.univ-mlv.fr/
LabInfo / rapportsInternes / 2007 / 03.pdf ».
H= V=
0 1 1 0 [8] Chien S. and H. Mortensen, Automating image processing for
scientific data analysis of a large image database, IEEE Trans.
Pattern Anal. Mach. Intell. 18 (8) (1996), pp. 854–859.
[9] Eddins S.L., R.C. Gonzalez, and R.E. Woods, Digital image
processing using MATLAB, Prentice-Hall, NJ (2004).
[10] Gonzalez, R.C., Woods, R.E., Digital Image Processing, third ed.
Prentice-Hall Inc, Upper Saddle River, New Jersey, 2008.
[11] Nouvel, A., 2002. Description de concepts par un langage visuel
pour un système d’aide à la conception d’applications de traitement
d’images. Ph.D. Thesis, Paul Sabatier University, Toulouse,
France, September.
[12] Russ, 2006 Russ, J.C., 2006. The Image Processing Handbook,
a. Image originale b. Filter de Prewit fifth ed. (Image Processing Handbook), CRC Press Inc., Boca
Raton, FL, USA.
105 | P a g e
http://ijacsa.thesai.org/