Professional Documents
Culture Documents
Point Arithmetic Geometric: Chapter-3
Point Arithmetic Geometric: Chapter-3
Point
Operati
Arithmetic
on on
Geometric
DIP
3/20/16
3.1.1Logarithmic transform
The
Contd
Note
Contd
Thus,
s = log(1 + r)
3/20/16
Matlab code
We
3/20/16
The
This
Contd
Here, we see that the contrast of the
background in the original image can be
improved by applying the exponential
transform, but at the expense of contrast
in the darker areas of the image.
The background is a high-valued area of
the image (bright), whilst the darker
regions have low pixel values.
This effect increases as the base number
is increased.
3/20/16
Matlab code
3/20/16
3/20/16
10
Matlab code
3/20/16
11
3/20/16
12
13
Contd
The
14
Matlab code
Please
have a look on
>> doc imadjust!!!
3/20/16
15
16
Contd
Ioutput = IA + IB
Ioutput = IA + C
In both cases, the values at an individual
pixel location (i,j) in the output image are
mapped as follows:
Ioutput(i,j)= IA(i,j) + IB(i,j)
Ioutput(i,j)= IA(i,j) + C
To perform the operation over an entire
image of dimension C,R, we simply iterate
over all image indices for (I,j) = {0 . . . C1; 0 . . . R-1} in the general case (N.B. in
Matlab pixel indices are {1 . . C;1 . . R}).
3/20/16
17
Image addition
Adding
a value to each
image pixel value can
be used to achieve the
following effects:
Contrast adjustment:
Adding a positive
constant value C to each
pixel location increases
its value and, hence, its
brightness.
Blending :Adding images
together produces a
composite image of both
input images. This can be
used to produce blending
effects using weighted
addition.
3/20/16
18
Matlab code
3/20/16
19
Image subtraction
Subtracting
20
Matlab code
3/20/16
21
22
Matlab code
3/20/16
23
Challenges?
For
24
solutions
Three
principal ways:
3/20/16
25
Applications
In
3/20/16
26
Logical operation
We
3/20/16
27
->NOT Operation
This
28
Contd
Similar
3/20/16
29
3/20/16
30
Individual assignment
Water
3/20/16
31
32
Contd
Translating
33
Contd
Shape
3/20/16
34
35
Contd
You
36
Contd
This
37
38
39
Rotate an Image
To
40
Contd
This
3/20/16
41
Translate an Image
This
42
Contd
Translate
43
Contd
J = imtranslate(I,[15, 25]);
figure;
imshow(J);
Use the 'OutputView'
parameter set to 'full' to
adjust the display to show
the entire translated
image.
J=imtranslate(I,
[15,25],'OutputView','full');
figure;
imshow(J);
3/20/16
44
Coordinates of
the original image
3/20/16
45
Contd
Scaling
e.g:
46
Contd
Reflecting
e.g:
J(x, y) = I(-x, y)
J(x, y) = I(x, -y)
3/20/16
47
Linear transformation
It
Coordinates of the
transformed image
Coordinates of the
original image
3/20/16
48
Contd
Translation:
Scaling:
Flipping:
3/20/16
49
Contd
Rotation:
3/20/16
50
Contd
Any
3/20/16
51
contd
Shear:
How?
This
52
Contd
Affine:
the
53
summery
3/20/16
54
projective transform
If
55
Contd
However,
in those situations in
which the points of interest in the
object can be considered as
confined (either actually or
approximately) to a plane and we
are interested in the mapping of
those object points into an
arbitrarily oriented image plane,
the required transformation is
termed projective.
3/20/16
56
Contd
Since
this mapping is
constrained at four 2-D
points, there are eight
coordinates and thus
eight degrees of freedom
in a projective transform.
It is possible to show
that the general form of
the 2-D projective
transformation matrix in
a homogeneous
coordinate system is
given by:
3/20/16
57
Contd
the
transformed (projected)
coordinates in the image plane are
related to the world points through
matrix multiplication as:
Note
58
Matlab code
3/20/16
59
Matlab output
3/20/16
60
Warp transformation
mapping
61
Contd
pair
62
Contd
3/20/16
63
Contd
4. The chosen functional forms f (x,
y) and g(x, y) will be characterized
by one or more free (fit)
parameters. We solve the system of
equations for the free parameters.
5. For every valid point in the base
image, calculate the corresponding
location in the input using the
transforms f and g and copy the
intensity value at this point to the
base location.
3/20/16
64
See z process
3/20/16
65
e.g
3/20/16
66
Matlab code
3/20/16
67
Fourier Transform
Back ground:
the Frech mathematician Jean Baptiste Joseph Fourier was
born in 1768.
Basically, Fourier's contribution in this particular field
states that any function that repeats itself can be
expressed as the sum of sine and cosine of different
frequencies each multiplied by different coefficients (we
call now this a fourier series.)
Even functions that are not periodic (but whose area
under the curve is finite) can be expressed as the integral
of sine and cosine multiplied by weighting function.
The function can be reconstructed(recovered) completely
via an inverse process with no lose of information.
Fourier transform is applicable here, for image
enhancment approach.
3/20/16
68
Where
3/20/16
69
Contd
Both
And,
But
70
We
Where
Therefore,
3/20/16
71
And
Where
72
Contd
As
Is
73
Contd
Finally
3/20/16
74