Lec07, Image I, v1.03.pdf

Course Presentation
Multimedia Systems
Image I
(Acquisition and Representation)
Mahdi Amiri
March 2011
Sharif University of Technology
Image Representation
Color Depth
The number of bits used
to represent the color of
a single pixel.
bits per pixel (bpp).
1bit: Monochrome
24bit: Truecolor
1bit
Page 1
2bit
8bit
4bit
24bit
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation
Indexed Color, Palette
It is a form of vector quantization compression.
A 2-bit indexed
color image
Color table
(the palette)
8-bit (256-color)
Indexed image and
its own palette
Page 2
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
8-bit Grayscale
image and palette
Image Representation, Palette
Disadvantages
Limited set of simultaneous colors per image.
If the original color palette for a given indexed image is
lost, it can be nearly impossible to restore it.
24-bit
Page 3
8-bit
4-bit
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Incorrect
palette
Image Representation
Halftone
A technique that simulates continuous tone imagery through the use
of dots, varying either in size, in shape or in spacing.
Color Halftoning
Halftone
dots
Page 4
How the human eye
would see this sort of
arrangement from a
sufficient distance.
Three examples of color halftoning with CMYK separations. From left to
right: The cyan separation, the magenta separation, the yellow separation, the
black separation, the combined halftone pattern and finally how the human eye
would observe the combined halftone pattern from a sufficient distance.
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation, Dithering
Definition
An intentionally applied form of noise used to randomize
quantization error.
Etymology: …Mechanical computers performed more accurately
when flying on board the aircraft, and less well on ground!
Application: Increasing color depth without adding new bits
24-bit
Page 5
1-bit
black and white thresholding
1-bit,
with Floyd-Steinberg dithering
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation, Dithering
Floyd–Steinberg Algorithm
Distribute the quantization residual to neighboring
pixels that have not yet been processed.
Pseudocode:
for each y from top to bottom
Distribution matrix
for each x from left to right
oldpixel := pixel[x][y]
newpixel := find_closest_palette_color(oldpixel)
pixel[x][y] := newpixel
quant_error := oldpixel – newpixel
pixel[x+1][y] := pixel[x+1][y] + 7/16 * quant_error
pixel[x-1][y+1] := pixel[x-1][y+1] + 3/16 * quant_error
pixel[x][y+1] := pixel[x][y+1] + 5/16 * quant_error
pixel[x+1][y+1] := pixel[x+1][y+1] + 1/16 * quant_error
Page 6
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation, Dithering
Color Banding Artifact
Dithering prevents large-scale patterns such as "banding" in images.
Web-safe color palette
with no dithering
Page 7
Web-safe color palette
with Floyd–Steinberg
dithering
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Resolution, Most Common Display Resolutions
Image Resolution
Image Resolution
Aspect Ratio
Page 8
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Resolution
Megapixel (MP)
One million pixels
To express:
The number of pixels in an image
8 MP Phone
The number of image sensor elements of digital cameras Camera
The number of display elements of digital displays
2048×1536 sensor elements, or QXGA display
 3.1 MP (2048 × 1536 = 3,145,728)
160 MP
Camera
Page 9
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Resolution
Pixels per inch (ppi)
Pixels per inch (PPI) or pixel density is a measurement of the
resolution of devices in various contexts; typically computer displays,
image scanners, and digital camera image sensors.
18 ppi
72 ppi
150 ppi
Page 10
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Resolution
Pixels per inch (ppi)
The average human eye can only detect 300 ppi.
iPhone 4
3.5"
640x960
326 ppi
iPad, iPad2
9.7"
1024x768
132 ppi
Nokia N95
2.6"
240x320
153 ppi
Google Nexus One
3.7"
480x800
254 ppi
List of displays by pixel density
http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density
Page 11
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Vision
Histogram
Plots the number of pixels for each tonal value. By looking at the histogram for a specific
image a viewer will be able to judge the entire tonal distribution at a glance.
Page 12
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Vision
Contrast is the difference in visual properties that
makes an object distinguishable from other objects
and the background.
Contrast
Formula
Typ. histogram of
a low contrast image
Page 13
Typ. histogram of
a high contrast image
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Vision
Histogram equalization is a method in image processing of
contrast adjustment using the image's histogram.
Histogram Equalization
Page 14
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image File Formats
Raster and Vector Graphics
Raster Graphics (Bitmap)
.BMP, .JPG, .PNG, .GIF
Page 15
Both
.AI, .CDR, .PSD, .TIFF
Vector Graphics
.CGM, .SVG
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation
Panorama
Stitching images
captured above
Milad Tower
Example Software:
“Hugin” and “AutoStitch”
Page 16
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation
AutoStitch Process
Example algorithm: SIFT Keypoint detection and matching
Page 17
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Representation
Large Screen Projection
Page 18
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Acquisition
High-Dynamic-Range (HDR)
4 Images captured with
different Exposure
Values (EV or stop)
Page 19
HDR, Accurately
representing the range
of intensity levels
found in real scenes
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Acquisition, HDR
Algorithm: Tone Mapping
This is
Exposure Bracketing
Tone mapped HDR image
To overcome the limited dynamic
range of current standard digital
imaging techniques
A simple version of tone mapping:
Mean Value Mapping
Page 20
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Acquisition
Focus Bracketing
A sequence of 5 incrementally focused images
Example Software:
“CombineZP”
Focus stacked image
Page 21
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Image Acquisition
Focus Bracketing
Example Application:
Microscopy
The resulting focus stacked image with an
extended depth of field
The three source image
slices at three focal depths
Page 22
Contributions in the final
"focus stacked" image
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I
Multimedia Systems
Image I
Thank You
Next Session: Image II
FIND OUT MORE AT...
1. http://ce.sharif.edu/~m_amiri/
2. http://www.dml.ir/
Page 23
Multimedia Systems, Spring 2011, Mahdi Amiri, Image I