Arithmetic and Logical Operations (Chapter 2) : CS474/674 - Prof. Bebis
Arithmetic and Logical Operations (Chapter 2) : CS474/674 - Prof. Bebis
Addition
Useful for combining information between two images
0 <= a <= 1
Subtraction
Useful for change detection.
Subtraction (contd)
Medical application.
iodine medium injected into the bloodstream
difference
enhanced
Multiplication/Division
Use to adjust the brightness of the image. multiplication by 2
Multiplication/Division (contd)
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
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?
Logical Operations
AND
The AND operator is usually used to mask out part of an image.
OR
Parts of another image can be added with a logical OR operator.
Example
Result of AND Result of OR
OR