0% found this document useful (0 votes)
103 views6 pages

IPS: A New Flexible Framework For Image Processing

Image processing is a discipline which is of great importance in various real applications; it encompasses many methods and many treatments. Yet, this variety of methods and treatments, though desired, stands for a serious requirement from the users of image processing software; the mastery of every single programming language is not attainable for every user. To overcome this difficulty, it was perceived that the development of a tool for image processing will help to understanding the theoretical knowledge on the digital image. Thus, the idea of designing the software platform Image Processing Software (IPS) for applying a large number of treatments affecting different themes depending on the type of analysis envisaged, becomes imperative. This software has not come to substitute the existing software, but simply a contribution in the theoretical literature in the domain of Image Processing. It is implanted in the MATLAB platform: effective and simplified software specialized in image treatments in addition to the creation of Graphical User Interfaces (GUI) [5][6]. IPS is aimed to allow a quick illustration of the concepts introduced in the theoretical part. This developed software enables users to perform several operations. It allows the application of different types of noise on images, to filter images color and intensity, to detect edges of an image and to apply image thresholding by defining a variant threshold, to cite only a few.

Uploaded by

Editor IJACSA
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views6 pages

IPS: A New Flexible Framework For Image Processing

Image processing is a discipline which is of great importance in various real applications; it encompasses many methods and many treatments. Yet, this variety of methods and treatments, though desired, stands for a serious requirement from the users of image processing software; the mastery of every single programming language is not attainable for every user. To overcome this difficulty, it was perceived that the development of a tool for image processing will help to understanding the theoretical knowledge on the digital image. Thus, the idea of designing the software platform Image Processing Software (IPS) for applying a large number of treatments affecting different themes depending on the type of analysis envisaged, becomes imperative. This software has not come to substitute the existing software, but simply a contribution in the theoretical literature in the domain of Image Processing. It is implanted in the MATLAB platform: effective and simplified software specialized in image treatments in addition to the creation of Graphical User Interfaces (GUI) [5][6]. IPS is aimed to allow a quick illustration of the concepts introduced in the theoretical part. This developed software enables users to perform several operations. It allows the application of different types of noise on images, to filter images color and intensity, to detect edges of an image and to apply image thresholding by defining a variant threshold, to cite only a few.

Uploaded by

Editor IJACSA
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

(IJACSA) International Journal of Advanced Computer Science and Applications,

Vol. 2, No.1, January 2011

IPS: A new flexible framework for image


processing
Otman ABDOUN Jaafar ABOUCHABAKA
LaRIT, IbnTofail University LaRIT, IbnTofail University
Faculty of Sciences, Kenitra, Morocco Faculty of Sciences, Kenitra, Morocco
Email: [email protected] Email: [email protected]

Abstract— Image processing is a discipline which is of I. INTRODUCTION


great importance in various real applications; it Image processing is a set of methods that can
encompasses many methods and many treatments. Yet, this transform images or to extract information [4][6]. This is
variety of methods and treatments, though desired, stands a very wide area, which is more and more applications:
for a serious requirement from the users of image
processing software; the mastery of every single  Much of the mail is now sorted automatically, thanks
programming language is not attainable for every user. To to the automatic recognition of the address,
overcome this difficulty, it was perceived that the  In the military field, devices capable of detecting and
development of a tool for image processing will help to
recognize automatically their targets,
understanding the theoretical knowledge on the digital
image. Thus, the idea of designing the software platform  In industry, automatic control by vision is
Image Processing Software (IPS) for applying a large increasingly common in manufacturing lines,
number of treatments affecting different themes depending  Image compression is experiencing a significant
on the type of analysis envisaged, becomes imperative. This expansion in recent years, particularly through the
software has not come to substitute the existing software,
but simply a contribution in the theoretical literature in the
development of Internet and digital television.
domain of Image Processing. It is implanted in the
MATLAB platform: effective and simplified software In this paper, we present an image processing
specialized in image treatments in addition to the creation software IPS, is developed in MATLAB, it represents a
of Graphical User Interfaces (GUI) [5][6]. IPS is aimed to powerful tool for scientific calculations, and creating
allow a quick illustration of the concepts introduced in the graphical user interfaces (GUI). The program is available
theoretical part. This developed software enables users to for use with MATLAB or as a stand-alone application
perform several operations. It allows the application of that can run on Windows and UNIX systems without
different types of noise on images, to filter images color and requiring MATLAB and its toolboxes. The home
intensity, to detect edges of an image and to apply image interface of the IPS platform is shown in Fig.1
thresholding by defining a variant threshold, to cite only a
few.
Keywords—Image Processing; Noise; Filter; MATLAB;
Edge detection.

Figure. 1 : General overview of the program IPS


1|Page

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.

There are several types of noise:


Figure 2.a : Original image blurred
A. Gaussian noise
It's a sound, whose value is randomly generated
following the Gaussian:
  ( x  m )2 
 
1  2
2
B( x)  e 

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

 LOW-PASS filters, is to mitigate the components of V. RESTAURATION


the image having a high frequency (dark pixels). This Restoring an image is to try to offset the damage
type of filtering is generally used to reduce the image suffered by this image [4][6]. The most common
noise is why we usually talk about smoothing. The impairments are a blur or defocus shake. F image
averaging filters are a type of low-pass filters whose available is the result of degradation of the original image
principle is to average the values of neighboring I. This degradation, when it’s acts of defocus blur or
pixels. The result of this filter is a fuzzy picture. camera shake, as a first approximation can be modeled
MATLAB has a function to apply such filtering; it is by a linear filter h, followed by the addition of noise B
the function Filter2 (Fig.6.c); (Fig.7). The noise can account for the actual noise at the
 Median filter is a nonlinear filter, which consists of sensor and quantization noise from the digitization of the
replacing the gray level value at each pixel by the picture, but also and above all, the difference between the
gray level surrounded by so many values that are adopted model and reality. In general, we assume that it
higher than lower values in a neighborhood of the is a Gaussian white noise in the frequency domain.
point considered. MATLAB has a function to apply
such filtering; it is the function MEDFILT2 (Fig.6.e); I Linear F
Filter: h +
 HIGH-PASS FILTER, unlike the low-pass, reduce
the low frequency components of the image and make
it possible to accentuate the detail and contrast is why
the term "filter accentuation "is sometimes used B
(Fig.6.d); Figure 7. Principle of degradation
 Filters BANDPASS for obtaining the difference
between the original image and that obtained by The restoration is calculated, from F, an image I as
applying a low-pass filter. close to the original image I [7]. To do this, we need to
know the degradation. Degradation is sometimes
 Directional Filters applying a transformation in a assumed to be known, but in practice it is generally
given direction. unknown, so we have estimation from the picture
deteriorated, as shown in Fig.8:
Consider an image I and a two-dimensional filter h,
filtering the image I by the filter F is an image whose I F Î
luminance is given by: Degradation Restoration

F ( x, y)   h(a, b) I ( x  a, y  b)
a ,b
(5) Estimation of
the degradation
parameters

Figure 8. Principle of restoration

f ( x, y)   h(a, b) I ( x  a. y  b)  B( x, y )
a ,b
(6)

a. Nosing image b. Convolution filtering  (h * I )( x, y)  B( x, y)


By taking the Fourier transform, assuming the images I
and F periodic, we obtain:
F (u, v)  H (u, v) I (u, v)  B(u, v) (7)

There are several types of degradation, mention the


following:
c. Law-Pass Filtering d. High-Pass Filtering
A. Defocus
Each point on the scene then gives the picture a task-
shaped disk; this task is much larger than the defocusing
is important [6]. Degradation can be modeled by a linear
filter h whose coefficients h (x, y) λ apply to the inside of
discs and 0 outside (the value of λ is calculated so that
the sum is equal to 1).
e. Median filtering To simplify the experiments, we assume below that
Figure 6. Image Filtering (a, b , c, d et e) the degradation is performed by a filter whose impulse

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

VII. EDGE DETECTION


In the previous sections we saw how to estimate h
(x, y). Fourier transform, we deduce H (u, v). We take The contours are essential information for certain
applications of image processing. In particular, the
care to observe the following precautions: Before contours of an object can generally characterize its shape.
applying the Fourier transform, fill with zeros h to reach Edge detection can be achieved with filters whose
the size of the image, otherwise the equation (10) contain coefficients were carefully chosen. We discuss in this
extension functions different. Finally, the following section, three sets of special filters: filters Prewitt,
equation gives us G (u, v). Roberts and Sobel.
A set of filters edge detection (Prewitt, Roberts and
To restore the image, we calculate the spectrum of the Sobel) consists of a pair of linear filters that detect the
restored image: contours in two orthogonal directions: vertical and
horizontal.
Î(u,v)=G(u,v) F(u,v) (11)
A. Filter Prewitt
This involves applying the inverse filter in the The Prewitt filters horizontal and vertical are:
frequency domain. Finally, an inverse Fourier transform
applied to I (u, v) gives the restored image I (x, y).
To better understand the principle and limitations of
this method, we will now express I (u, v) as a function of

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.

c. Filter de Sobel d. Filter Robert


Figure 10. Edge detection of an image (a, b , c and d)

The choice of all of these treatments is justified by


our desire to diversify the fields of applications enabled
by our software IPS, which makes it very useful.

105 | P a g e

http://ijacsa.thesai.org/

You might also like