We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34
Chapter Three
Graphic/Image Data Representation
Image representation • An image could be described as two-dimensional array of points where every point is allocated its own color. • Every such single point is called pixel, short form of picture element. • Image is a collection of these points that are colored in such a way that they produce meaningful information/data. • Pixel (picture element) contains the color or hue and relative brightness of that point in the image. • The number of pixels in the image determines the resolution of the image. • Image resolution is the number of pixels in a digital image What pixels contain
a series of numbers or digits, hence the term
'digital'. Digital Representation of Media
There are established ways of representing images, video,
animation, sound and text in bits. Media data may be represented as a textual description in a suitable language, or as binary data with specific structural form. Images come in many different format : - Photographs - Paintings - Drawings - Symbols - Corporate Logos - Flags - Maps - Diagrams - Graphs Images can be used to : - Provide facts. - Explain a process. - Pinpoint locations. - Tell stories. - Compare. - Identify. 4 Pixels • A digital image consists of many picture elements, called pixels. • The number of pixels determines the quality of the imageimage resolution. • Higher resolution always yields better quality. Types of images • There are two basic forms of computer graphics: bit-maps and vector graphics. • The kind you use determines the tools you choose. • Bitmap formats are the one used for digital photographs. • Vector formats are used only for line drawings. 1. Bit-map images (also called Raster Graphics)
• They are formed from pixels-a matrix of dots with
different colors. • Bitmap images are defined by their dimension in pixels as well as by the number of colors they represent. • For example, a 640X480 image contains 640 pixels and 480 pixels in horizontal and vertical direction respectively. • If you enlarge a small area of a bit-mapped image, you can clearly see the pixels that are used to create it Bit-map images • Each of the small pixels can be a shade of gray or a color. Using 24-bit color, each pixel can be set to any one of 16 million colors. • All digital photographs and paintings are bitmapped, and any other kind of image can be saved or exported into a bitmap format. • printed or displayed at a size determined by the number of pixels in the image. • Bitmap images also have large file sizes that are determined by the image’s dimensions in pixels and its color depth. • To reduce this problem, some graphic formats such as GIF and JPEG are used to store images in compressed format. 2. Vector graphics • They are really just a list of graphical objects such as lines, rectangles, ellipses, arcs, or Curves- called primitives. • Draw programs, also called vector graphics programs, are used to create and edit these vector graphics. • These programs store the primitives as a set of numerical coordinates and mathematical formulas that specify their shape and position in the image. Monochrome/Bit-Map Images • Each pixel is stored as a single bit (0 or 1) • The value of the bit indicates whether it is light or dark • A 640 x 480 monochrome image requires 37.5 KB of storage. • Dithering is often used for displaying monochrome images Dithering is the attempt by a computer program to approximate a color from a mixture of other colors when the required color is not available. Gray-scale Images • Each pixel is usually stored as a byte (value between 0 to 255) • This value indicates the degree of brightness of that point. This brightness goes from black to white • If these states are mapped onto a ramp of greys from black to white the bitmap is referred to as a greyscale image. • A 640 x 480 grayscale image requires over 300 KB of storage 8-bit Color Images • One byte for each pixel • Supports 256 out of the millions possible, acceptable color quality • Requires Color Look-Up Tables (LUTs) • A 640 x 480 8-bit color image requires 307.2 KB of storage (the same as 8-bit grey scale) • Examples: GIF lookup table (LUT) • 8-bit color image (so-called 256 colors. Why?) files use the concept of a lookup table (LUT) to store color information. • For example,: – if exactly 23 pixels have RGB values (45, 200, 91) – then store the value 23 in a three-dimensional array, at the element indexed by the index values [45, 200, 91]. • This data structure is called a color histogram. • color histogram: is a very useful tool for image transformation and manipulation in Image Processing. • The LUT is often called a palette. • The idea is to store only the index, or code value, for each pixel. • if a pixel stores, say, the value 25, the meaning is to go to row 25 in a color lookup table (LUT). • a lookup table is used to store color information. lookup table (LUT) The idea used in 8-bit color images is to store only the index, or code value, for each pixel.
• A Color-picker consists of an array of fairly large blocks of color
such that a mouse-click will select the color indicated. • In reality, a color-picker displays the palette colors associated with index values from 0 to 255. 24-bit Color Images
• Each pixel is represented by three bytes (e.g., RGB)
• Supports 256 x 256 x 256 possible combined colors (16,777,216) • A 640 x 480 24-bit color image would require 921.6 KB of storage • Most 24-bit images are 32-bit images, • The extra byte of data for each pixel is used to store an alpha value representing special effect information Image Resolution • Image resolution refers to the spacing of pixels in an image and is measured in pixels per inch, ppi, sometimes called dots per inch, dpi. • The higher the resolution, the more pixels in the image is. A printed image that has a low resolution may look pixilated or made up of small squares, with jagged edges and without smoothness. • Image size refers to the physical dimensions of an image. • Because the number of pixels in an image is fixed, increasing the size of an image decreases its resolution and decreasing its size increases its resolution. Popular File Formats
To choose file type:
• resulting size of the imagelarge file size or small • quality of image possible by the file type • portability of file across different platforms • The most common formats used on internet are the GIF, JPG, and PNG. Standard System Independent Formats GIF
• Graphics Interchange Format (GIF) devised CompuServe,
initially for transmitting Graphical images over phone lines via modems. • Uses the Lempel-Ziv Welch algorithm (a form of Huffman Coding), modified slightly for image scan line packets (line grouping of pixels). • Limited to only 8-bit (256) color images, suitable for images with few distinctive colors (e.g., graphics drawing) • Supports animation-multiple pictures per file (animated GIF) • Supports one-dimensional interlacing (downloading gradually in web browsers). Interlaced images appear gradually while they are downloading. PNG • stands for Portable Network Graphics • It is intended as a replacement for GIF in the WWW and image editing tools. • One version of PNG, PNG-8, is similar to the GIF format. It can be saved with a maximum of 256 colours and supports 1-bit transparency • Provides transparency using alpha value • Supports interlacing JPEG/JPG • created by the Joint Photographic Experts Group • A standard for photographic image compression • Uses complex lossy compression which allows user to set the desired level of quality (compression). • Though JPGs can be interlaced, they do not support animation and transparency unlike GIF TIFF
• Tagged Image File Format (TIFF), stores many
different types of images (e.g., monochrome, grayscale, 8-bit & 24-bit RGB, etc.) • TIFF is a lossless format (when not utilizing the new JPEG tag which allows for JPEG compression) • Does not use TIFF for web images? They produce big files, and more importantly, most web browsers will not display TIFFs. System Dependent Formats
Microsoft Windows: BMP
• A system standard graphics file format for Microsoft Windows • Used in Many PC Graphics programs • It is capable of storing 24-bit bitmap images Macintosh: PAINT and PICT • PAINT was originally used in MacPaint program, initially only for 1-bit monochrome images. • PICT is a file format that was developed by Apple Computer in 1984 as the native format for Macintosh graphics. • The PICT format is a meta-format that can be used for both bitmap images and vector images though it was originally used in MacDraw (a vector based drawing program) for storing structured graphics • Still an underlying Mac format (although PDF on OS X) X-windows: XBM
• Primary graphics format for the X Window system
• Supports 24-bit colour bitmap • Many public domain graphic editors, e.g., xv • Used in X Windows for storing icons, pixmaps, backdrops, etc. What is Sound? • Sound is a form of energy, just like electricity and light. Sound is made when air molecules vibrate and move in a pattern called waves, or sound waves. • Sound is produced by a rapid variation in the average density or pressure of air molecules above and below the current atmospheric pressure. We perceive sound as these pressure fluctuations cause our eardrums to vibrate. Discrete Audio File Formats
WAV (windows audio video)
The WAV format is the standard audio file format for Microsoft Windows applications AIF/AIFF The Audio Interchange File Format (AIFF) is the standard audio format employed by computers using the Apple Macintosh operating system. AU • The AU file format is a compressed audio file format developed by Sun Microsystems and popular in the Unix world. MP3 • MP3 stands for Motion Picture Experts Group, Audio Layer 3 Audio File • MIDI/MID • MIDI (Musical Instrument Digital Interface), a set of instructions used to play electronic music on devices such as synthesizers Streaming Audio File Formats • Streaming is a network technique for transferring data from a server to client in a format that can be continuously read and processed by the client computer. • Using this method, the client computer can start playing the initial elements of large time-based audio or video files before the entire file is downloaded. Streaming Audio File Formats There are three primary streaming formats that support audio files: • RealNetwork's RealAudio (RA, RM) • Microsoft’s Advanced Streaming Format (ASF) and its audio subset called Windows Media Audio 7 (WMA) and • Apple’s QuickTime 4.0+ (MOV). MIDI: • MIDI is a protocol that enables computer, synthesizers, keyboards, and other musical device to communicate with each other. • This protocol is a language that allows interworking between instruments from different manufacturers by providing a link that is capable of transmitting and receiving digital data. • MIDI transmits only commands, it does not transmit an audio signal. Components of a MIDI System Synthesizer: • It is a sound generator (various pitch, loudness, tone color). • A good (musician’s) synthesizer often has a microprocessor, keyboard, control panels, memory, etc. Sequencer: • It can be a stand-alone unit or a software program for a personal computer. (It used to be a storage server for MIDI data. Nowadays it is more a software music editor on the computer.) • It has one or more MIDI INs and MIDI OUTs. Basic MIDI Concepts Track: • Track in sequencer is used to organize the recordings. • Tracks can be turned on or off on recording or playing back. Channel: • MIDI channels are used to separate information in a MIDI system. • There are 16 MIDI channels in one cable. • Channel numbers are coded into each MIDI message. Timbre: • The quality of the sound, e.g., flute sound, cello sound, etc. • Multitimbral - capable of playing many different sounds at the same time (e.g., piano, brass, drums, etc.) • Tone quality Basic MIDI Concepts Pitch: • The Musical note that the instrument plays Voice: • Voice is the portion of the synthesizer that produces sound. • Synthesizers can have many (12, 20, 24, 36, etc.) voices. • Each voice works independently and simultaneously to produce sounds of Different timbre and pitch. Patch: • The control settings that define a particular timbre. Monochrome • Each pixel is stored as a single bit (0 or 1) • A 640 x 480 monochrome image requires 37.5 KB of storage. • A monochrome image is an image consisting of a single color against a neutral background. • All black and white images are monochrome images. • Monochrome monitors actually use two colors, one for the display image (the foreground) and one for the background. • The term 'monochrome' refers to a photo having one colour ('mono' meaning one and 'chrome' meaning colour). It is frequently used to describe a black and white photo.