1 / 74

Multimedia Image

Multimedia Image. IMAGE. Images and Graphics Coding of Images Analysis of Images Colour Formats. IMAGE. Applications Image coding is first started in 1920’s to send pictures for the newspapers through submarine cables. OCR (Automatic Character Recognition),

pmoreland
Download Presentation

Multimedia Image

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multimedia Image

  2. IMAGE Images and Graphics Coding of Images Analysis of Images Colour Formats

  3. IMAGE • Applications • Image coding is first started in 1920’s to send pictures for the newspapers throughsubmarine cables. • OCR (Automatic Character Recognition), • industrial machine vision for product assembly, inspection and control. • Law enforcement – fingerprint comparison, image enhancements • Security - Authentication • Agriculture: crop assessment, etc.

  4. IMAGE • ·For human interpretation • enhancement of the picture (clearing from noise) • de-blurring algorithms • edge enhancement • For machine perception • Focus on procedures for extracting from an image information in a form suitable for computer processing (statistical moment, Fourier transform coefficients and multidimensional distance measures).

  5. IMAGE FORMATS • Captured Image Format: • N rows and M columns containing • NxM picture elements (pixels) • Ignore the semantic contents

  6. Origin y The value of f(x,y) depends on the intensity (brightness or gray-level) of the point at (x,y) . f(x,y) x Digital Image Representation A digital image: A matrix whose row and column indices identify a point (pixel) in the image and the corresponding matrix element value identifies the gray level at that point.

  7. IMAGE FORMATS • PAL frame is 768 X 576 pixels • Computer monitors 640 X480, 1024 X 768

  8. 1024 X 1024 512 X 512 256 X 256 32 X 32 128 X 128 64 X 64 Spatial Resolution: Sampling Factor

  9. 256 128 64 32 16 8 4 2 Color depth: Quantization Factor

  10. Image vs Device Resolution • An image is an array of pixel values. • A pixel has no dimensions (like dots/inch). • The size of the image depends on the resolution of the device on which it is displayed. • 45 mm sq. picture on 72 dpi display will be 28 mm sq. on 115 dpi monitor. Physical dimension = pixel dimension / device resolution • 6x4 inches photo scanned at 600 dpi  3600 x 2400 pixels • At 72 dpi monitor it will be 50 x 33.3 inches • It must be scaled down to 72/600 = 0.12 dots/inch for it to appear in its original size.

  11. Image vs Device Resolution • If an image resolution is lower than that of the device on which it is to be displayed, it must be scaled up  interpolation  loss • While down-sampling some of the pixels are discarded. • Subjective quality of a picture scanned at the display resolution is not as good as the subjective quality of the picture scanned at a higher resolution and down-sampled to the resolution of the display device. WHY? Scanners get samples at discrete intervals, while during down-sampling information available at a higher resoluiton can be used.

  12. IMAGE REPRESENTATION • Graphic Representation • Vectored graphics: Images are built up using • primitives – lines, circles, …and • Attributes – style, color, .. • can easily be described mathematically. • Resolution independent • Easy to edit • Compact : preferred for networked multimedia

  13. IMAGE REPRESENTATION Graphic Representation Pixel graphics into object graphics involves “understanding” (tough research) Object graphics into pixel graphics “rendering” (display)  Standards are not yet well established. SVG (scalable vector graphics) and SWF (shockwave flash-macromedia) standards are adopted.

  14. Bitmap (Raster) vs. Structured (Vector) Graphics Rasters: • Every pixel described at a set resolution • Standardized, fits computer HW model • Native support • Vector graphics: • Small descriptions (e.g., circle center and radius) • Looks good at different resolutions

  15. Raster vs. Vector Graphics, continued • Raster tools include: Illustrator, PhotoShop, Paint • Vector tools include: Director, Flash, Dreamweaver, Freehand, PageMaker • Photographs best expressed as rasters • Simple graphics animations well served by vector representations • Macromedia Flash is one tool for building such vector-based animations

  16. IMAGE FORMATS •  Stored Image Format • Two dimensional array. •  Each element for bitmap: a binary digit • For a color image • three numbers representing intensities of red, green, blue (RGB) or (“true color”)

  17. Stored Image Formats • 3 numbers representing the intensities of the red, green, and blue components of the color at that pixel (true color); • numbers that are indices to tables “color look-up table CLUT” • with 8 bit pointer 256 colors possible (color pallet) • CLUT-entry 3 bytes: one for each main color (256 out-of-16M) The storage space required for an image is the resolution of the image multiplied by the color depth. For example, a 640x480 resolution image in millions of colors requires 640x480x24 = 7,372,800 bits, or 900KB. Smaller space requirements can be obtained by compressing the image.

  18. 8-bit (pseudo) color image One byte for each pixel Support 256 colors A 640 X 480 8-bit color image requires 307.2 KBytes 24-bit (true) color image Three byte for each pixel Support 256X256X256 colors A 640 X 480 24-bit color image requires 921.6 KBytes Pseudo & True-Color Images

  19. IMAGE FORMATS • Some current image file formats for storing images include: • GIF – Graphical Interchange Format • TIFF – Tagged Image File Format • XBM - bitmap • JPEG – Joint Photographers Expert Group

  20. Graphics Interchange Format • Developed by CompuServe • Goal is to exchange bitmapped images platform- independently • GIF files are lossless compression techniques and are restricted to 256 colors • Main components: • Header – identification and version • Application – creator software of image • Data • Trailer – end of GIF data

  21. Graphics Interchange Format • Compression • Localizes bit patterns which occur repeatedly • LZW (Lempel-Ziv-Welch) compression, at a roughly 3:1 ratio. • Comment • Well suited for image sequences (cartoons) • (as more than one image can be part of a GIF file) • Widely supported Internet standard

  22. Tagged Image File Format (TIFF) • Developed by Aldus Co. and Microsoft • Functionality • To support platform independent image exchange • Wide distribution as well-suited for scanners and fax devices (printing industry) • Not supported by web browsers • Compression • Various/many color models (optional compression) • Binary images • Gray-scale images • RGB

  23. X11 Bitmap (XBM) and X11 Pixmap (XPM) Images • Used in Unix to store program icons or background images • Allow the definition of monochrome (XBM- bitmap) or color (XPM-pixmap) images inside a program. Monochrome XBM format • The pixels of an image are encoded and written to a list of byte values (byte array) • No compression as pixels are coded as 8-bit ASCII

  24. X11 Bitmap (XBM) and X11 Pixmap (XPM) Images • Example

  25. X11 Bitmap (XBM) and X11 Pixmap (XPM) Images • In XPM format, image data are encoded and written to a list of strings, together with a header ( image dimensions and a hot spot). • RGB color values of the image are replaced by a character form the ASCII character set.

  26. Bitmap Format • Like most common image formats, a bitmap image consists of • Header – which contains valuable information about the image, such as width, height, etc. • Body – which contains the actual (raster scanned) colors of the image pixels.

  27. Bitmap Structure BITMAPFILEHEADER Pixels BITMAPINFO RGBQUAD (Palette) BITMAPINFOHEADER

  28. BITMAPFILEHEADER The BITMAPFILEHEADER structure contains information about the type, size, and layout of a file that contains a device-independent bitmap (DIB). • bfType - Specifies the file type. It must be BM. • bfSize - Specifies the size, in bytes, of the bitmap file. • bfOffBits - Specifies the offset, in bytes, from the BITMAPFILEHEADER structure to the bitmap data. typedefstructtagBITMAPFILEHEADER { WORD bfType; DWORD bfSize; WORD bfReserved1; WORD bfReserved2; DWORD bfOffBits; } BITMAPFILEHEADER;

  29. BITMAPINFO typedef struct tagBITMAPINFO {    BITMAPINFOHEADER    bmiHeader;    RGBQUAD             bmiColors[1]; } BITMAPINFO; • A BITMAPINFO structure immediately follows the BITMAPFILEHEADER structure in the DIB file The BITMAPINFO structure combines the BITMAPINFOHEADER structure and a color table to provide a complete definition of the dimensions and colors of a DIB (Device Independent Bitmap).

  30. BITMAPINFOHEADER typedef struct tagBITMAPINFOHEADER { DWORD biSize; # of bytes required by the structure LONG biWidth; width of the bitmap in pixels LONG biHeight; hight of the bitmap in pixels WORD biPlanes; # of planes for the target device (1) WORD biBitCount; # of bits that define each pixel DWORD biCompression; DWORD biSizeImage; size in bytes LONG biXPelsPerMeter; horizontal resolution, in pixels per meter LONG biYPelsPerMeter; vertical resolution, in pixels per meter DWORD biClrUsed; # of color indicies that are actually used DWORD biClrImportant; # of color indicies that are conidered important for the display of the image } BITMAPINFOHEADER;

  31. GENERATION OF HALFTONE IMAGES Problem:Image quality using binary images (black and white) Dithering- Creating the illusion of new colors and shades by varying the pattern of dots. Based on the spatial integration property of human eye In printing, dithering is usually called halftoning, and shades of gray are called halftones. 2X2 pixel area may be used to produce 5 gray levels

  32. GENERATION OF HALFTONE IMAGES 3X3 pixel area may be used to produce 10 gray levels. n x n group of bi-level pixels produce n2 + 1 gray levels.

  33. Example

  34. Example undithered Undithered – web palette Dithered – web palette

  35. Image Analysis • Image analysis involves techniques to extract descriptions from images, which are required by methods used to analyze scenes on a higher level. • Knowing the position and value of a particular pixel does not help much in identifying an object (its form, position, orientation, ..)

  36. Image Analysis Some image processing fields include • image improvement – eliminating noise, increasing contrast • pattern discovery and recognition – OCR • scene analysis, and computer vision – industrial robots

  37. Image Properties Image Color Histograms • Given N as the number of colors, the histogram of an image f is an N-dimensional vector: {H(f, i) | i = 1, 2, … N} where H(f, i) is the number of pixels of color i in the image.

  38. Image Histograms

  39. Image Histograms Number of pixels as a function of R, G, and B To avoid working with indeterminable number of colors, we use only the n leftmost bits of each channel. With n=2, our histogram will have entries for 64 colors.

  40. Image Histograms • For indexing using histograms, images must be scaled to the same number of pixels. • For humans to recognize the colorfulness of an image, it is relevant whether or not a color tends to occur on large surfaces (in coherent environment) • For this reason a color coherency vector (CCV) is needed in addition to frequency of pixels. • To calculate CCV, each pixel is checked as to whether it is within a sufficiently large one-color environment, if so it is called coherent, otherwise incoherent. • Two separate histograms show the coherent and incoherent frequencies for each color.

  41. Image Histograms • Assume we determine J colors after discretization, then • j orj (j = 1, 2, …, J) describe the number of coherent or incoherent pixels of the color j. • The CCV is given by ( (1 ,1 ), … , (J ,J ) ) and it describes the colorfulness of an image • We compare two picture B and B’ with respect to their colorfulness as:

  42. Texture • A texture is a small surface structure, either natural or artificial, regular or irregular. • Repetition of fundamental patterns • Has a great deal to do with color, brightness variations and reflectivity properties of adjacent regions

  43. Texture • Texture is an important source of information • Together with color provides powerful discriminating features • To analyze texture, color images are first converted into a gray-level representation. • Presence of a texture within an image can be detected by finding significant and regular variations of gray values in a small environment. • Gray-level co-occurrence matrix can be analyzed to derive some conclusions.

  44. Texture • Example: • We calculate and interpret gray-level co-occurrence matrices. • Suppose we have 4 gray levels (0 – 3) • P (positioning operator): gray level b is immediately to the right of gray level a Gray level picture Co-occurrence matrix - C C matrix depends on P operator. Presence of a texture may be detected by choosing an appropriate P vector.

  45. Texture If we distinguish N gray values and call the entries in an NxN C matrix g(a,b) Contrast There is contrast when there are very different gray values in a dense neighborhood. • If the gray values are different (a-b)2 , • If they boarder each other frequently g(a, b) will be large.

  46. Texture Homogeneity In a homogeneous and perfectly regular texture, there are only very few different gray level co-occurrence arrangements, but they occur frequently

  47. Image Manipulations • Correct deficiencies in an image (removal of red-eye) • Create images that are difficult or impossible to make naturally (creating effects). • Filters • Masks

  48. Image Manipulations • Masking • Masking is like applying stencils. • Paint or light is prohibited • Transparency levels can be defined in a channels P = ap1 + (1 – a)p2 0 =< a =< 1 When a picture is pasted on top of another, bottom picture can be seen depending on a value.

  49. Image Manipulations Taking Negative • F(p) = W – p Colour correction • Brightness: adjust the value of each pixel up or down uniformly (each pixel appears either lighter or darker) • Contrast : adjust the range of values either enhancing or reducing the difference between the lightest and darkest areas.

More Related