g0q55a multimedia: modelleren en programmeren
DESCRIPTION
G0Q55A Multimedia: modelleren en programmeren. Martin Wolpers & Erik Duval 09 November 2007. Today. Group presentation groups Some secrets of images Java & Java Media Framework Java Assignment. Group presentations. Group 5 Jan Sebrechts Sébastien Devynck Pieter Gevers - PowerPoint PPT PresentationTRANSCRIPT
G0Q55A – Multimedia: modelleren en programmeren 2007/2008
Martin Wolpers & Erik Duval
09 November 2007
1
Group presentation groups Some secrets of images Java & Java Media Framework Java Assignment
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 2
Group 5 Jan Sebrechts Sébastien Devynck Pieter Gevers Kim Gressens Iwein Vranckx
Group 6 Jelle Wardenier Laurens Serneels Stijn Adriaensens Tim Boven
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 3
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 4
Digital images vs. Analog images
Here Digital representations of images
No video! No recording! No capturing!
Presentation based on Fundamentals of Multimedia, Li&Drew, Prentice Hall 2003
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 5
Color models (RGB vs. CYM) Gray Images
1-bit Gray scale
Color images (GIF) Color images compression (JPG)
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 6
RGB: Red – Green – Blue For monitors: colors add
CMY: Cyan – Magenta – Yellow For printing: colors subtract
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 7
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 8
C 1 RM = 1 - GY 1 B
R 1 CG = 1 - MB 1 Y
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 9
Color ~ (Voltage of color electron gun)gamma
=> not enough light with low voltages
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 10
1-bit: white or black 640x480~37,5 kByte
Pixel??
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 11
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 12
Graphic from www.wikipedia.org
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 13
1 pixel = 1 gray value 1 gray value = 1 byte Bitmap = cube with dimension
image size x 8 bit Size 640x480x1Byte
= 300kByte E.g. bmp
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 14
Transform 1 pixel to larger pattern Used for 1-bit printers Example
2x2 dither matrix: transform [0..255] -> [0..4] 0:0 1: [1..63], 2:[64..127], 3:[128..191], 4:
[192..255] Better ideas?
Size: 4x640x480x1Byte
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 15
24-bit color images 3 channels, 1 Byte per channel 256x256x256 colors (~16M) (more later) Size: 640x480x24bit ~ 900kByte
32-bit color images 24-bit images + special effects channel (1
Byte) 8-bit color images
No direct color information Color look-up index
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 16
900kByte300kByte
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 17
1byte index into color palette (256 colors) Size: 1bytex640x480 ~ 300kByte
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 18
Bitmaps and Container TIFF WMF 8-bit GIF
PNG JPEG
EXIF
Vector formats PS and PDF SVG
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 19
TIFF: stands for Tagged Image File Format.
Attachment of additional information (referred to as “tags”) Flexibility
Most important tagformat signifier: type of compression etc. TIFF can store many different types of image
1-bit, grayscale, 8-bit color, 24-bit RGB, etc. TIFF is lossless format but JPEG compression
possible
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 20
Microsoft Windows: WMF native vector file format: Consist of a collection of GDI (Graphics Device
Interface) function calls, also native to the Window environment.
“played” a file (typically using the Windows PlayMetaFile() function) == render graphics
Device-independent and unlimited in size.
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 21
Graphics Interchange Format GIF87a (original) GIF89a (extension for simple animations)
8-bit color images Interlacing
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 22
GIF Signatur
Screen Descriptor
Global Color Map
Image Descriptor
Local Color Map
Raster Area
GIF Terminator
Repeat n times
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 23
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 24
Length: 2^(Pixel+1)
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 25
PNG format: standing for Portable Network Graphics
→ meant to supersede the GIF standard, and extends it in important ways.
Special features of PNG files include: Support for up to 48 bits of color information — a
large increase. contain gamma-correction and alpha-channel
information Progressive display (2-dimensional fashion in
seven passes through each 8 × 8 block)
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 26
JPEG Image compression standard (Joint
Photographic Experts Group) 1992 JPEG is a lossy image compression
method transform coding method using the
DCT (Discrete Cosine Transform). An image = F(i, j) in the spatial domain.
2D DCT yields a frequency response which is a function F(u, v) in the spatial frequency domain
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 27
Observation 1 Intensity does not change widely in small
areas Observation 2
High spatial frequency less noticed by humans Observation 3
Visual acuity (accuracy in distinguishing closely spaced lines) is much greater for gray (“black and white”) than for color.
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 28
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 29
Original 20% 5%
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 30
EXIF (Exchange Image File) used for digital cameras: Compressed EXIF files use the baseline JPEG
format. Tags (many more than in TIFF) facilitate
higher quality printing, more information about the camera picture-taking conditions (flash, exposure, light
source, white balance, type of scene, etc.) Specification of file format for audio that
accompanies digital images.
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 31
Images made up of simple mathematically describable geometrical forms E.g. lines, polygons, circles, bezier curves, etc. Combined and transformed to form complex
objects
File formats PS and PDF SVG: xml based, WWW consortium WMF: windows
Text, too: True Type fonts
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 32
Layout and Content are true-copy enabled!
Postscript – language for typesetting Vector-based picture language
Postscript includes text as well as vector/structured graphics.
GL bit-mapped images included in output Encapsulated Postscript (eps) files add additional
information for inclusion no compression (stored as ASCII)
Portable Document format (PDF) LZW compression Without images (compression ratio, 2:1 or 3:1)
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 33
Graphic from www.wikipedia.org
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 34
Filtershttp://www.ph.tn.tudelft.nl/Courses/FIP/noframes/fip-Morpholo.html
Image processing at TU Delft http://www.ph.tn.tudelft.nl/Courses/FIP/noframes/fip.html
Java Tutorial http://java.sun.com/docs/books/
tutorial/
Java Media Framework http://java.sun.com/products/java-
media/jmf/
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 35
Implementation of your CO2 calculator in JavaFollow strictly (!!) Your Storyboard Your Flow Chart /State Diagram Your Layout Your Timeline
Running Applet (!) including source code documentation
Deadline: 21.11.2007
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 36
Applet works; name restrictions Programming Syle: readalbe, structured,
layout, naming, ... Document differences to flash, smil, etc.
wnd why! Say who did what for how long Used tools
G0Q55A – Multimedia: modelleren en programmeren 2007/2008 37