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 
Example 
Result of AND Result of OR 
OR

1.arithmetic & logical operations

  • 1.
    Amity School ofEngineering & Technology 1 Amity School of Engineering & Technology Digital Image Processing Credit Units: 4 Mukesh Bhardwaj
  • 2.
    Amity School ofEngineering & Technology Module I Image Enhancement & Restoration 2
  • 3.
    Amity School ofEngineering & Technology 3 Arithmetic and Logical Operations : • Arithmetic operations between images are array operations means that arithmetic operations are carried out between corresponding pixel pairs. •
  • 4.
    Amity School ofEngineering & Technology Addition • Useful for combining information between two images 0 <= a <= 1
  • 5.
    Amity School ofEngineering & 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
  • 6.
    Amity School ofEngineering & Technology Subtraction • Useful for “change” detection.
  • 7.
    Amity School ofEngineering & Technology Subtraction (cont’d) • Medical application. iodine medium injected into the bloodstream difference enhanced
  • 8.
    Amity School ofEngineering & Technology Multiplication/Division • Use to adjust the brightness of the image. multiplication by 2
  • 9.
    Amity School ofEngineering & 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
  • 10.
    Amity School ofEngineering & 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]
  • 11.
    Amity School ofEngineering & Technology Logical Operations
  • 12.
    Amity School ofEngineering & Technology AND • The AND operator is usually used to mask out part of an image.
  • 13.
    Amity School ofEngineering & Technology OR • Parts of another image can be added with a logical OR operator.
  • 14.
    Amity School ofEngineering & Technology Example Result of AND Result of OR OR