Les 1
What are images?
Digital images
• The values are all discrete and integers.
• Can be considered as a large array of discrete dots,
• Each dot has a brightness associated with it.
• These dots are called picture elements - pixels.
• The pixels surrounding a given pixel is its
neighborhood.
• A neighborhood can be characterized by its
shape
➔ E.g a 4X4 neighborhood, or of a 3X5
neighborhood
Arrays and Images
• Images are represented as matrices (e.g. numpy arrays)
• Can be written as a function f(x,y)
Types of Images
• Binary Images
• Grayscale Images
• Color (multi-channel) Images
Binary Images – (1 bit image)
• Binary Images: Each pixel is either
black or white.
• Only two possible values for each
pixel (0,1)
• Only need one bit per pixel.
Grayscale Images
• Each pixel is a shade of gray
• Normally from 0 (black) to 255(white).
Each pixel can be represented by eight bits,
or exactly one byte.
• Other grayscale ranges are used, but
generally are a power of 2.(22 = 4, 24 = 64)
,Intensity Histogram
Histograms indicate how the intensity of the
pixels distribute among the whole pixels in
the image, allows us to see how often an
intensity occurs.
Intensity Histogram for Image Segmentation
Multi-channel Images
• Such images is a stack of multiple matrices; representing the multiple channel values
for each pixel
➔ E.g RGB color is described by the amount of red, green and blue in it
RGB – Coding
,Intensity histogram of an RGB Image (used to improve image contrast)
Color models
CMYK Color Space
Secondary colors
• Magenta = Red + Blue = White – Green
• Cyan = Green + Blue = White – Red
• Yellow = Red + Green = White – Blue
RGB to CMYK
Color Models
• RGB images
• represented as 3 values Red, Green and Blue
• hue and the luminosity are represented in each R, G and B channel
• Objects in images have distinct colors (hues) and luminosities.
• Hues and luminosities used to partition different areas of the image.
• Can we separate hue and luminosity?
, HSV color model
• Hue: The “true color” attribute (red, green, blue, orange, yellow, and so
on).
• Saturation: The amount by which the color as been diluted with white.
The whiter in the color, the lower the saturation.
• Value: The degree of brightness: a well-lit color has high intensity; a
dark color has low intensity.
RGB to HSV
HSV vs HSL color models
Color space transformations
What are images?
Digital images
• The values are all discrete and integers.
• Can be considered as a large array of discrete dots,
• Each dot has a brightness associated with it.
• These dots are called picture elements - pixels.
• The pixels surrounding a given pixel is its
neighborhood.
• A neighborhood can be characterized by its
shape
➔ E.g a 4X4 neighborhood, or of a 3X5
neighborhood
Arrays and Images
• Images are represented as matrices (e.g. numpy arrays)
• Can be written as a function f(x,y)
Types of Images
• Binary Images
• Grayscale Images
• Color (multi-channel) Images
Binary Images – (1 bit image)
• Binary Images: Each pixel is either
black or white.
• Only two possible values for each
pixel (0,1)
• Only need one bit per pixel.
Grayscale Images
• Each pixel is a shade of gray
• Normally from 0 (black) to 255(white).
Each pixel can be represented by eight bits,
or exactly one byte.
• Other grayscale ranges are used, but
generally are a power of 2.(22 = 4, 24 = 64)
,Intensity Histogram
Histograms indicate how the intensity of the
pixels distribute among the whole pixels in
the image, allows us to see how often an
intensity occurs.
Intensity Histogram for Image Segmentation
Multi-channel Images
• Such images is a stack of multiple matrices; representing the multiple channel values
for each pixel
➔ E.g RGB color is described by the amount of red, green and blue in it
RGB – Coding
,Intensity histogram of an RGB Image (used to improve image contrast)
Color models
CMYK Color Space
Secondary colors
• Magenta = Red + Blue = White – Green
• Cyan = Green + Blue = White – Red
• Yellow = Red + Green = White – Blue
RGB to CMYK
Color Models
• RGB images
• represented as 3 values Red, Green and Blue
• hue and the luminosity are represented in each R, G and B channel
• Objects in images have distinct colors (hues) and luminosities.
• Hues and luminosities used to partition different areas of the image.
• Can we separate hue and luminosity?
, HSV color model
• Hue: The “true color” attribute (red, green, blue, orange, yellow, and so
on).
• Saturation: The amount by which the color as been diluted with white.
The whiter in the color, the lower the saturation.
• Value: The degree of brightness: a well-lit color has high intensity; a
dark color has low intensity.
RGB to HSV
HSV vs HSL color models
Color space transformations