Nguyễn Công Phương

DIGITAL IMAGE PROCESSING

Affine and Logical Operations,  Distortions, and Noise in Images

Contents

Introduction to Image Processing & Matlab Image Acquisition, Types, & File I/O Image Arithmetic

Image Transform Spatial & Frequency Domain Filter Design Image Restoration & Blind Deconvolution

Binary Image Processing Image Encryption & Watermarking Image Classification & Segmentation

sites.google.com/site/ncpdhbkhn

2

I. II. III. IV. Affine & Logical Operations, Distortions, & Noise in Images V. VI. VII. VIII. Image Compression IX. Edge Detection X. XI. XII. XIII. Image – Based Object Tracking XIV. Face Recognition XV. Soft Computing in Image Processing

Image Arithmetic

1. Affine Operations

a) Translation b) Rotation c) Scaling

2. Logical Operators 3. Noise in Images 4. Distortions in Images

sites.google.com/site/ncpdhbkhn

3

Affine Operations

• An affine operation/transformation maps

variables into new variables by applying a linear combination of translation, rotation, and scaling (TRS) operations

x

A

B

2 y

2

x 1 y 1

  

  

  

  

sites.google.com/site/ncpdhbkhn

4

Translation

x

1 0 0 1

x 1 y 1

b 1 b 2

  

  

  

  

  

  

  

  

• Pixel movement by b1 in x & b2 in y direction. • Used to improve visualization of an image.

sites.google.com/site/ncpdhbkhn

5

2 y 2

Rotation

x

x 0 y

cos sin

sin  cos

 

x 1 y 1

  

    

  

  

  

  

   

  

• Rotates all pixels by an angle of θ degrees

(counterclockwise for positive angle)

• Used to improve the visual appearance of an

image.

sites.google.com/site/ncpdhbkhn

6

2 y 0 2

Scaling

x

0

a

a 11 0

x 1 y 1

0     0  

  

  

  

     

  

• Performs a geometric transformation that can be

used to shrink or zoom the size of an image.

• Image reduction/subsampling: replacement (of a group of pixel values by one arbitrarily chosen pixel, a11 or a22, value from within this group), or by interpolating between pixel values.

• Image zooming: achieved by pixel replication or

by interpolation

sites.google.com/site/ncpdhbkhn

7

2 y 2 22

Image Arithmetic

1. Affine Operations 2. Logical Operators a) AND & NAND b) OR & NOR c) XOR & XNOR d) NOT

3. Noise in Images 4. Distortions in Images

sites.google.com/site/ncpdhbkhn

8

AND & NAND

• Used to:

– Compute the intersection of two images, – Extract a portion of an image.

A B AND NAND

AND

AB

0 0 0 1

AB

NAND (

 )

0 1 0 1

1 0 0 1

Binary operator

Grayscale operator

sites.google.com/site/ncpdhbkhn

9

1 1 1 0

OR & NOR

A B OR NOR

OR

A B

 

0 0 0 1

NOR (

 )

A B 

0 1 1 0

1 0 1 0

Binary operator

Grayscale operator

sites.google.com/site/ncpdhbkhn

10

1 1 1 0

Image Arithmetic

1. Affine Operations 2. Logical Operators a) AND & NAND b) OR & NOR c) XOR & XNOR d) NOT

3. Noise in Images 4. Distortions in Images

sites.google.com/site/ncpdhbkhn

11

XOR & XNOR

A B XOR XNOR

XOR

AB

0 0 0 1

 

AB

 A B  A B

XNOR (

 )

0 1 1 0

1 0 1 0

Binary operator

Grayscale operator

sites.google.com/site/ncpdhbkhn

12

1 1 0 1

NOT

A A’

A

2

1b

A

 

 

0 1

Binary operator

Grayscale operator

sites.google.com/site/ncpdhbkhn

13

1 0

Image Arithmetic

1. Affine Operations 2. Logical Operators 3. Noise in Images 4. Distortions in Images

sites.google.com/site/ncpdhbkhn

14

Noises in Images

• Photon noise: due to the stochastic nature of

photon generation.

• Thermal noise: electrons are released due to

thermal activity & get trapped in the CCD wells.

• On – chip electronic noise: originates in the process of reading the signal from the sensor. • KTC noise: associated with the gate capacitor of

an FET.

• Amplifier noise: in modern well – designed

electronics, it is generally negligible.

• Quantization noise: occurs in the analog – to –

digital converter (ADC).

sites.google.com/site/ncpdhbkhn

15

Distortions in Images

• Commonly called blur. • Linear motion blur: due to relative motion

between the recording device and the object.

• Uniform out – of – focus blur: when a camera on a 2D imaging plane images a 3D object, some parts of the object are in focus whereas other parts are not.

• Atmospheric turbulence blur: due to a long – term

exposure case.

• Scatter blur: the incident imaging quanta are

reflected by the system structure or other incident quanta.

sites.google.com/site/ncpdhbkhn

16