1.arithmetic & logical operations

14
Amity School of Engineering & Technology 1 Amity School of Engineering & Technology Digital Image Processing Credit Units: 4 Mukesh Bhardwaj

Upload: mukesh-bhardwaj

Post on 02-Jul-2015

329 views

Category:

Engineering


2 download

DESCRIPTION

digital Image Processing

TRANSCRIPT

Page 1: 1.arithmetic & logical operations

Amity School of Engineering & Technology

1

Amity School of Engineering & Technology

Digital Image Processing

Credit Units: 4

Mukesh Bhardwaj

Page 2: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Module I

Image Enhancement &

Restoration

2

Page 3: 1.arithmetic & logical operations

Amity School of Engineering & Technology

3

Arithmetic and Logical Operations :

• Arithmetic operations between images are

array operations means that arithmetic

operations are carried out between

corresponding pixel pairs.

Page 4: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Addition

• Useful for combining information

between two images

0 <= a <= 1

Page 5: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Averaging (see Example 2.5, page 75)

• Image quality can be improved by averaging a

number of images together (very useful in astronomy

applications).5 10

20 50 100

Page 6: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Subtraction• Useful for “change” detection.

Page 7: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Subtraction (cont’d)• Medical application.

iodine medium injected

into the bloodstream

difference enhanced

Page 8: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Multiplication/Division• Use to adjust the brightness of the image.

multiplication by 2

Page 9: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Multiplication/Division (cont’d)• Suppose a sensor introduces some shading in the form:

g(x,y)=f(x,y) h(x,y)

• We can estimate h(x,y) and remove shading by division.

original shade pattern shade correction

Page 10: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Comments

• Arithmetic operation can produce pixel values outside

of the range [0 – 255].

• You should convert values back to the range [0 – 255]

to ensure that the image is displayed properly.

• How would you do the following mapping?

[fmin – fmax] [ 0 – 255]

Page 11: 1.arithmetic & logical operations

Amity School of Engineering & Technology

Logical Operations

Page 12: 1.arithmetic & logical operations

Amity School of Engineering & Technology

AND • The AND operator is usually used to mask

out part of an image.

Page 13: 1.arithmetic & logical operations

Amity School of Engineering & Technology

OR• Parts of another image can be added with

a logical OR operator.

Page 14: 1.arithmetic & logical operations

Amity School of Engineering & Technology

ExampleResult of AND Result of OR

OR