Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1 views

Lecture4 Arithmetic Logical

The document discusses image enhancement techniques aimed at improving image quality for specific applications, categorized into spatial and frequency domains. It covers arithmetic operations like addition, subtraction, multiplication, and division of images, along with logical operations for binary images. Additionally, it explains concepts of image histograms, brightness, and contrast, providing insights into their significance in image processing.

Uploaded by

Arnab Pahari
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Lecture4 Arithmetic Logical

The document discusses image enhancement techniques aimed at improving image quality for specific applications, categorized into spatial and frequency domains. It covers arithmetic operations like addition, subtraction, multiplication, and division of images, along with logical operations for binary images. Additionally, it explains concepts of image histograms, brightness, and contrast, providing insights into their significance in image processing.

Uploaded by

Arnab Pahari
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

IMAGE ENHANCEMENT

The principal objective of image enhancement is to process an image so


that the result is more suitable than the original image for a specific
application.
• Improves quality of an image
• Highlight the important details
• Remove noise, image becomes more appealing
eg; A method that is quite useful for enhancing the X-ray images may not necessarily be
the best approach for enhancing the pictures of Mars transmitted by a space probe.

Two broad categories of image enhancement are –


• Spatial Domain – refers to image plane itself and approach is based on direct
manipulation of pixels in an image.
• Frequency Domain – are based on modifying the Fourier transform of an image.
Image Enhancement
Approaches

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.

1. Addition of two images:


Image addition is used in image averaging to reduce noise. This kind of operation
was performed in image enhancement.

Few important points: (0 – 255)


If the result is a floating point number, round off its value.
If the result is above the pixel range, select the max range value.
If the result is below the pixel range, select the min range value.
If the result is infinity, then consider it to be as zero.
1. Addition
A B
[0 100 10 + [ 10 100 5 = [10 200 15
4 0 10 2 0 0 6 0 0
8 0 5] 0 10 10] 8 10 15]
Uses
• Addition of noisy images for noise reduction.
• Image averaging in the field of astronomy.
2. Image Subtraction
The main application for image subtraction is in change detection (or
motion detection). If we make two observations of a scene and
compute their difference using the above equation, then changes will
be indicated by pixels in the difference image which have non-zero
values.
Uses
1.Subtraction can be used
in medical imaging to remove static
background information.
2.Image Subtraction is basically used
to get rid of background information.
3. Multiplication
[0 100 10 [10 100 5 [0 255 50
4 0 10 * 2 0 0 = 8 0 0
8 0 5] 0 10 10] 0 0 50]

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.

Original Image Image multiplied by 2 Image divided by 2


Logical Operations on Images

Logical operations apply only to binary image


Arithmetic operations apply to multi-valued pixels.
Logical operations are basic tools in binary image processing.
They are used for tasks such as masking, feature detection, and shape
analysis.
Logical operations on entire image are performed pixel by pixel.
Truth table for AND, OR and XOR operations
Logical AND & OR operations
• They are useful for the masking and compositing of images.
• For example, if we compute the AND of a binary image with some other
image, then pixels for which the corresponding value in the binary image
is 1 will be preserved, but pixels for which the corresponding binary
value is 0 will be set to 0 (erased) .
• Thus the binary image acts as a mask removes information from certain
parts of the image.
• Again, if we compute the OR of a binary image with some other image ,
the pixels for which the corresponding value in the binary image is 0 will
be preserved, but pixels for which the corresponding binary value is 1,
will be set to 1 (cleared).
Masking - a simple method to extract
a region of interest from an image
AND
AND operation can be used to find the similarity between white regions
of two different images (it required two images). g(x,y) = a(x,y) ^ b(x,y)

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:

Contrast = maximum pixel intensity - minimum pixel intensity


Example
Let's take the original image which has a matrix of

As, we can see that the maximum value and minimum value of the pixel is 100

According to formula-
Contrast = 100 - 100 = 0

The answer is 0, which means the image has zero contrast.


Thank You

You might also like