mad_unit_i

Upload: dilip-thelip

Post on 02-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 MAD_Unit_I

    1/107

    Introduction to Multimedia

    By :-,

    Asso. Prof. in IT Dept.,BVRIT, Narsapur

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

  • 7/27/2019 MAD_Unit_I

    2/107

    What is Multimedia?

    have quite different, or even opposing, viewpoints.

    A PC vendor: a PC that has sound capability, a DVDROM drive, and per aps e super or y o mu me a ena e m croprocessors that understand additional multimedia instructions.

    A consumer entertainment vendor: interactive cable TV with hundreds of digital channels available, or a cable TVlike service

    delivered over a high speed connection high Internet connection.

    modalities, including text, images, drawings (graphics), animation, video sound including speech and interactivity video, speech,

    nteract v ty.

    , , , computer vision, data compression, graph theory, networking, database systems. 2

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

  • 7/27/2019 MAD_Unit_I

    3/107

    Components of Multimedia ,

    audio, images, drawings, animation, and video.

    Video teleconferencing.

    .

    Tele medicine. .

    Searching in (very) large video and image databases for

    . "Augmented"reality: placing real appearing computer

    .

    3

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

  • 7/27/2019 MAD_Unit_I

    4/107

    Including audio cues for where video conference part c pants are ocate .

    Building searchable features into new video, and g v y g v y w w u w,

    scalable multimedia products. .

    Building "inverse Hollywood applications that can

    .

    Video understanding has also been called an inverse .

    Using voice recognition to build an interactive environment sa a kitchen wall web browser.

    4

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

  • 7/27/2019 MAD_Unit_I

    5/107

    Multimedia Research Topics & Projects To the computer science researcher, multimedia consists of

    a wide variety of topics: Multimedia processing and coding : multimedia content

    analysis, content based multimedia retrieval, multimedia security, audio/image/video processing, compression, etc.

    Multimedia system support and networking: network protocols, Internet, operating systems, servers and clients, quality of service (QoS), and databases.

    Multimedia tools end systems applications: Hypermedia systems, user interfaces, authoring systems.

    Multi modal interaction and integration: "ubiquity"web everywhere devices, multimedia education including Computer Supported Collaborative Learning, and design and applications of virtual environments.

    5

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

  • 7/27/2019 MAD_Unit_I

    6/107

    Current Multimedia Projects Many exciting research projects are currently

    underway. Here area few of them:1. Camera based ob ect trackin technolo : trackin of

    the control objects provides user control of the process.2. 3D motion capture: used for multiple actor capture so

    a mu p e ac ors n a v r ua s u o can e use rea to automatically produce realistic animated models with natural movement.

    3. Multiple views: allowing photo realistic (video quality) synthesis of virtual actors from several cameras or from a single camera under differing lighting.

    4. 3D capture technology: allow synthesis of highly realistic speech facial animation from speech.

    6

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

  • 7/27/2019 MAD_Unit_I

    7/107

    5. Specific multimedia applications: aimed at

    and the elderly a rich field of endeavor.6. Digital fashion: aims to develop smart clothing

    a can commun ca e w o er suc en ance clothing using wireless communication, so as to artificiall enhance human interaction in a social setting.

    7 Electronic Housecall system: an initiative for prov ng n erac ve ea mon or ng serv ces to patients in their homes develop interfaces between real and virtual humans for tasks such as augmented storytelling .

    7

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

  • 7/27/2019 MAD_Unit_I

    8/107

    Multimedia and Hypermedia s ory o u me a:1. Newspaper: perhaps the first mass communication

    , , , .2. Motion pictures: conceived of in 1830's in order to

    human eye. Pontecchio, Italy, in 1895.

    4. Television: the new medium for the 20th centur , established video as a commonly available medium and has since changed the world of mass commun ca ons .

    8

    w w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et ww

  • 7/27/2019 MAD_Unit_I

    9/107

    5. The connection between computers and ideas about multimedia covers what is actually only a short period:

    1945 Vannevar Bush wrote a landmark article describing what amounts to a hypermedia system called Memex.

    .1967 Nicholas Negroponte formed the Architecture

    Machine Grou . 1968 Douglas Engelbart demonstrated the On Line System

    (NLS), another very early hypertext program.1969 Nelson hypertext and van Dam at Brown University

    created an early editor called FRESS.

    project entitled Multiple Media resulted in the Aspen Movie Map, hypermedia videodisk, in 1978.

    9

    w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et ww

  • 7/27/2019 MAD_Unit_I

    10/107

    1985 Negroponte and Wiesner co founded the MIT Media Lab.1989 Tim Berners Lee proposed the World Wide Web

    r s na ooper oo sey ea e e pp e u me a Lab.

    1991 MPEG 1 MPEG [M(oving) P(ictures) E(xperts) G(roup)]was approve as an nternat ona stan ar or g ta v eo e to the newer standards, MPEG2, MPEG4, and further MPEGs in the 1990s.

    1991 T e intro uction o PDAs in 1991 egan a new perio in the use of computers in multimedia.

    1992 JPEG was accepted as the international standard for digital image compression led to the new JPEG2000 standard.

    1992 The first MBone audio multicast on the Net was made.1993 The of Illinois National Center for Supercomputing

    University Applications produced NCSA Mosaic the first fullfledged browser.

    10

    w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et ww

  • 7/27/2019 MAD_Unit_I

    11/107

    1994 Jim Clark and Marc Andreessen created the

    1995 The JAVA language was created for platform independent application development.

    1996 DVD video was introduced; high quality fulllength movies were distributed on a single disk. . was announce as a

    Recommendation. 1998 Hand held MP3 devices first made inroads into

    consumerist tastes in the fall of 1998, with the introduction holding of flash of devices 32MB memory.

    WWW s ze was est mate at over 1 on pages.

    11

    w w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w

  • 7/27/2019 MAD_Unit_I

    12/107

    Hypermedia and Multimedia y x y : y, y

    following links that point to other parts of the .

    HyperMedia: not constrained to be text based, can include other media e. . ra hics ima es and especially the continuous media sound and video.

    The World Wide Web (WWW) the best example of a hypermedia application.

    Multimedia means that computer information can be

    represente t roug au o grap cs mages au o, graphics, images,v eo, an an ma on n a on o ra ona me a.

    12

    w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w

  • 7/27/2019 MAD_Unit_I

    13/107

    13

    w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w ww

  • 7/27/2019 MAD_Unit_I

    14/107

    Examples of typical present multimedia applications include:

    Digital video editing and production systems. Electronic newspapers/magazines.

    World Wide Web. Online reference works: e. . enc clo edias ames. Home shopping. . Multimedia courseware.

    .

    Video on demand. .

    14

    w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w ww

  • 7/27/2019 MAD_Unit_I

    15/107

    World Wide Web

    The W3C has listed the following goals for the

    1. Universal access of web resources (by everyone everyw ere .

    2. Effectiveness of navigating available information.3. Responsible use of posted material.

    15

    w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w ww

  • 7/27/2019 MAD_Unit_I

    16/107

    HTTP ( HyperText Transfer Protocol) HTTP: a protocol that was originally designed for

    transmitting hypermedia but can also support ransm ss on o any e ype.

    HTTP a stateless request/response protocol: is no .

    The basic request format:e o ers on

    Additional Headers:

    Message o y The URI (Uniform Resource Identifier): an identifier for

    e resource accesse , e.g. e os name, a ways

    preceded by the token http://. 16

    w . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w

  • 7/27/2019 MAD_Unit_I

    17/107

    Two popular methods: GET and POST. The basic response format:

    Version Status Code Status Phrase

    Additional Headers

    Two commonly seen status codes: 200 OK the request was processed successfully.

    404 Not Found the URI does not exist.

    17

    . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w

  • 7/27/2019 MAD_Unit_I

    18/107

    HTML ( HyperText Markup Language) HTML: a language for publishing Hypermedia on the

    World Wide Web defined using SGML:1. HTML uses ASCII, it is portable to all different

    (possibly binary incompatible) computer hardware.2. The current version of HTML is version 4.01.

    3. The next generation of HTML is XHTML a re ormu a on o us ng .

    HTML uses tags to describe document elements:

    < o en params> e n ng a s ar ng po n , the ending point of the element.

    .

    18

    . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w

  • 7/27/2019 MAD_Unit_I

    19/107

    19

    . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w wj

  • 7/27/2019 MAD_Unit_I

    20/107

    XML ( Extensible Markup Language) XML: a markup language for the WWW in which there

    is modularity of data, structure and view so that user

    (structure).

    from a database a query according to user

    . that is already defined.

    2. The server side scri t will abide b the DTD rules to generate document an XML according to the query using data from your database.

    3. Finally send user the XML Style Sheet ( XSL) depending on the type of device used to display the information. 20

    . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w wj

  • 7/27/2019 MAD_Unit_I

    21/107

    The current XML version is XML 1.0, approved

    . . XML syntax looks like HTML syntax, although it

    :

    All tags are in lower case and a tag has only inline data has to terminate itself, i.e.,

    . Uses name spaces so that multiple DTDs

    declaring different elements but with similar tag names can have their elements distinguished.

    DTDs can be imported from URIs as well.21

    . j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w .j

  • 7/27/2019 MAD_Unit_I

    22/107

    22

    j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w .jn

  • 7/27/2019 MAD_Unit_I

    23/107

    The following XML related specifications are also

    XML Protocol: used to exchange XML information

    XML Schema: a more structured and powerful lan ua e definin XML data t es ta s . XSL: basically CSS for XML.

    Language, pronounced "smile" a particular application of XML (globally predefined DTD) that

    allows for specification of interaction among any media types and user input, in a temporally scripted manner.

    23

    j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n

  • 7/27/2019 MAD_Unit_I

    24/107

    SMIL (Synchronized Multimedia Integration Language)

    to publish presentations using multimedia a

    .

    A multimedia language needs to scheduling an sync ron za on o eren mu me a elements, and define their interactivity with

    e user.

    The W3C established a Working Group in

    1997 to come up with specifications for a multimedia synchronization language

    SMIL 2 0 was accepted August 2001 2.0 in 2001. 24

    j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n

  • 7/27/2019 MAD_Unit_I

    25/107

    SMIL 2.0 is specified in XML using a

    in xhtml:1. A SMIL e ements are v e nto mo u es

    sets of elements, attributes and values that e ne one conceptua unct ona ty.

    2. In the interest of modularization, not all available modules need to be included for all applications.

    3. Language Profiles: specifies a particular rou in of modules, and articular modules

    may have integration profile must requirements that a follow. 25

    j n t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n

  • 7/27/2019 MAD_Unit_I

    26/107

    26

    t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j nt

  • 7/27/2019 MAD_Unit_I

    27/107

    Overview of Multimedia Software Tools

    . Cakewalk : now called Pro Audio.

    sequences of notes ("events", in MIDI).It is also ossible to insert WAV files and Windows MCI commands (for animation and video) into music tracks

    (MCI is a ubiquitous component of the Windows API.) Cubase: another sequencing/editing program, with

    capabilities similar to those of Cakewalk. It includes some .

    Macromedia Soundedit : mature program for creating audio for multimedia ro ects and the web that inte rates well with other Macromedia products such as Flash and Director. 27

    t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j nt

  • 7/27/2019 MAD_Unit_I

    28/107

    2. Digital Audio Cool Edit : a very powerful and popular digital

    audio toolkit; emulates a professional audio

    studio multitrack productions and sound file editing including digital signal processing effects.

    Sound Forge : a sophisticated PCbased program for WAV audio files.

    Pro Tools : a high end integrated audio

    creation and manipulation; powerful audio , , .

    28

    t u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

  • 7/27/2019 MAD_Unit_I

    29/107

    w w w . j n t u

  • 7/27/2019 MAD_Unit_I

    30/107

    4.Video Editing Adobe Premiere: an intuitive sim le video editin tool editing i e clips for nonlinear editing, i.e., putting video

    into any order:Video and audio are arranged in "tracks" tracks .Provides a large number of video and audio tracks,superimpositions and virtual clips. => effective multimedia productions with little effort.

    o e er ec s : a power u v eo e ng oo that enables users to add and change existing movies.

    , , blurring; layers.

    Macintosh only.

    30

    u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u

  • 7/27/2019 MAD_Unit_I

    31/107

    5. Animation

    Java3D: API used by Java to construct and render 3D ,

    Framework is used for handling media files.1 Provides a basic set of ob ect rimitives cube s lines

    etc.) for building scenes.

    2. It is an abstraction la er built on to of O enGL or DirectX (the user can select which).

    DirectX : Windows API that supports video, images, audio and 3D animation

    OpenGL: the highly portable most popular 3 D API

    31

    u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u

  • 7/27/2019 MAD_Unit_I

    32/107

    Rendering Tools:

    of very high end professional tools for character animation, game development, and visual effects

    production. Softimage XSI: a powerful modeling, animation, and rendering package used for animation and special

    effects in films and games. Maya : competing product to Softimage; as well, it is a complete modeling package.

    RenderMan: rendering package created by Pixar. GIF Animation Packages: a simpler approach to

    an mat on, a ows very qu c eve opment o e ect ve

    small animations for the web. 32

    u w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    w w w . j n t uw

  • 7/27/2019 MAD_Unit_I

    33/107

    6.Multimedia Authoring Macromedia Flash : allows users to create interactive

    movies using the score metaphor i.e. a timeline .

    Macromedia Director : uses a movie metaphor to create

    a built in scripting language, Lingo, that allows creation

    of complex interactive movies. Authorware: a mature, well supported authoring

    product based on the Iconic/Flow control metaphor.

    Quest : similar to Authorware in many ways, uses a type of flowcharting metaphor. However, flowchart nodes can encapsulate information in a more abstract way

    (called frames) than simply subroutine levels. 33

    w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t uw

  • 7/27/2019 MAD_Unit_I

    34/107

    Graphics and Image Data Representations

    The number of file formats used in multimedia

    cont nues to rap y.

    34

    w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t uw

  • 7/27/2019 MAD_Unit_I

    35/107

    1bit Images Pixels, or pels: picture elements Each ixel is stored as a sin le bit 0 or 1 so

    also referred to as binary image.

    monochrome image since it contains no color.

    35

    w or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w

  • 7/27/2019 MAD_Unit_I

    36/107

    8bit Gray level Images Each pixel has a gray value between 0 and 255. Each pixel is represented by a single byte; e.g., a dark

    p xe m g ave a va ue o an r g one m g e 230.

    : w y x v u represents the graphics/image data.

    digital image (higher resolution always yields better

    ualit .

    Fairly high resolution for such an image might be 1, 600 1, 200, whereas lower resolution mi ht be 640 480.

    36

    or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w

  • 7/27/2019 MAD_Unit_I

    37/107

    Frame buffer: Hardware used to store bitmap.

    this purpose.

    match the desired resolution of the image, but if

    data has to be shifted around in RAM for display.

    bitplanes, where each plane consists of a 1bit

    levels of "elevation": a bit is turned on if the image ixel has a nonzero value that is at or above that bit

    level.37

    or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w

  • 7/27/2019 MAD_Unit_I

    38/107

    38

    or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u wo

  • 7/27/2019 MAD_Unit_I

    39/107

    Each pixel is usually stored as a byte (a value etween to , so a graysca e

    image requires 300 kB of storage (640 480 = , .

    If we want to print such image, things become more complex.

    When an image is printed, the basic strategy of dithering is used, which trades intensity resolution for spatial resolution to provide

    ability to print multi level images on 2level ( 1bit) printers.

    39

    or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Dith i

    w w w . j n t u wo

  • 7/27/2019 MAD_Unit_I

    40/107

    Dithering u co or p o ograp s may con a n an a mos

    infinite range of color values. Dithering is the mos common means o re uc ng e co or range of images down to the 256 (or fewer) co ors seen n mages.

    For printing, Dithering is used to calculate larger patterns of dots such that values from 0 to 255 correspond to pleasing patterns that correctly

    represent darker and brighter pixel values.

    40

    or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u wo

  • 7/27/2019 MAD_Unit_I

    41/107

    The main strategy is to replace a pixel value by

    number of printed dots approximates the ,

    halftone sized printing (e.g., for newspaper .

    Half tone printing is an analog process that uses sma er or arger e c rc es o ac n to represent shading, for newspaper printing.

    41

    or l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or

  • 7/27/2019 MAD_Unit_I

    42/107

    42

    r l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or

  • 7/27/2019 MAD_Unit_I

    43/107

    Fig. (a) shows a grayscale image of "Lena".he ordered-dither version is shown as Fi . b

    with a detail of Lenas right eye in Fig. (c).

    43

    r l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    I D T

    w w w . j n t u w orl

  • 7/27/2019 MAD_Unit_I

    44/107

    Image Data Types The most common data types for graphics and

    image file formats 24bit color and 8bit color.

    Most ima e formats incor orate some variation of a compression technique due to

    the lar e stora e size of ima e files. Compression techniques can be classified into

    .

    44

    r l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    24 bit C l I g

    w w w . j n t u w or l

  • 7/27/2019 MAD_Unit_I

    45/107

    24 bit Color Images , three bytes, usually representing RGB.

    combined colors, or a total of 16,777,216 possible colors.

    However such flexibility does result in a storage

    penalty: A 640 480 24 bit color image would require 921.6 kB of storage without any compression.

    An important point: many 24 bit color images are

    actually stored as 32 bit images, with the extra byte of data for each pixel used to store an alpha value . .,

    transparency).45

    l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or ld

  • 7/27/2019 MAD_Unit_I

    46/107

    46

    l d . c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    8 bi C l I

    w w w . j n t u w or ld

  • 7/27/2019 MAD_Unit_I

    47/107

    8bit Color Images Many systems can make use of 8 bits of color

    information (the so called "256 colors") in producing a screen image.

    Such image files use the concept of a lookup table to store color information.

    Basicall the ima e stores not color but instead just a set of bytes, each of which is actuall an index into a table with 3b te values that specify the color for a pixel with that looku table index.

    47

    l d . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et

    A i hi i f hi

    w w w . j n t u w or l d

  • 7/27/2019 MAD_Unit_I

    48/107

    An image histogram is a type of histogram

    tonal distribution in a digital image. It plots .

    48

    d . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et w w w . j n t u w or l d

  • 7/27/2019 MAD_Unit_I

    49/107

    49

    d . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et w w w . j n t u w or l d

  • 7/27/2019 MAD_Unit_I

    50/107

    Color Look Lookup Table (LUT)Also called as Palette

    50

    d . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et w w w . j n t u w or l d

  • 7/27/2019 MAD_Unit_I

    51/107

    51

    . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et w w w . j n t u w or l d

  • 7/27/2019 MAD_Unit_I

    52/107

    52

    . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et

    How to Devise a Color Lookup Table

    w w w . j n t u w or l d c

  • 7/27/2019 MAD_Unit_I

    53/107

    How to Devise a Color Lookup Table of 24 bit color would be to divide the RGB cube into equal slices

    in each dimension. The centers of each of the resulting cubes would serve as the

    entries in the color LUT, while simply scaling the RGB ranges ..

    codes.

    Since humans

    are

    more

    sensitive

    to

    R

    and

    G

    than

    to

    B,

    we

    could shrink the R range and G range 0..255 into the 3 bit range 0..7 and shrink the B range down to the 2bit range 0..3, thus makin u a total of 8 bits.

    To shrink R and G, we could simply divide the R or G value by (256/8)=32 and then truncate. Then each pixel in the image gets rep ace y its 8 it in ex an t e co or LUT serves to generate 24 bit color.

    53

    . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et

    Median cut algorithm for Color

    w w w . j n t u w or l d .c

  • 7/27/2019 MAD_Unit_I

    54/107

    Reduction Problem A simple alternate solution that does a better job for this

    color reduction problem.a e ea s o sor e y e va ues an n e r me an;

    then values smaller than the median are labeled with a "0" bit and values lar er than the median are labeled with a "1" bit.

    b) This type of scheme will indeed concentrate bits where they most need to differentiate between high populations of close colors.

    c ne can mos eas y v sua ze n ng e me an y us ng a histogram showing counts at position 0..255.

    . forestfire.bmp image along with the median of these values, shown as a vertical line. 54

    . c o m

    w w w . n t u w or l d . c o m

    w

    w w . j w j o b s . n et w w w . j n t u w or l d .c

  • 7/27/2019 MAD_Unit_I

    55/107

    55

    c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Median Cut Algorithm

    w w w . j n t u w or l d . c

  • 7/27/2019 MAD_Unit_I

    56/107

    Median Cut Algorithm1. Find the smallest box that contains all the colors in the

    image..

    box.3. S lit the box into two re ions at the median of the sorted list.4. Repeat that the above process in steps ( 2) and ( 3) until the

    original color

    space

    has

    been

    divided

    into,

    say,

    256

    regions.5 For every box call the mean of R G and B in that box the

    representative (the center) color for the box.. ase on e uc ean s ance e ween a p xe va ue

    and the box centers, assign every pixel to one of the re resentative colors. Re lace the ixel b the code in a lookup table that indexes representative colors.

    56

    c o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Popular File Formats 3

    w

    w w . j n t u w or l d . co

  • 7/27/2019 MAD_Unit_I

    57/107

    Popular File Formats 3 GIF (Graphics Interchange Format) o n o ograp c xper s roup PNG (Portable Network Graphics) TIFF(Tagged Image File Format) xc ange mage e

    57

    o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    GIF (Graphics Interchange Format)

    w

    w w . j n t u w or l d . co

  • 7/27/2019 MAD_Unit_I

    58/107

    ( p g ) .

    Limited to 8bit ( 256) color images only, which, while ,

    images with few distinctive colors (e.g., graphics or Drawing).

    GIF standard supports interlacing successive display

    of pixels in widely spaced rows by a 4pass display process.

    GIF images are of two types

    GIF87a: The original specification . GIF89a: The later version. Supports simple animation via

    a Grap ics Contro Extension oc in t e ata, provi es simple control over delay time a transparency index etc.

    58

    o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    GIF87

    w

    w w . j n t u w or l d . co

  • 7/27/2019 MAD_Unit_I

    59/107

    GIF File Format

    59

    o m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

    w w . j n t u w or l d . c o

  • 7/27/2019 MAD_Unit_I

    60/107

    GIF

    Descriptor

    60

    m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

    w w . j n t u w or l d . c om

  • 7/27/2019 MAD_Unit_I

    61/107

    GIF Color Map61

    m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w

    w w . j n t u w or l d . c om

  • 7/27/2019 MAD_Unit_I

    62/107

    GIF Image Descriptor

    62

    m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    JPEG (Joint Photographic Expert Group)

    w w w . j n t u w or l d . c om

  • 7/27/2019 MAD_Unit_I

    63/107

    ( g p p p) The most important current standard for

    image compression.

    The human vision system has some specific limitations and JPEG takes advantage of these to achieve high rates of compression.

    The e e brain s stem cannot see extremel fine detail.

    quality, or compression ratio (input divided by .

    63

    m

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    64/107

    low qualityspecified by user.

    s an examp e, g. s ows ores re mage, w a quality factor Q=10%.

    . . comparison, a JPEG image with Q=75% yields an image

    . image compresses down to 23.0% of uncompressed image size. 64

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    PNG (Portable Network Graphics)

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    65/107

    , in important ways.

    color information. Files ma contain amma correction information for correct display images alpha channel of color images, as

    well as alpha information for such uses as control of transparency.

    The display progressively displays pixels in a 2

    dimensional fashion by showing a few pixels at a time over seven passes through each 8 8 block of an image.

    65

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    TIFF(Tagged Image File Format)

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    66/107

    TIFF is another popular image file format, developed by the Aldus Corporation in the 1980s and was later

    .

    Its support for attachment of additional information " " .

    The most important tag is a format signifier: what type

    . image.

    TIFF can store man different t es of ima e: 1bit

    grayscale , 8bit color, 24 bit RGB, etc. TIFF was ori inall a lossless format but now a new JPEG

    tag allows one to opt for JPEG compression.66

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    EXIF (Exchange Image File)

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    67/107

    1. Compressed EXIF files use the baseline JPEG format..

    to facilitate higher quality printing, since information about the camera and icture takin icture conditions (flash, exposure, light source, white balance, type of scene, etc.) can be stored and used by printers for possible color correction algorithms.

    3. The EXIF standard also includes specification of file format for audio that accompanies digital images. As well, it also supports tags for information needed for

    .

    67

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Graphics Animation Files

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    68/107

    A few format are aimed at storing graphics animation(series of drawings/graphics illustrations) as oppose o v eo ser es o mages .

    FLC is an animation or moving picture file format; it was or g na y create y n mat on ro. not er format, FLI, is similar to FLC.

    GL pro uces somew at etter qua ity moving pictures. GL animations can also usually handle arger e s zes s zes.

    Many older formats: such as DL or Amiga IFF files, pp e u c me es, as we as an ma e

    files. 68

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    PS (PostScript) & PDF (Portable Document Format)

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    69/107

    os scr p s an mpor an anguage or ypese ng, and many high end printers have a Postscript .

    PS is a vector based picture language, rather than p xe ase : page e emen e n ons are essentially in terms of vectors.

    PS includes text as well as vector/structured graphics, bit mapped images can be included in output es.

    Encapsulated PS files add some additional information for inclusion of Postscript files in

    another document. 69

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Postscript page description language itself does not rovide com ression; in fact Postscri t files are ust

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    70/107

    rovide com ression; in fact, Postscri t files are ust stored as ASCII.

    Another text + fi ures lan ua e has be un to supersede or at least parallel Postscript: Adobe Systems Inc. includes LZW compression in its Portable Document Format (PDF) file format.

    PDF files that do not include ima es have about the same compression ratio, 2:1 or 3:1, as do files compressed with other LZWbased compression

    tools. For files containing images PDF may achieve higher

    compression ratio by using JPEG compression for the

    image content. 70

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Other Formats Windows WMF : Windows MetaFile WMF is the native

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    71/107

    Windows WMF : Windows MetaFile WMF is the native vector file format fir MS Windows operating environment.

    Windows BMP : BitMa BMP is the ma or s stem standard graphics file format for MS Windows used in Paint & other programs.

    Macintosh PAINT & PICT : PAINT was originally used in the MacPaint program, initially only for 1bit monochrome images. PICT ormat is use in MacDraw a vector ase drawing program) for storing structured graphics.

    n ows or a e x ap : e grap cs orma for the X Window system. PPM supports 24 bit color

    , domain graphic editors.

    71

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Color in Image and Video

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    72/107

    Color images and videos are everywhere on the web and in multimedia production.

    Also we know that there is discrepancies between the color as seen b the eo le and displayed on the screens.

    . Color Science. . Color models in Videos.

    72

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Color Science

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    73/107

    wave. Its color is characterized by the wavelength

    .

    Laser light consists of a single wavelength: e.g., a , .

    Most light sources produce contributions over many wave engt s.

    However, humans cannot detect all light, just

    contributions that fall in the "visible wavelengths".

    Short wavelengths produce a blue sensation, long wavelengths produce a red one. 73

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Spectrophotometer: device used to measure

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    74/107

    , diffraction grating (a ruled surface) that .

    Visible light is an electromagnetic wave in the 400 nm to 700 nm.

    74

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    75/107

    75

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    76/107

    Fig shows the relative power in each wavelength interval for typical outdoor light on a sunny day.

    Distribution (SPD) or a spectrum. .

    called E().76

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et

    Human Vision

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    77/107

    ye wor s e amera. Retina consists of array of rods (for low light

    levels and three kinds of cones (for higher light levels).

    The brain makes use of differences RG, GB, and BR, as well as combining all of R, G and B into a high light level achromatic channel.

    77

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et

    Spectral Sensitivity of the Eye

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    78/107

    The eye is most sensitive to light in the middle of the visible s ectrum.

    Fig. shows the overall sensitivity as a dashed line efficiency function.

    sum of the response curves for Red, Green, and

    .

    78

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    79/107

    79

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et

    The eye has about 6 million cones, but the

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    80/107

    , They likely are present in the ratios 40:20:1 So the achromatic(without color) channel

    produced by the cones is approximately proportional to

    2R + G + B/20.

    These spectral sensitivity functions are usually denoted b letters other than "R, G, B.

    We use a vector function q( ), with components T R , G , B

    80

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et

    The response in each color channel in the eye is .

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    81/107

    A laser light at wavelength would result in a certain

    distribution) is a combination of single frequency lights (like lasers), so we add up the cone responses for all wavelengths, weighted by the eye's relative response at that wavelength.

    81

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et

    Image Formation

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    82/107

    The above equations applies only when we view a self luminous object.

    In many situations, we image light reflected from a surface.

    Surfaces reflect different amounts of light at

    different wavelen ths and dark surfaces reflect less energy than light surfaces.

    82

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    83/107

    The surface spectral reflectance from (1) orange snea ers an a e ue eans .

    The reflectance function is denoted S().83

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et

    Image formation is thus:

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    84/107

    L g t rom t e um nant w t SPD E mp nges on a surface, with surface spectral reflectance unct on S , s re ecte , an t en s tere y

    the eye's cone functions q (). Reflection is shown in Fig. below.

    The function C is called the color si nal and consists of the product of E(), the p (), illuminant, times S , the reflectance:

    84

    w w w . n t u w or l d . c o m

    w w

    w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    85/107

    85

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    86/107

    86

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    87/107

    87

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Gamma Correction

    w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    88/107

    The light emitted is in fact roughly proportional to the voltage raised to a power; this power is called gamma, .

    a) Thus, if the file value in the red channel is R, the screen , the red phosphor paint on the screen that is the target of the red channel electron gun. The value of gamma is around 2.2.

    b) It is customary to append a prime to signals that are gamma corrected by raising to the gamma power (1/ ) before transmission. Thus we arrive at linear signals:

    88

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    89/107

    89

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Fig 4 6(a) shows light output with gamma

    i li d h d k l

    w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    90/107

    correction applied. We see that darker values are displayed too dark. This is also shown in Fig. 4.7 a , which displays a linear ramp from left to

    right. Fig 4 6(b) the effect of pre correcting signals by

    applying the power law R1/ ; it is customary to normalize voltage to the range [0,1].

    90

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    91/107

    91

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Color Matching Functions v w u w g y v y u v ,

    w w

    w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    92/107

    technique evolved in psychology for matching a .

    The particular set of three basic lights used in an ex eriment are called the set of color rimaries.

    To match a given color, a subject is asked to separately ad ust the bri htness of the three rimaries usin a set of controls until the resulting spot of light most closely matches the desired color.

    The basic situation is shown in Fig.A device for carrying out such an experiment is called acolorimeter.

    92

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    93/107

    93

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Color Monitor SpecificationsC l it ifi d i t b th

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    94/107

    Color monitors are specified in part by the white point chromaticity that is desired if the RGB electron guns are all activated at their

    highest value (1.0, if we normalize to [0,1]). We want the monitor to display a specified

    white when R=G=B=1.

    There are several monitor specifications in current use Table 4.1 .

    94

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    95/107

    95

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    RGB Color Model for CRT DisplaysColor Models in Images

    1 We expect to be able to use bits per color channel for color

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    96/107

    1.We expect to be able to use bits per color channel for color that is accurate enough.

    2.However, in fact we have to use about 12 bits per channel to

    avoid an aliasing effect in dark image areas contour bands t at resu t rom gamma correct on.

    3.For images produced from computer graphics, we store

    . should have a gamma correction LUT between the frame buffer and the CRT.

    4.If gamma correction is applied to floats before quantizing to integers, before storage in the frame buffer, then in fact we can use only 8 bits per channel and still avoid contouring artifacts. 96

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Subtractive Color: CMY Color Model w v v y g, y w

    dditi l N l h t li ht b i i

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    97/107

    additive color. Namely, when two light beams impinge

    CRT screen are turned on, their colors add.

    But for ink de osited on a er the o osite situation holds: yellow ink subtracts blue from white illumination, but reflects red and green; it appears yellow.

    Instead of red, green, and blue primaries, we need primaries that amount to red, green, blue. I.e., we need to subtract R, or G, or B.

    ese su tract ve co or pr mar es are yan , Magenta (M) and Yellow (Y )inks. 97

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    98/107

    98

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Transformation from RGB to CMY

    mp es mo e we can nven o spec y w a nd i l d k i

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    99/107

    mp es mo e we can nven o spec y w a n density to lay down on paper, to make a certain es re co or.

    Then the inverse transform is:

    99

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    color combinations that result from combining ,

    additive color and subtractive color

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    100/107

    additive color and subtractive color.

    100

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Printer Gamuts , ,

    inks This leads to "crosstalk between the color

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    101/107

    inks. This leads to crosstalk between the color

    achievable in printing. g a s ows yp ca ransm ss on or rea oc

    dyes", and Fig.(b) shows the resulting color

    gamu or a co or pr n er.

    101

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    102/107

    102

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Color Models in Video

    Methods of dealing with color in digital video derive

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    103/107

    g glargely from older analog methods of coding color for TV. Luminance is separated from color information.

    For example, a matrix transform method called YIQ is used to transm t s gna s n ort mer ca an apan.

    This coding also makes its way into VHS video tape coding

    YIQ. In Europe, video tape uses the PAL or SECAM codings,

    which are based on TV that uses a matrix transform called YUV.

    D g ta v eo most y uses a matr x trans orm ca e YC Cr that is closely related to YUV. 103

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    YUV Color Model u g g

    signals) equal to Yin Eq. (4.20). the "luma".

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    104/107

    signals) equal to Y in Eq. (4.20). the luma .

    and a reference white at the same luminance use color differences U V :

    U = BY V = RY (4.27)

    = . . . . . (4.27)

    104

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    For gray, R = G = B , the luminance Y equals to that =, . . . . .

    ("black & white") image the chrominance (U, V )is zero.

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    105/107

    ( ) g ( , )

    have a more convenient maximum and minimum.

    For dealin with com osite video it turns out to be convenient to contain U, V within the range 1/3to +4/3. So U and V are rescaled:

    U =0.492111 (B Y) V =0.877283 ( R Y) ( 4.29)

    The chrominance signal = the composite signal C: C = Ucos( t)+V sin( t) (4.30)

    105

    w w w . n t u w or l d . c o m

    w w w . j w j o b s . n et

    Zero is not the minimum value for U, V.

    U s approx mate y rom ue U> 0 to ye ow (U< 0) in the RGBcube; V is approximately

    w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    106/107

    pp y y(U< 0) in the RGB cube; V is approximately rom re V> 0 to cyan V< 0 .

    Fig. shows the decomposition of a color image into its Y, U, V components. Since both U and V go negative, in fact the images displayed are shifted and rescaled.

    106

    w w w . n t u w or l d . c o m

    w w w

    . j w j o b s . n et w w w . j n t u w or l d . c o m

  • 7/27/2019 MAD_Unit_I

    107/107

    107

    w w w . n t u w or l d . c o m

    w w w

    . j w j o b s . n et