PREPROCESSING - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

PREPROCESSING

Description:

... which contains isolated pixels whose intensities differ from background. ... represent some abnormal changes in the tissues or textures over a period of time. ... – PowerPoint PPT presentation

Number of Views:174
Avg rating:3.0/5.0
Slides: 29
Provided by: ValuedGate69
Category:

less

Transcript and Presenter's Notes

Title: PREPROCESSING


1
  • PREPROCESSING
  • Preprocessing is basically used to improve the
    quality of an image. This is essential, because
    image acquisition device may be badly calibrated
    or there may be noise in the system.
  • Some of the other reasons could include poor
    lighting conditions, lossy transmission,
    existence of unfriendly operating environment,
    erroneous information introduced during data
    transmission or other variety of reasons.
  • If you apply image processing techniques to such
    noisy images, the results may not be acceptable
    and the decisions could even be wrong.
  • Interpretation of image may even become
    impossible.

2
  • PREPROCESSING
  • In order to improve the quality of original
    image, it is essential to transform the raw image
    data by some appropriate means.
  • A prime objective of image transformation is to
    improve the visual quality of the raw image to
    human observance or for machine interpretation.
  • Such processing algorithm may be said to be
    concerned in a general sense with image
    enhancement.
  • A simplest way to transform the visual image
    f(x,y) is to map directly to the new transformed
    version g(x,y).
  • The transformation may be carried out using an
    algorithm which should be easy to implement on a
    pixel-by-pixel basis, on the entire image.

3
  • PREPROCESSING
  • Some such operations are defined as histogram
    modification techniques.
  • Binarization technique is one such technique. We
    examine each pixel, compare its value against a
    threshold, and map its value to one of two
    possible transformed values ( 0 and 1) according
    to a simple rule.
  • Accuracy of the method depends upon the value of
    the threshold chosen. If proper care is not
    taken, you may lose a lot of image information
    during binarization,.
  • Some kind of preprocessing is essential before
    starting this process.
  • The approaches could be spatial-domain or
    frequency- domain. Together, these approaches
    encompass most of the preprocessing algorithms
    used in image processing systems.

4
  • PREPROCESSING
  • Spatial-Domain Method
  • Refers to aggregate of pixels composing an image.
  • Preprocessing methods are procedures that
    operate directly on these pixels.
  • Preprocessing function in spatial domain is
    expressed as
  • where f(x,y) is input image and g(x,y) is output
    image. h is an operator on f(.), defined over
    some neighborhood of f(x,y).
  • It is possible to let h( ) operate on a set of
    input image(s), such as performing a pixel by
    pixel sum of k images for noise reduction.
  • The principal approach used in defining a
    neighborhood around (x,y) is to use a square or
    rectangular sub-image area centered at (x,y).

g(x,y) h(f(x,y))
5
  • PREPROCESSING
  • Spatial-Domain Method
  • The center of sub-image or the mask is moved
    from pixel-to-pixel, starting, say at the top
    left corner, applying the operator at each pixel
    location p(x,y) to yield new pixel g(x,y).

6
  • PREPROCESSING
  • Spatial-Domain Method
  • A simplest form of h(.) operation is when the
    neighborhood is 1 x 1 and g(x,y) depends on the
    value of f(x,y) only. In this case h becomes an
    intensity transformation.
  • S T. y
  • where y is current intensity of an image point.

7
  • PREPROCESSING
  • Spatial-Domain Method
  • One of the spatial domain technique used most
    frequently is based on the use of convolution
    mask (also known as template, window or filter).
    Basically the mask is a small (3X3) two
    dimensional array.

8
  • PREPROCESSING
  • Spatial-Domain Method
  • Masks coefficients are chosen to detect a
    desired property in an image.
  • Suppose we have an image of constant intensity
    which contains isolated pixels whose intensities
    differ from background. These points can be
    detected by the mask.
  • If all the pixels within the mask area have the
    same value, the sum will be zero. If on the other
    hand, the center of the mask is located at one
    isolated intensity value, the sum will be
    different from zero.

9
  • PREPROCESSING
  • Spatial-Domain Method
  • These different values can be eliminated by
    comparing against the threshold.

w2
w
w
3
1

(x,y1)
w
w
6
w
5
4
(
x1, y
,
)
(
x
,
y
)
(x
x-1,y
,
,
)
w
8
w
w
9
7
(x, y-1)
,
q w1x1w2x2w3x3w4x4w5x5w6x6w7x7w8x8w9x9 C
ompare this value against pre-assigned threshold
for the center pixel.
10
  • PREPROCESSING
  • Frequency Domain Methods
  • This refers to an aggregate of complex pixels
    resulting from the Fourier transform of an image.
  • The concept of frequency is often used in
    interpreting the Fourier transform coefficients
    of the image.
  • This represents a very mathematical technique and
    requires very large amount of computer processing
    time.
  • However, these techniques are very powerful and
    give very good results.
  • Due to complex nature of algorithms, the details
    will not be covered here. Normally FFT or DFT
    coefficients are obtained and used for image
    processing and transformations. However, you
    will be required to use the MATLAB commands in
    frequency domain.

11
Image Normalization The simplest way to
normalize an object in an image with respect to
its position within the image boundaries is - to
implement re-labeling of axes. In such case the
coordinates are translated so as to align the
extremities of the object of interest
cg
12
Image Normalization Some basic mathematical
operations required to perform such
normalization. One of the important feature
which is often needed is to align an object to
the center of the window is CG. In such cases, we
have to calculate the center of gravity of an
image and align this CG to the center of the
window. The center of gravity of an object is
defined by the following relation ( apply after
binarization ).
This operation is performed on binarized image
13
Where x and y represent the coordinates of CG
of the object. f(x,y) represents the intensity
of image points of the binarized image. Some of
the operations required for the normalization
are Translation of An Image Suppose we wish to
translate a point with coordinates (x,y) to a new
location ( x1, y1) by using a displacement vector
(x0,y0). x1 x x0 y1 y y0 In
mathematical form, it can be written
as Apply this transformation to all the
coordinate points of the image. You would get
the original image translated by by (x0, y0)
values.
14
Scaling of an Image Scaling by a factor Sx and Sy
in x and y directions can be performed by using
the following transformation This
transformation is applied to all the coordinate
points points of the image. The factors Sx and Sy
are constants. A value greater than one implies
larger image and smaller value implies a
reduction in the size of the image.
Scaling of 1.8 implies Sx and Sy are 1.8 each
15
Rotation of an Image The transformation matrix
for two dimensional images( which will rotate an
object image by an angle ? degrees in clockwise
direction is defined as The transformation
requires a recalculation of coordinates of all
pixels defining the image. There is no change in
the intensity values of the image. If necessary,
all these operations can be applied
simultaneously on a given image.
x x cos ? y sin ? y - x sin ? y cos ?
16
There are other operations which can be performed
on an image for obtaining required results. Some
of the important ones will be explained later.
(x, y)
y
y
x
?
?
?
x
Rotation is defined by an angle theta, clockwise
direction. However the coordinates x and y are
in opposite direction. (x,y) are original
coordinates and (x,y )are target coordinates of
the object and rotated images respectively
17
  • IMAGE TRANSFORMATION
  • Monadic or One Point Transformation
  • Monadic point-by-point operators are the
    simplest types for image processing operations.
    The process involves a single input image, f(x,y)
    and results in a single output image, g(x,y).
  • Following operators are very useful for image
    processing.
  • Identity Operator
  • This operator results in the creation of an
    output image which is identical to the input
    image. The value of each pixel in the second
    image q is identical to the value of
    corresponding pixel p in the first image.
  • p q f(x,y), for x 1,2, . N, and y
    1,2,M.
  • Inverse Operator
  • This operator involves creation of an output
    image which is inverse of the input image. The
    process is similar to an identity-

18
  • operator, except that the new values of
    intensities are different at every point .
  • If g(x,y) is new intensity value of the original
    image f(x,y) at point (x,y), then g(x,y) (L-1)
    - f(x,y), for all (x,y).
  • If, L 16, and image matrix is
  • Threshold Operator
  • This class of operator results in a binary
    output image from a gray scale input image where
    the level of transition is given by the input
    parameter p1 - which is the threshold..

19
q
q 0 for p lt p1 and q 1 for p gt p1 Let p1
5, and the input image be
1
p
p1
0
15
  • All values below or equal to p1intensities are
    converted to 0 and rest to 1. This operator can
    be used to obtain spatial information or to
    extract some simple image features

20
  • from the histogram by repeating the procedure
    using different threshold values.
  • Binary Threshold Interval Operator
  • This class of operator results in a binary output
    image where all the input gray values in the
    interval p1 to p2 are converted to 1 and all the
    values outside the interval are converted to 0.
    This operator can be used to obtain required
    features from an image based on intensity values.
  • Gray Threshold Interval Operator.
  • This class of operator results in a gray scale
    output image for
  • pixel intensity values between p1 and p2, and
    converts all other input values outside the
    interval to 0. This operator can be used to
    identify image features having specific gray
    intensity values.
  • Inverted Gray Threshold Operator
  • It is similar to Gray threshold operator, except
    that output image is inverted after applying
    the threshold function in the

21
  • gray image. Every pixel in the original image
    which was light will become dark and pixels
    which were dark will become light information
    from histogram based on intensity.
  • Stretch Operator
  • This class of operators results in a
  • full gray scale output image
  • corresponding to input interval p1
  • and p2 and suppresses all the values
  • outside this range.

q
p
p1
p2
q
15
0
p
p1
p2
22
  • There can be many such monadic operators to
    change the appearance of the input image.
  • Dyadic or Two-Point Transformations
  • These operators utilize the information contained
    at the same location in two images. In the
    two-point transformation, pixels from images A
    and B ( from the same coordinates (x,y) )are used
    to create a new image, C. The size of the matrix
    does not change and the dyadic function fD can
    be either linear or non-linear.
  • The transformation function is applied to all
    pixel location pairs in the input image.
  • The information from a pixel location in one
    image is combined with the information of the
    corresponding pixel location of a second image to
    produce the value of a corresponding pixel in the
    output image.

23
  • Image Addition
  • Image addition can be used to reduce the effects
    of noise in the data. The value of the output,
    Ci,j is given by
  • ci,j ( ai,j bi,j . ) / k
  • over the entire( i, j) coordinate range of
    values, where k equals to number of samples
    added. The image addition process averages the
    data in the two input image matrices.
  • In general, there is an accuracy improvement and
    reduction of noise when the procedure is used
    with a large number of samples.
  • Image Subtraction
  • Image subtraction can be used to detect changes
    that have occurred during the time interval when
    the two images were taken - if the two images are
    of the same object.

24
  • The data may also represent some abnormal changes
    in the tissues or textures over a period of time.
    You have to make a note that the images have to
    be registered exactly if any meaningful
    information has to be achieved.
  • ci,j k ( ai,j - bi,j ),
  • where k is a nonlinear function such that the
    minimum value of ci,j is always positive. This
    process is used in dental treatments. It is also
    used in angiography.
  • Image Multiplication
  • Multiplication of two image matrices is used to
    correct for the non-linearity of sensors where
    there is a spatial non-uniform sensitivity over
    the viewing area. This can be corrected by
    multiplying the image matrix by a correction
    matrix. The relationship is given by the
    equation
  • ci,j k (ai,j bi,j ) a i,j,
  • where all the values are rounded up to the next
    integer, the maximum value is 255. ai,j
    represent image points, and

25
  • and bi,j represents correction factors at point
    (i, j).
  • Another use for the multiplication operator would
    be to create a small size window to reduce the
    computations and concentrate in the specific
    area of interest. The corresponding matrix bi,j
    would be given by the equation
  • ci,j ai,j x bi,j ,
  • where bi,j is 1 for all points inside the
    desired window area and 0 for all points outside
    the window area.
  • During the dyadic operations, the size of the
    output image matrix is identical to the size of
    the input matrix. No rows or columns are lost in
    the process as happens with convolutions. A
    normalizing constant may always be required for
    all the dyadic operations.
  • Convolution Spatial Transformation
  • Using this transformation a new image matrix is
    generated, where the new pixel value assigned to
    each location is a function.

26
Image multiplication
27
  • of the pixel values of the adjacent locations (
    neighbors) as indicated by the 3 x 3 or other
    size convolution masks. In a 3x3 convolution, a
    new intensity value for the pixel at the center
    location is computed - based on the values of the
    nine or more neighbor ( depending upon the mask
    size). Subsequently, the mask is then shifted by
    1 position and the process is repeated until the
    entire image matrix is regenerated.
  • It should be noted that the size of the
    resultant matrix is reduced in each direction due
    to edge effect. The size of reduction depends
    upon the mask size.
  • If it is undesirable to reduce the matrix size,
    this can be modified using a rule which assumes
    that the data is constant in the row and columns
    adjacent to the outside edge of the image matrix.

28
Convolution ( neighborhood) Transformation
Write a Comment
User Comments (0)
About PowerShow.com