Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. Digital Representation of Media There are established ways of representing images, video, animation, sound and text in bits. Media data may be represented.

Similar presentations


Presentation on theme: "1. Digital Representation of Media There are established ways of representing images, video, animation, sound and text in bits. Media data may be represented."— Presentation transcript:

1 1

2 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. 2

3 Computer Graphics Vector Graphics Bitmap Images Combining vectors and bitmaps 3

4 Pixel Images Images are displayed as arrays of pixels and represented using an internal model. The process of generating a pattern of pixels from the model is called rendering. Images may be modeled as bitmaps graphics or vector graphics. 4 Also known as pel is the smallest unit that can be drawn

5 Image Representation Bitmap techniques or Bitmap Graphics – Pixel-by-pixel representation of the color – Wide range of colors and shades in complex images. Vector techniques or Vector Graphics - Comprise mathematical representations : Stored as a mathematical description of a collection of individual lines, curves and shapes making up the image – e.g. line = two end points - Displaying a vector image – requires some computation to be performed in order to interpret the model and generate an array of pixel to be displayed – The process of interpreting the vector description known as rasterizing – Scalable – Small file size 5

6 1- Vector Graphics 6 Main characteristics of Vector graphics: – Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and charts) – Compact – Scalable – Resolution independent – Easy to edit – Vectors are also well suited to use in animation – No background – Cartoon-like – Inappropriate for photo-realistic images Common formats for representing vector graphics include PDF, SVG, and SWF.

7 Vector Graphics 7 Points can be identified by coordinates Lines and shapes can be described by equations Approximating abstract shapes on a grid of finite pixels leads to `jaggies‘ Anti-aliasing can offset this effect Bezier curves are drawn using four control points Bezier curves can be made to join together smoothly into paths Paths and shapes can be stroked and filled

8 Vector Graphics 8 Geometrical transformations translation, scaling, rotation, reflection and shearing - can be applied easily to vector shapes Three approaches to 3-D modeling constructive solid geometry free-form modeling procedural modeling 3-D rendering models the effect of light and texture, as well as displaying the modeled objects in space Ray tracing and radiosity are computationally expensive rendering algorithms that can produce photo-realistic results

9 Vector Graphics Tools 9 Adobe Illustrator CorelDraw Macromedia FreeHand XARA X Most can export your work to bitmap images

10 Metafile Format Used for vector graphics Can embed bitmap images Collection of Graphics Device Interface (GDI) functions “Rasterization” process Default extension.WMF Less space Structure header size of the file # of drawing objects list of records 10

11 Other Common Vector File Formats CGM : Computer Graphics Meta File DRW : Micrographics Designer file format CDR : Corel DRAW native format HPGL : HP plotter print format DXF : - Drawing Exchange Files - Created by Autodesk for AutoCAD EPS : - Encapsulated PostScript Files - Developed by Adobe Systems for compatibility with PostScript lang - Device independent - May contain a TIFF or WMF image for screen presentation 11

12 3-D Graphics 2D: define shapes by paths 3D: define objects by surfaces Hierarchical modeling A bicycle consists of a frame, two wheels, … 12

13 2- Bitmapped Images Conceptually, bitmapped images are much simpler than vector graphics because there is no need for any mathematical modeling of shapes Images are not restricted to those that can be constructed from a small repertoire of drawing primitives, so a much broader range of visual possibilities is available. Above all, bitmapped representations can be used to record photographs. It is rarely necessary to compute and assign the color value for each pixel explicitly. Many images are created from external sources, such as digital cameras or scanners, which use hardware to sense colors and create the array of values. 13

14 3- Resolution Resolution – Image resolution is the number of pixels in a digital image. – Device resolution is also a measure of how finely a device approximates continuous images using finite pixels – Higher resolution always yields better quality. – Different monitors can have different resolutions The concept of resolution is simple, but it differ according to where it is used. 14

15 3-1 : Image Resolution Bitmapped images is an array of pixel values, so it has pixel dimensions (width & height). Unlike a printed photograph or original artwork on paper, a bitmapped image has no physical dimensions The physical size of an image when it is displayed will depend on the pixel density (dpi or ppi) of the device is to be displayed on. The equation to find the physical dimension of an image is: 15

16 Example For an image that has a logical pixel dimensions of 198 pixel wide and 149 high and to be displayed on a screen with resolution of 72 dpi, What will be the image size on the screen? 16

17 3-2 : Which type of image to use? You have to take in your consideration the following factors to decide which type to use: – Memory requirements – Visual characteristics – Possibilities for transformation & effects – The most important factor is the source of the image Photographs from digital camera, screen shots, scanned images and captured video frames are all inherently bitmaps- because of the way the hardware from which they originate works. Charts, diagrams and other data visualizations generated by a program from data usually, but not invariably, use vector graphics 17

18 4- Graphics/Image Data Types File importFile exportNative ImagePaletteSoundVideoAnimationImageVideo.BMP,.DIB.GIF,.JPG,.PICT,.PNG.PNT,.PSD.TGA,.TIFF.WMF.PAL,.ACT.AIFF,.AU,.MP3,.WAV.AVI,.MOV.DIR,.FLA.FLC,.FLI.GIF,.PPT.BMP.AVI,.MOV.DIR,.DXR,.EXE 18 Table 1 : Macromedia Director file formats

19 5- Multimedia Presentation Bitmap: The two-dimensional array of pixel values that represents the graphics/image data. Image resolution refers to the number of pixels in a digital image (higher resolution always yields better quality). – Fairly high resolution for such an image might be 1,600 x 1,200, whereas lower resolution might be 640 x 480. Frame buffer: Hardware used to store bitmap. – Video card (actually a graphics card) is used for this purpose. – The resolution of the video card does not have to match the desired resolution of the image, but if not enough video card memory is available then the data has to be shifted around in RAM for display. 19

20 Image file size = M x N x B where: M = width N = height B = number of bits per pixel (bit depth) Note: Image file size is normally expressed in bytes or kbytes not bits. 20

21 5-1 : Bit depth Bit depth quantifies how many unique colors are available in an image's color palette in terms of the number of 0's and 1's, or "bits," which are used to specify each color. This does not mean that the image necessarily uses all of these colors, but that it can instead specify colors with that level of precision. 21

22 5-2 :bit Images Each pixel is stored as a single bit (0 or 1), so also referred to as binary image. Such an image is also called a 1-bit monochrome image since it contains no color. Fig. 1 shows a 1-bit monochrome image (called “Lena” by multimedia scientists — this is a standard image used to illustrate many algorithms). 22 Fig. 1: Monochrome 1-bit Lena image.

23 5-2-1 : 1-Bit Images Calculation What is the image file storage size for a 640 x 480 monochrome image? Solution: image size = width(M) × height(N) × bit depth(B) image size = 640 × 480 × 1 8 = 38 400 bytes 1024 = 37.5 kB 23 Divide by 8 because there are 8 bits in a byte Divide by 1024 because there are 1024 bytes in 1KB

24 a - 8-Bit Gray-Level Images Each pixel takes 1 byte (8 bits) of storage resulting in 256 different states. Each pixel has a gray-value between 0 and 255. If these states are mapped onto a ramp of greys from black to white the bitmap is referred to as a greyscale image. By convention 0 is normally black and 255 white. The grey levels are the numbers in between, for example, in a linear scale 127 would be a 50% grey level. 24

25 Fig. 2 shows the Lena image again, but this time in grayscale. What is the image file storage size for a 640 x 480 8-bit grayscale image? Solution: image size = width(M) × height(N) × bit depth(B) image size = 640 × 480 × 1 = 307 200 bytes 1024 = 300 kB 25 Fig.2 : Grayscale image of Lena

26 Comparison 26 Grayscale image of Lena. Monochrome 1-bit Lena image. 307 200 Bytes38 400 Bytes

27 Color Image Data Types The most common data types for graphics and image file formats - 24-bit color and 8-bit color. Some formats are restricted to particular hardware/operating system platforms, while others are “cross-platform” formats. Even if some formats are not cross-platform, there are conversion applications that will recognize and translate formats from one system to another. Most image formats incorporate some variation of a compression technique due to the large storage size of image files. Compression techniques can be classified into either lossless or lossy. 27

28 Compression Compression: Any operation that can be performed on data to reduce the amount of storage required to store (represent) it. Decompression: The inverse of compression operation where data will be restored to a form in which it can be displayed or used. Codec (compressor/decompressor): The software that performs compression and decompression especially for video and audio data. 28

29 Classes of Compression Algorithm Lossless Compression: The property that it is always possible to decompress data that has been compressed and retrieve an exact copy of the original data Lossy Compression: The property that some data has been discarded in the compression process and cannot be restored, so that the decompressed data is only an approximation to the original. 29

30 b- 24-Bit Color Images In a color 24-bit image, each pixel is represented by three bytes, usually representing RGB. – This format supports 256 x 256 x 256 possible combined colors, or a total of 16,777,216 possible colors. – However such flexibility does result in a storage penalty: A 640 x 480 24-bit color image would require 900 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 representing special effect information (e.g., transparency). The figure on the next slide shows the image forestfire.bmp, a 24-bit image in Microsoft Windows BMP format. Also shown are the grayscale images for just the Red, Green, and Blue channels, for this image. 30

31 31 24 bit image “forestfire.bmp”From R channel From G channelFrom B channel

32 24-bit Color Images Calculation What is the image file storage size for a 640 x 480 24-bit color image? Solution: image size = width(M) × height(N) × bit depth(B) image size = 640 × 480 × 3 = 921 600bytes 1024 = 900 kB 32 there are 3 bytes in 24-bit


Download ppt "1. Digital Representation of Media There are established ways of representing images, video, animation, sound and text in bits. Media data may be represented."

Similar presentations


Ads by Google