Presentation is loading. Please wait.

Presentation is loading. Please wait.

Images and Graphics.

Similar presentations


Presentation on theme: "Images and Graphics."— Presentation transcript:

1 Images and Graphics

2 Images and Graphics Graphics and images are non-textual information that can be displayed and printed. Graphics (vector graphics) are an assemblage of lines, curves or circles with attributes such as style, width and colour Individual components of graphics can be edited individually.

3 Images and Graphics Images come from the real world and its individual components are not editable. The smallest addressable image element is called a pixel. A set of pixels is called a bitmap. Images need more space than graphics. Graphics need more processing power than images.

4 Capturing Images A digital image consists of N lines with M pixels each. A picture is a 2D image capture of a real- world scene that represents a momentary event from the 3D spatial world. A capturing device such as a CCD scanner or CCD camera converts the brightness signal into an electrical signal.

5 Capturing Images

6 Capturing Images The first step is to sample and digitize the electrical signals. The second step involves quantization to achieve an aggregation of color regions to reduce the number of colors. Points at which an image is sampled are called picture elements or pixels. Resolution specifies the distance between points. It represents accuracy.

7 Capturing Images A digital image is represented by a matrix of numeric values each representing a quantized intensity value. I(r,c) - intensity value at position corresponding to row r and column c of the matrix.

8 Capturing Images Intensity value can be represented by bits for black and white images (0=black, 1=white), 8 bits for monochrome imagery to encode color or grayscale levels (256 colors from 00=black to FF=white).

9 1-bit grayscale (pure black & white)‏
Capturing Images 8-bit grayscale 4-bit grayscale 1-bit grayscale (pure black & white)‏ 24-bit color

10 Capturing Images Digital images are very large:
An image represented in a matrix of 1280x960 where each pixel is represented by a 24-bit integer allowing a total of 16,000,000 colors, would contain 1,228,800 pixels of 24 bits each for 29,491,200 bits or Mb!!

11 Image Formats Two parameters are important: spatial resolution and color encoding. An image is stored in a 2D matrix in which each value corresponds to one data pixel. Pure B&W: one bit per pixel.

12 Color Images For color images there are a few possibilities:
3 numbers to specify the intensity of red, green and blue components. 3 numbers referencing a table containing the red, green and blue intensities. A single referencing a table containing color triples. An index pointing to another set of structures holding colors.

13 Popular Formats The most popular formats for images are PostScript, GIF (Graphics Interchange Format), XBM (X11 Bitmap), JPEG, TIFF Tagged Image File Format), PBM (Portable Bitmap), PNG (Portable Network Graphics) and BMP (Bitmap).

14 PostScript PostScript is a programming language optimized for printing graphics and text. Introduced by Adobe in 1985. PostScript must know in advance the size of the image. EPS (Encapsulated PostScript), solves that problem. EPS files contain one image and comment lines.

15 GIF GIF: Graphics Interchange format.
Introduced in 1987 by CompuServe. Easy to decode and display. Images are compressed 20-25% of original size with no loss of quality: data compression only. Uses LZW compression algorithm GIF89a supports animation and transparency. Supports only 256 colors.

16 JPG The name JPEG stands for Joint Photographic Experts Group, the name of the committee that created the standard. The compression method is usually lossy compression, meaning that some visual quality is lost in the process and cannot be restored. The JPEG compression algorithm is not as well suited for line drawings and other textual or iconic graphics, and thus the PNG and GIF formats are preferred for these types of images.

17 PNG PNG: Portable Network Graphics. Introduced in 1999.
PNG supports three main image types: true colour, greyscale and palette-based (``8-bit''). JPEG only supports the first two; GIF only the third (although it can fake greyscale by using a grey palette). PNG supports variable alpha channels (transparency).

18 TIFF TIFF: Tagged Image File Format.
Introduced in 1987 by Aldus and Microsoft. TIFF supports many colour levels: binary levels, grey levels, palettes, RGB and CMYK. TIFF supports many compression methods.

19 XBM and XPM Used in the Unix world for program icons and background images. No compression is used. XBM is monochrome and stores one byte array per line. XPM is color and stores a hot spot, the image dimension and a RGB color identified by an ASCII character.

20 XBM

21 XPM

22 Comparisons GIF: 356 K PNG: 303 K JPG: 136 K

23 Comparisons GIF: 2 K PNG: 2 K JPG: 6 K

24 BMP BMP files are device-independent files most frequently used in Windows systems Based on RGB color model. Uses no compression. Header region contains info about size and color depth. Data region contains the values of each pixel in a line.

25 Graphics Formats Specifies graphics images through graphics primitives and attributes. Graphics primitives: line, rectangle, circle, ellipse, specifications of 2D and 3D objects. Graphics attributes: line style, line width, color. Graphics formats represent a higher level of image representation, they are not represented by a pixel matrix initially.

26 Graphics Formats Advantage: less storage space per graphical image
Disadvantage: more overhead during display time; must convert from a graphical image to the image format which may be a bitmap or pixmap. Examples: PHIGS (Programmer’s Hierarchical Interactive Graphics System), GKS (Graphical Kernel System).

27 Image Analysis Techniques to extract descriptions from images.
Used in the fields of astronomy, medicine, forensics and intelligence to name a few. Image improvement: A technique to improve the image quality by eliminating noise or by increasing contrast. Pattern discovery/recognition is another technique.

28 Image Analysis Image recognition methods use color, texture and edges to classify images. Color: The basic approach is to use a color histogram. The color histogram for an image is constructed by counting the number of pixels of each color. Other methods involve texture, edges classification and segmentation.

29 Color Histogram A Histogram is a graph of the distribution of red, green, blue, greyscale, hue, saturation, and/or lightness values in an image. The horizontal axis represents the lightness values of the image from black to white (0 to 255). The vertical axis indicates the number of pixels at each value.

30 Color Histogram

31 Color Histogram By examining the graph, you can learn whether the image contains enough detail to be successfully corrected, and if it does, where the image needs correcting. If the graph is spread across, the image contains enough detail to correct it successfully. If the graph is compressed into a narrow area, the image probably doesn’t contain enough detail.

32 Color Histogram In an image with enough detail, the position of the graph shows where the image needs correcting. A fairly even distribution of the graph indicates an image with a balanced composition. If too much of the graph is situated on the right side, you need to reduce the image’s lightness. If too much is on the left, you need to increase it. If the lines are not spread out enough, you need to increase the contrast.

33 Reconstructing Images
A 3D reality to be represented on a 2D screen must be projected. The Radon transform is an integral transform whose inverse is used to reconstruct images from medical CT scans. A technique for using Radon transforms to reconstruct a map of a planet's polar regions using a spacecraft in a polar orbit has also been devised.

34 Stereoscopy Two-dimensional drawings or photographs that when viewed by both eyes appear to exist in three dimensions in space. Stereoscopic pictures are produced in pairs, the members of a pair showing the same scene or object from slightly different angles that correspond to the angles of vision of the two eyes of a person looking at the object itself.

35 Stereoscopy

36 Stereoscopy

37 Raster Display Computers display images using a raster display device.
A raster is composed of horizontal raster lines that are each composed of pixels. The raster is stored in the form of a pixel matrix that represents the entire screen area. The video controller samples the entire screen line by line.

38 Raster Display

39 Raster Display Imagine the smiley face in the top left corner as an RGB bitmap image. When zoomed in, it might look like the big smiley face to the right. Every square represents a pixel. Zooming in further, one can analyze three individual pixels, with their colors constructed by adding the values for red, green and blue.

40 Dithering Full-color photographs may contain an almost infinite range of color values. Dithering is the most common means of reducing the color range of images. Dithering is the process of juxtaposing pixels of two colors to create the illusion that a third color is present.

41 Dithering

42 Dithering

43 Dithering with optimized palette
original 16 colors – not dithered 16 colors - dithered

44 End of lesson


Download ppt "Images and Graphics."

Similar presentations


Ads by Google