1.arithmetic & logical operations
-
Upload
mukesh-bhardwaj -
Category
Engineering
-
view
324 -
download
2
description
Transcript of 1.arithmetic & logical operations
![Page 1: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/1.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/2.jpg)
Amity School of Engineering & Technology
Module I
Image Enhancement &
Restoration
2
![Page 3: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/3.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/4.jpg)
Amity School of Engineering & Technology
Addition
• Useful for combining information
between two images
0 <= a <= 1
![Page 5: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/5.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/6.jpg)
Amity School of Engineering & Technology
Subtraction• Useful for “change” detection.
![Page 7: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/7.jpg)
Amity School of Engineering & Technology
Subtraction (cont’d)• Medical application.
iodine medium injected
into the bloodstream
difference enhanced
![Page 8: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/8.jpg)
Amity School of Engineering & Technology
Multiplication/Division• Use to adjust the brightness of the image.
multiplication by 2
![Page 9: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/9.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/10.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/11.jpg)
Amity School of Engineering & Technology
Logical Operations
![Page 12: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/12.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/13.jpg)
Amity School of Engineering & Technology
OR• Parts of another image can be added with
a logical OR operator.
![Page 14: 1.arithmetic & logical operations](https://reader033.fdocuments.us/reader033/viewer/2022052601/559431091a28ab2e3d8b4797/html5/thumbnails/14.jpg)
Amity School of Engineering & Technology
ExampleResult of AND Result of OR
OR