Lecture4 Arithmetic Logical
Lecture4 Arithmetic Logical
1. Spatial Domain
Direct manipulation of pixels of the image
2. Frequency Domain
Modifying the Fourier Transform of an image
– We will discuss it in next module.
Note- spatial domain techniques are more efficient
computationally and requires less processing resources to
implement.
Arithmetic Operations
• These operations are applied on pixel-by-pixel basis. So, to add two images
together, we add the value at pixel(0,0) in image 1 to the value at pixel(0,0) in
image 2 and store the result in a new image at pixel (0 , 0). Then we move to the
next pixel and repeat the process, continuing until all pixels have been visited.
Uses:
• Shading correction
• Masking or region of interest operation
4. Division of two images
A B
[0 100 10 [10 100 5 [0 1 2
4 0 10 / 2 0 0 = 2 0 0
8 0 5] 0 10 10] 0 0 0]
Uses
• Shading correction
• Multiplication and Division can be used to adjust brightness of an
image. Multiplication of pixel values by a number greater than one
will brighten the image, and division by a factor greater than one will
darken the image.
• Brightness adjustment is often used as a preprocessing step in image
enhancement.
• One of the principle uses of image multiplication (or division) is to
correct grey-level shading resulting from non uniformities in
illumination or in the sensor used to acquire the image.
Exclusive OR
This operator can be used to find the differences between white regions
of two different images (it requires two images).
NOT
NOT operation can be performed on gray- only one image, and the result
of this operation is the negative of the original image.
g(x,y) = 255 - f(x,y)
Example
Image Histogram Introduction
• A histogram is a graph that shows the frequency of anything.
• In digital image processing, the histogram is used for graphical representation of a
digital image.
• A histogram is a graph showing the number of pixels in an image at each different
intensity value found in that image.
• An image histogram is a graphical representation of the number of pixels in an
image as a function of their intensity. Histograms are made up of bins, each bin
representing a certain intensity value range.
How can we analyze an image histogram?
You can get a general idea of the brightness of an image by looking at the histogram
and observing the spatial distribution of the values.
• If the histogram values are concentrated towards the left, the image is darker.
• If the histogram values are concentrated towards the right, the image is lighter.
Image Histogram contd..
So, for a 8-bit grayscale image there are 256 different possible
intensities and so the histogram will graphically display 256 numbers
showing the distribution of pixels amongst those grayscale values.
Brightness
• Brightness is a visual perception in which a source appears to be reflecting light. Brightness is a subjective
property of an object which is being observed. Brightness is an absolute term and different from lightness.
• A color screens use three colors i.e., RGB scheme (red, green and blue) the brightness of the screen depends
upon the sum of the amplitude of red green and blue pixels, and it is divided by 3.
• The perception of brightness depends upon the optical illusions to appear brighter or darker.
• When the brightness is decreased, the color appears dull, and when brightness increases, the color is clearer.
• In mobile devices, when brightness setting is high, device battery drains fast as compare to the low setting.
Contrast
Contrast is a color which makes an object distinguishable. We can say
that contrast is determined by the color and brightness of the object.
Contrast is the difference between the maximum and minimum pixel
intensity of an image.
• Formula:
As, we can see that the maximum value and minimum value of the pixel is 100
According to formula-
Contrast = 100 - 100 = 0