Digital Image Processing
Prepared By:
Dr. Marwa Mamdouh
Digital Image Processing
• Image Processing
• image in → image out
• Image Analysis
• image in → measurements out
• Image Understanding
• image in → high-level description out
What is Digital Image?
• An image may be defined as a two-dimensional function, f(x, y),
where x and y are spatial (plane) coordinates, and the amplitude of f
at any pair of coordinates (x, y) is called the intensity
or gray level of the image at that point.
• Digital image is composed of a finite number of elements, each of
which has a particular location and value. These elements are
referred to as picture elements, image elements, pels, and pixels.
• Pixel is the term most widely used to denote the elements of a digital
image
What is Digital Image Processing?
• Digital image processing focuses on two major tasks:
• Improvement of pictorial information for human
interpretation.
• Processing of image data for storage, transmission and
representation for autonomous machine perception.
What is Digital Image Processing?
What is Digital Image Processing?
• The continuum from image processing to computer vision can be
broken up into low-level, mid-level and high-level processes.
• low-level: inputs and outputs are images
• mid-level: outputs are attributes extracted from input images
• high-level: an ensemble of recognition of individual objects
State of the art examples of using Image
Processing
• Medical.
• Face detection.
• Handwriting recognition.
• Artistic effects.
• Security: Steganography.
• GIS
• Industry.
Key Stages in Digital Image Processing
Image Definition
Bit Depth
Popular Image File Formats
Some Basic Operations: Using Matlab
Some Basic Operations: Using Matlab
Some Basic Operations: Using Matlab
Write the following using the matlab
• Read a color image and then add 100 to each pixel in each layer
(channel) and show the two images.
• Also, Subtract 100 from each pixel in each layer and show the two
images.
Convert from RGB to Grayscale images
• There are 3 algorithm to convert from RGB to grayscale:
Convert from RGB to Grayscale images
Convert from RGB to Grayscale images
Convert from RGB to Grayscale images
Convert from RGB to Grayscale images
• The Second method:
Convert from RGB to Grayscale images
Convert from RGB to Grayscale images
• The Third method:
Convert from RGB to Grayscale images
Convert Grayscale images to Black and White
images (Thresholding)
Convert Grayscale images to Black and White
images (Thresholding)
Lab Assignment:
• Write a matlab function that Transpose images.
• Write a matlab function that Flips image Vertically.
• Write a matlab function that obtain negative version of the image.
Image Zooming
Image Zooming
Image Zooming
Image Zooming
Image Zooming
Fundamental Steps of DIP
69
Wavelet and
Multi- Compression
resolution
Color Image Morphologica
Output is generally
Processing l Processing
attributes
Output is generally
Knowledge base
Restoration Segmentation
images
Representati
Enhanceme on and
nt Description
Object
Acquisition Recognition 2/28/2023
Problem Domain
Image Enhancement
1. What is Image Enhancement?
2. Domains of Image Enhancement
3. Point Processing
What is Image Enhancement?
• Image enhancement is the process of 71
making images more useful visually.
• Reasons for doing this include:
– Highlighting interesting detail in
images.
– Making images more visually
appealing. Removing noise from
images.
Examples
72
Image Enhancement Measures
73
• Enhancement “parameters”:
1. Brightness
2. Contrast.
3. Histogram
Image Enhancement Measures – (cont.)
Example: Brightness/contrast change?
Image Enhancement Measures – (cont.)
Example: Brightness/contrast change?
Image Enhancement Measures – (cont.)
• Histogram: A way of viewing the 76
distribution of color/intensities in an
image.
h(x) = the number of pixels in I with intensity value x
• A plot of pixels values against pixel
counts.
Frequencies
2/28/2023
Grey Levels
Image Enhancement Measures – (cont.)
Gray Scale Image has one histogram while 77
color images has three; one for each
band (channel).
Luminosity
2/28/2023
Domains of Image Enhancement
Output 78
Input Image Enhancemen (Better)
f (x, y) t Image
g (x, y)
Spatial Transform
Domain Domain
T[f (x, y)]
Operation T
Spatial Spatial
f (x, y) g (x, y)