Presentation is loading. Please wait.

Presentation is loading. Please wait.

IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.

Similar presentations


Presentation on theme: "IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter."— Presentation transcript:

1 IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter 2013

2 Revision How much disk space would be occupied by a 100-minute feature film if it was stored as uncompressed video in PAL format and to be displayed at a frame rate of 30 frames/sec? State any assumptions you make in your calculations. Hint: a single frame in PAL format is 720X576 By Mahmood A.Moneim2

3 Digital Still Images As mentioned in the last lecture, digital still images can be modeled in two different ways: Vector Graphics Bitmapped Images By Mahmood A.Moneim3

4 I. Vector Graphics Vector graphics technique is used by PDF, SVG and SWF (Flash Movie) formats In vector graphics, images are built up using shapes that can be described mathematically Each pixel in a rectangular array can be identified by its pixel coordinates (row and column numbers) Origin By Mahmood A.Moneim4

5 Vectors The displacement between two points is a vector whose components are obtained by subtracting the x and y coordinates of the two points The term vector graphics was originally used to refer to the production of images on output devices using an electron beam that traces vectors on the screen Lines and curves can be represented by equations relating the y and x coordinates of each point on the line or curve Example: Equation of straight line is y = mx + c where m is the slope and c is the intercept By Mahmood A.Moneim5

6 Vectors By Mahmood A.Moneim6

7 Vectors A problem arises when the computed coordinates of a straight line do not lie on the image grid (not integers) In this example, the end-points are (0, 31) and (12, 1) The equation can be found to be: y = 31 – 5x/2 By substituting with values for x from 0 to 12, we will get real numbers, which must be rounded down to lie on the discrete image grid To get a continuous line, we set blocks between 2 and 3 pixels to desired color so that the straight line is approximated By Mahmood A.Moneim7

8 Anti-aliasing Rendered lines will exhibit “the jaggies”, a form of aliasing caused by the inevitable under sampling when rendering on a device with finite resolution The effect can be resolved by anti-aliasing: coloring pixels in shades of grey (for a black line) whose brightness varies according to the extent of their intersection with an idealized one-pixel-wide line Jagged Line Line Bounding Box Anti-aliased By Mahmood A.Moneim8

9 Anti-aliasing Another Example: By Mahmood A.Moneim9

10 Vector Objects Drawing programs and vector graphics languages provide a basic repertoire of shapes that can easily be represented mathematically The common shapes are rectangles and squares, ellipses and circles, straight lines and Bézier curves By Mahmood A.Moneim10

11 Vector Objects Bézier curves are smooth curves that can be specified by an ordered set of control points; the first and last control points are the curve’s end points A cubic Bézier curve has four control points: two end points and two direction points The sweep of a Bézier curve is determined by the length and direction of the direction lines between the end and direction points By Mahmood A.Moneim11

12 Vector Objects Cubic Bézier curves are drawn by dragging direction lines with a pen tool The order of the four points of a cubic Bézier curve determines the shape By Mahmood A.Moneim12

13 Vector Objects Quadratic Bézier curves only have a single direction point. They are the only Bézier curves supported by SWF. PDF and SVG provide both cubic and quadratic Bézier curves Bézier curve segments can be combined to make smooth paths. A closed path joins up on itself, an open path does not By Mahmood A.Moneim13

14 Transformations Vector objects can be altered by changing the stored values used to represent them Affine transformations preserve straight lines and keep parallel lines parallel Translation, scaling, rotation, reflection and shearing are affine transformations, which can be performed by direct manipulation in vector drawing programs By Mahmood A.Moneim14

15 By Mahmood A.Moneim15

16 II. Bitmapped Images Resolution is a measure of how finely a device approximates continuous images using finite pixels. There are two types of resolution: Device Resolution and Image Resolution 1. Device Resolution: For a camera or a scanner, it’s how far apart two lines on a target grid have to be for the device to see them as two lines The resolution of scanners and printers is usually measured in terms of their pixel density measured in dots per inch (dpi) By Mahmood A.Moneim16

17 Bitmapped Images Resolution The resolution of video frames and computer monitors is usually measured in terms of their pixel dimensions (width × height) Example: NTSC video frame is 640×480 A typical computer monitor can be 1024×768 The resolution of a digital still camera is often quoted as the total number of pixels in the largest image it can record (Megapixels) Example: A 5 Megapixel camera can produce images with dimensions of 2584 x 1936 if the aspect ratio is set to (4:3) or 2736 x 1936 is the aspect ratio is set to (3:2) 3:2 4:3 By Mahmood A.Moneim17

18 Bitmapped Images Resolution 2. Image Resolution: – The pixel density of monitors and still cameras is assumed to be 72 dpi (“screen resolution”) – A bitmapped image has pixel dimensions but no intrinsic pixel density – The physical size of an image when it is displayed will depend on them pixel density of the device it is to be displayed on (A 198 x 149 pixels image) 1 inch= 2.54cm By Mahmood A.Moneim18

19 Bitmapped Images Resolution general: Most image formats record a resolution (pixel density) together with the image data; this is usually the resolution of the device on which it originated By Mahmood A.Moneim19

20 Resampling Reducing the pixel dimensions is called “downsampling”; increasing them is called “upsampling”. Both can lead to a loss of quality Scaling can be done either by applying a transformation to each original pixel or by applying the inverse transformation to each pixel in the scaled image By Mahmood A.Moneim20

21 Resampling Using reverse mapping, we can set the pixel at coordinate (x’, y’) in the enlarged image to the value at (x, y) = (x’/s, y’/s) In general, (x’/s, y’/s) will not be integers Interpolation is needed because of the finite size of pixels - Nearest-neighbor Interpolation: If X indicates (x, y), assign the color of the closest pixel (in this case P3) to the location (x’, y’) By Mahmood A.Moneim21

22 Resampling Interpolation is needed because of the finite size of pixels - Bilinear Interpolation: If X indicates (x, y), the color assigned to (x’, y’) is the summation of the colors of P1, P2, P3 and P4, each weighted with the area of their intersection with the square around X By Mahmood A.Moneim22

23 Resampling Nearest-neighbor vs. Bilinear Interpolation Nearest-neighbor Bilinear Interpolation By Mahmood A.Moneim23

24 Example You are given an 8 bit grayscale image which appears to be 4 inches wide and 6 inches high on your 72dpi monitor. a) Calculate the number of pixels in this image. b) Calculate the raw file size for this image and convert it to Kb. c) How big will it be if you print it out on a 1000 dpi printer? By Mahmood A.Moneim24

25 Example Consider the 3 x 3 image given below. Show the result of zooming in the image to double its size if nearest-neighbor interpolation is used By Mahmood A.Moneim25 1030113 1277090 10014120

26 Q UESTIONS ? By Mahmood A.Moneim26


Download ppt "IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter."

Similar presentations


Ads by Google