Formats And Transforms

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Formats And Transforms as PDF for free.

More details

  • Words: 3,047
  • Pages: 39
Introduction List of file formats Transforms

SPEECH AND IMAGE PROCESSING LAB Image file formats Blessin Joseph & Pilmy Peter M.Tech Signal Processing

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

INTRODUCTION

Image file format Provide a standardized method of organizing and storing image data. eg: JPEG, TIFF, PNG, GIF

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

List of File Formats List of File Formats 1 2 3 4 5 6 7 8

BMP GIF PNG JPEG TIFF PCX XBM PPM

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

BMP File Format Short for bitmapped graphics format. Simple graphics file format. Usually not compressed. Unsuitable for transferring images on the Internet or other slow or capacity-limited media. Features File extension : .bmp or .dib Type : image Type code : ’BMP ’ Developed by : Microsoft

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

BMP File Format contd...

File Structure contains blocks of data. 1 Bitmap Header : General information about the file. 2 Bitmap Information : Detailed information about the image. 3 Color Palette : Details of colors used for indexed color bitmaps. 4 Bitmap Data : Actual image in pixel by pixel.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

BMP File Format contd... Bitmap header structure

Bitmap information structure application detailed information to display the image on the screen. Matches the header used internally (Windows and OS/2) & has different variants.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

BMP File Format contd... Color palette Each pixel stored using one or more bytes. Tells the application the actual color that each pixel corresponds to. Uses RGB color model. Number of entries - number of colors used in the picture (4 bytes Windows & 3 bytes - OS/2). Color palette is not used when the bitmap is 16-bit or higher. Bitmap data Bottom left corner - left to right - row by row (bottom to top). In a horizontal line, number of bytes not divisible by 4, then pad with null-bytes.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

GIF File Format Short for Graphics Interchange Format. Lossless data compression. Palette up to 256 distinct colors from the 24-bit RGB color space. Supports animations. Features File extension : .gif Type : bitmap image format Type code : GIF Magic : GIF87a/GIF89a Developed by : CompuServe, 1987 Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

GIF File Format contd...

Two versions: 87a & 89a(“GIF87a” and “GIF89a”). Distinguished by the first six bytes of the file. “GIF89a” : Support multiple images in a stream. Suitable for sharp-edged line art (logos).

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PNG File Format Short for Portable Network Graphics. Lossless data compression. Created to improve upon and replace the GIF format. Supports palette-based (24-bit RGB) or greyscale or RGB images. Designed for transferring images on the internet, not professional graphics. Features File extension : .png Type : lossless bitmap image format Type code : PNGf Developed by : PNG Development Group, October 14, 1996 Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PNG File Format contd... PNG header structure

Chunks Compatibility with older versions. Chunk have header specifying their size and type. Immediately followed by the actual data & checksum of data. 4 letter case-sensitive name. Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PNG File Format contd...

Color depth Use palette-indexed color or made up of one or more channels. Number of channels depends on greyscale or color & alpha channel. Animation MNG : An extension to PNG - supports animation. More complex than PNG. APNG : Based on PNG, supports animation and is simpler than MNG.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PNG File Format contd...

Comparison with GIF Greater compression than GIF. Wider range of color depths than GIF. GIF supports animation while PNG does not.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

JPEG File Format Short for Joint Photographic Experts Group. Lossless & Lossy compression. Storing and transmitting photographs on the World Wide Web. Not suitable for line drawings and other textual or iconic graphics Features File extension : .jpeg, .jpg, .jpe Type : image/jpeg Type code : JPEG Developed by : Joint Photographic Experts Group, 1992

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

JPEG File Format contd... JPEG codec Encoding Color space transformation: RGB into YCbCr. Downsampling/ Chroma subsampling : Reduce the Cb and Cr components. Block splitting: Each channel splitted into 88 blocks(pixels). Discrete cosine transform: Each component of each 88 block converted to frequency-domain. Quantization: Divide each component by a constant for that component, & round to the nearest integer. Entropy coding: Arrange image components in zigzag order - RLE algorithm - Huffman coding. Compression ratio and artifacts: Compression ratio can be varied by varying divisors used in the quantization phase. Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

TIFF File Format Short for Tagged Image File Format. Lossy and lossless compression. For high color depth images. Supported by Adobe Photoshop, GIMP, Corel Photo-Paint. Format for raster graphics. Features File extension : .tiff, .tif Type : image Type code : TIFF Developed by : Aldus, now Adobe Systems, 1980 Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

TIFF File Format contd...

Flexible and adaptable file format. Used as container for JPEG and RLE compressed images. Useful method for archiving images. Begins with 2-byte indicator of byte order: “II” for little endian and “MM” for big endian byte ordering. Following 2 bytes represent the number 42. Composed of small descriptor blocks containing offsets into the file.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PCX File Format Short for Pacific Exchange. Lossless bitmap image format. Uses simple form of run-length encoding. Supports palette-based and 24-bit RGB images. Features File extension : .pcx Type : lossless bitmap image format Developed by : ZSoft Corporation.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PCX File Format contd...

File Format Device-independent bitmap image format. File header stores information about the display hardware. Compressed using run-length encoding. MSB used as control flag - whether given data represents a single pixel of a given palette index or color value / RLE pair - a series of several pixels of a single value.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

XBM File Format

Short for X BitMap. ASCII monochrome image format. Stores cursor and icon bitmaps used in the X GUI. Can be compiled directly into an application without any preprocessing steps. Data appears in headers & consist of series of static unsigned char arrays containing the monochrome pixel data. Image data consists of a line of pixel values stored in a static array.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PPM File Format

Short for Portable Pixmap file format. PPM, PGM, PBM specify rules for exchanging graphics files. Features File extension : .ppm, .pgm, .pbm, .pnm Type : Image file formats Developed by : Jef Poskanzer Extended to : XPM

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

bmp file format gif file format png file format jpeg file format tiff file format pcx file format xbm file format ppm file format

PPM File Format contd...

Depending on the identification of the file format, PBM - portable bitmap file format (P1/P4) - 1 bit per pixel PGM - portable graymap file format (P2/P5) - 8 bits per pixel PPM - portable pixmap file format (P3/P6) - 24 bits per pixel(RGB)

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Transforms

DFT, DCT, Hadamard Transform, Wavelets

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

DFT Transform

Short for Discrete Fourier Transform. Expresses i/p fn. as sum of sinusoidal components. Input function is discrete and finite. Used to analyze the frequencies contained in a sampled signal, to solve partial differential equations, & to perform convolutions. Computed using fast Fourier transform (FFT) algorithm.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

DFT Transform contd...

2D - DFT P P v (k, l) = m n u(m, n)WNkm WNln , where k,l=0,1..N-1 2D - IDFT u(m, n) =

1 N2

P P k

l

v (k, l)WN−km WN−ln , where m,n=0,1..N-1

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

DFT Transform contd...

Properties Invertible linear transformation. Orthogonality condition is satisfied. Parsevals theorem is satisfied. DFT sequence is periodic.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

DCT Transform

Short for Discrete Cosine Transform. Fourier-related transform. Uses only real numbers. 8 standard DCT variants. The DCT-II - for lossy data compression - “energy compaction” property. Used in JPEG image compression, MPEG, and video compression.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

DCT Transform contd... 2D - DCT c(k, l) = α(k)α(l) where k,l=0,1..N-1

P P m

n

x(m, n) cos

h

(2m+1) 2N kπ

i

cos

h

(2n+1) 2N lπ

i

,

2D - IDCT h i h i P P (2n+1) cos , x(m, n) = m n α(k)α(l) c(k, l) cos (2m+1) kπ lπ 2N 2N where m,n=0,1..N-1 α(k) = =

√1 , N

q

for k=0

2 N,

for k=1,2,..N-1

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Hadamard Transform

Known as Walsh-Hadamard transform, Walsh transform, or Walsh-Fourier transform. Named after the French mathematician Jacques Hadamard. Equivalent to a multidimensional DFT of size 2 x 2 x ...x 2. Takes only binary values ±1 - no multiplications required in transform calculation.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Hadamard Transform contd...

Hadamard transform Hm is a 2m x2m matrix, given by,   Hm−1 Hm−1 1 √ Hm = 2 , Hm−1 −Hm−1 where

√1 2

is the normalization factor.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Hadamard Transform contd...

Examples: H0 = +1   1 1 1 H1 = √2 1 −1   H1 H1 1 √ H2 = 2 H1 −H1

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Hadamard Transform contd...

Hadamard Transform of an N x 1 vector u is given as, v = Hu The inverse transform is given by, u = Hv

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Wavelet Transform

Based on small waves - wavelets( scaled and translated copies of varying frequency & limited duration ). Powerful approach to multiresolution theory-Mallat, 1987. “wavelet” - Morlet and Grossmann - French word “ondelette”, meaning “small wave” - transferred to English - “onde” into “wave” Used for non-stationary i/p signals. Gives both time & frequency information at the same time. Classified into discrete wavelet transforms (DWTs) & continuous wavelet transforms (CWTs).

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Wavelet Transform contd...

If function ψ(t) 1 2

Integrates to zero Has finite energy

- Mother wavelet(wavelet)

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Wavelet Transform contd...

CWT CWT of f (t) w.r.t wavelet ψ(t) is given as, R∞ W (a, b) = −∞ f (t) √1 ψ ∗ |a|

t−b a



dt

where a, b are real. a-scaling parameter b-location parameter

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Wavelet Transform contd...

DWT DWT of f (t) w.r.t wavelet ψ(t) is obtained by putting a = 2−j & b = k2−j in CWT R∞ W (a, b) = −∞ f (t)2j/2 ψ ∗ (2j t − k)dt

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Wavelet Transform contd...

Wavelet Vs Fourier wavelet-localized in both time and frequency. fourier-localized in frequency. DWT is computationally less complex.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

Wavelet Transform contd...

Applications DWT-data compression. CWT-signal analysis. JPEG 2000-uses biorthogonal wavelets.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Introduction List of file formats Transforms

DFT DCT Hadamard Transform Wavelet Transform

References

1 2

3

www.wikipedia.org “Digital Image Processing in MATLAB”,Rafael C. Gonzalez , Richard E. Woods. “Fundamentals of Digital Image processing”, Anil K. Jain.

Blessin Joseph & Pilmy Peter M.Tech Signal Processing

SPEECH AND IMAGE PROCESSING LAB Image file formats

Related Documents

Formats And Transforms
December 2019 5
Formats
November 2019 47
Formats
October 2019 49
Formats And Sample Layouts
November 2019 20
2d Transforms
July 2020 5