+ All Categories
Home > Documents > Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin -...

Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin -...

Date post: 20-Sep-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
44
4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University Images and Graphics
Transcript
Page 1: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Images and Graphics

Page 2: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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.

Page 3: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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.

Page 4: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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.

Page 5: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Capturing Images

Page 6: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Capturing ImagesThe 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.

Page 7: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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.

Page 8: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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

Page 9: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Capturing Images

8-bit grayscale 4-bit grayscale

1-bit grayscale(pure black & white) 24-bit color

Page 10: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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 28.125 Mb!!

Page 11: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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.

Page 12: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Color ImagesFor 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.

Page 13: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Popular FormatsThe 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).

Page 14: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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

Page 15: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

GIFGIF: 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 algorithmGIF89a supports animation and transparency.Supports only 256 colors.

Page 16: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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

Page 17: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

PNGPNG: 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).

Page 18: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

TIFFTIFF: 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.

Page 19: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

XBM and XPMUsed 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.

Page 20: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

XBM

Page 21: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

XPM

Page 22: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Comparisons

GIF: 356 KPNG: 303 KJPG: 136 K

Page 23: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Comparisons

GIF: 2 KPNG: 2 KJPG: 6 K

Page 24: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

BMPBMP files are device-independent files most frequently used in Windows systemsBased 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.

Page 25: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Graphics FormatsSpecifies 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.

Page 26: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Graphics FormatsAdvantage: less storage space per graphical imageDisadvantage: 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).

Page 27: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Image AnalysisTechniques 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.

Page 28: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Image AnalysisImage 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.

Page 29: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Color HistogramA 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.

Page 30: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Color Histogram

Page 31: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Color HistogramBy 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.

Page 32: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Color HistogramIn 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.

Page 33: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Reconstructing ImagesA 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.

Page 34: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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

Page 35: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Stereoscopy

Page 36: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Stereoscopy

Page 37: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Raster DisplayComputers 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.

Page 38: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Raster Display

Page 39: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Raster DisplayImagine 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.

Page 40: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

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

Page 41: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Dithering

Page 42: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Dithering

Page 43: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

Dithering with optimized palette

original

16 colors – not dithered

16 colors - dithered

Page 44: Images and Graphics - Ryerson University4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University JPG The name JPEG stands for Joint Photographic Experts Group, the

4. Images and Graphics - Copyright © Denis Hamelin - Ryerson University

End of lesson


Recommended