CMPE362: Digital Image Processing
Spring 2024
Dr. Yücel ÇİMTAY
Department of Computer Engineering
TED University
Prerequisites of This Course
This is a computer science course
• It will involve a fair amount of math
– calculus, linear algebra
– probability
–signal processing
• It will involve the modeling and design of a
system - one final course project
– Programming skills Python, or C++
Textbook
Required:
Digital Image Processing, Rafael C.
Gonzalez and Richard E. Woods, 4th
Edition, Pearson
We will cover many topics in this text
book
We will also include special topics on
recent progresses on image
processing
Assessment
A. Midterm [25%]
- 1 Midterm exam
B. Final Exam [35%]
- 1 Final Exam
C. Project [25%]
- 1 Project: Developing an open-source image processing toolbox for Python.
D. Quiz [15%]
- 1 quiz
Requirement for Final Project
A complete research project
• Developing an opencv-like image processing library for
Python
• Each student will develop 4-5 different image processing
functions.
• Submission of 1 interim report
• Submission of the codes and final report.
History
A complete research project
• "View from the Window at Le Gras "
• Heliography
• Joseph Nicéphore
• 1826, 1827
• 1920s, London-Newyork
Bartlane cable picture transmission system
Human Perception VS Machine Vision
• Limited vs entire EM spectrum
https://www.radio2space.com/components-of-electromagnetic-spectrum/
Image Processing Image Analysis
Image acquisition
Low level Image enhancement
Image processing
Image compression
Image segmentation
Mid level
Object recognition
Image analysis
Scene understanding
(Computer vision,
High level
Semantics Pattern recognition, etc.)
Image Acquisition and Representation
Examples
1. Brain MRI 2. Cardiac CT 3. Fetus Ultrasound
4. Satellite image 5. IR image
1 and 3. http://en.wikipedia.org 4. http://emap-int.com
2. http://radiology.rsna.org 5. http://www.imaging1.com
Image Acquisition
Camera + Scanner Digital Camera: Get images into computer
lensaperture shutter film
Image Representation
Discrete representation of images
• we’ll carve up image into a rectangular grid of pixels P[x,y]
• each pixel p will store an intensity value in [0 1]
• 0 black; 1 white; in-between gray
• Image size mxn (mn) pixels
Color Image
Red Green Blue
(1,0,0) (0,1,0) (0,0,1)
0.6
0.0
+
0.8
0 Colors along Red axis 1
RGB
channels
Video: Frame by Frame
30 frames/second
Image Enhancement
Image Restoration
Image Compression
Video compression
Image Segmentation
Microsoft multiclass segmentation data set
Image Completion
Interactively select objects. Remove them and automatically
fill with similar background (from the same image)
I. Drori, D. Cohen-Or, H. Yeshurun, SIGGRPAH’03
More Examples
Morphological Image Processing
Object Detection / Recognition
Content-Based Image Retrieval
Biometrics
Super-Resolution
Applications of Digital Image Processing
Digital camera
Photoshop
Human computer interaction
Medical imaging for diagnosis and treatment
Surveillance
Automatic driving
Fast-growing market!
Basic Concepts in Digital
Image Processing
Now,
Introducing some basic concepts in digital image processing
• Human vision system
• Basics of image acquisition
Elements of Human Visual Perception
Lens and Cornea: focusing on the
objects
Two receptors in the retina:
• Cones and rods
Visual axis
• Cones located in fovea and are
highly sensitive to color
• Rods give a general overall
picture of view, are insensitive
to color and are sensitive to low
level of illumination
http://www.mydr.com.au/eye-health/eye-anatomy
Distribution of Rods and Cones in the Retina
Perceived Intensity is Not a Simple Function
of the Actual Intensity (1)
Perceived Intensity is Not a Simple Function of
the Actual Intensity – Simultaneous Contrast
How do we perceive separate Scenes
features, objects, scenes, etc.
in the environment?
Perception of a scene involves Objects
multiple levels of perceptual
analysis.
Groups of
Features
Features
What do we do with all of this visual
information??
“Bottom up processing”
Scenes
• Data-driven
Top-down
• Sensation reaches brain,
and then brain makes
sense of it Objects
“Top down processing”
• Cognitive functions informs Groups of
our sensation Features
• E.g., walking to refrigerator
in middle of night
Bottom-upFeatures
Now,
Introducing some basic concepts in digital image processing
• Human vision system. Why we need to study human eye?
• Basics of image acquisition
• Geometry – size, location, …
• Appearance – color, intensity
Image Formation in the Eye
Image is upside down in the retina/imaging plane!
Adjust focus length
• Camera
• Human eye
Lens Parameters
Image plane
f
P
d F
FOV
O
p
S1 S2
Thin lens theory: •Increasing the distance from the object to the lens
will reduce the size of image
•Large focus length will give a small FOV
FOV
Light and EM Spectrum
http://www.kollewin.com/blog/electromagnetic-spectrum/
Relation Among Wavelength, Frequency and
Energy
wavelength ( ), frequency (v), and energy (E )
c
, c 2.99810 8 m/s is the speed of light
v
E hv, h is the Planck's constant, 6.62606810 -34 m 2 kg / s
Image Sensing and Acquisition
Illumination
energy digital
images
Incoming energy
is transformed
into a voltage
Digitizing the
response
A (2D) Image
An image = a 2D function f(x,y) where
o x
• x and y are spatial coordinates
• f(x,y) is the intensity or gray level
A digital image:
• x, y, and f(x,y) are all finite
y
• For example x 1,2,… , M , y 1,2,
f ( x, y) 0,1,2,… ,255
Digital image processing processing digital images by
means of a digital computer
Each element (x,y) in a digital image is called a pixel (picture
element)
Image Sampling and Quantization
Sampling: Digitizing the coordinate values (usually
determined by sensors)
Quantization: Digitizing the amplitude values
Image Sampling and Quantization in a Sensor
Array
CCD array
Dynamic Range
Imin f (x,y) Imax in practice saturation
Representing Digital Images
(a): f(x,y), x=0, 1, …, M-1, y=0,1, …, N-1
x, y: spatial coordinates spatial domain
Number of bits storing the image
M
b M N k
Spatial Resolution
Spatial resolution: smallest discernible details
Large image size itself does not mean high
spatial resolution!
1280*960
http://www.shimanodealer.com/fishing_reports.htm
Intensity Resolution
Intensity resolution
• Smallest discernible change in intensity levels
• Using the number of levels of intensities
256 128 64 32
16 8 4 2
Set Operations Based on Coordinates
A region in an image is represented by a set of coordinates within the region
Some Basic Relationships between Pixels
Neighbors of a pixel
(x-1,y)
(x-1,y-1) (x-1,y+1)
(x,y-1) (x,y) (x,y+1)
(x,y)
(x+1,y)
(x-1,y+1) (x+1,y+1)
(x-1,y-1) (x-1,y) (x-1,y+1)
(x,y-1) (x,y) (x,y+1)
(x-1,y+1) (x+1,y) (x+1,y+1)
Adjacency
Adjacency is the relationship between
two pixels p and q
4-adjacency 8-adjacency