1.arithmetic & logical operations
DESCRIPTION
digital Image ProcessingTRANSCRIPT
Amity School of Engineering & Technology
1
Amity School of Engineering & Technology
Digital Image Processing
Credit Units: 4
Mukesh Bhardwaj
Amity School of Engineering & Technology
Module I
Image Enhancement &
Restoration
2
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.
•
Amity School of Engineering & Technology
Addition
• Useful for combining information
between two images
0 <= a <= 1
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
Amity School of Engineering & Technology
Subtraction• Useful for “change” detection.
Amity School of Engineering & Technology
Subtraction (cont’d)• Medical application.
iodine medium injected
into the bloodstream
difference enhanced
Amity School of Engineering & Technology
Multiplication/Division• Use to adjust the brightness of the image.
multiplication by 2
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
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]
Amity School of Engineering & Technology
Logical Operations
Amity School of Engineering & Technology
AND • The AND operator is usually used to mask
out part of an image.
Amity School of Engineering & Technology
OR• Parts of another image can be added with
a logical OR operator.
Amity School of Engineering & Technology
ExampleResult of AND Result of OR
OR