COMP 9517 Computer Vision Digital Images 1022020 COMP

  • Slides: 26
Download presentation
COMP 9517 Computer Vision Digital Images 10/2/2020 COMP 9517 S 2, 2009 1

COMP 9517 Computer Vision Digital Images 10/2/2020 COMP 9517 S 2, 2009 1

Overview of Digital Images • Humans derive a great deal of information about the

Overview of Digital Images • Humans derive a great deal of information about the world through their visual sense – eyes. • Three components for construction of images: – A scene of objects – Illumination of the objects – Sensing the illumination 10/2/2020 COMP 9517 S 2, 2009 2

Overview of Digital Image • 2 D digital images is an array of intensity

Overview of Digital Image • 2 D digital images is an array of intensity samples reflected from or transmitted through objects • Digital images contain fixed number of rows and columns of Pixels • Pixels (picture elements) are little tiles holding quantised values (0 -255) represent the brightness at the points of the image • Colour images have three values for each pixel (for example, RGB) 10/2/2020 COMP 9517 S 2, 2009 3

Overview of Digital Image 0 1 2 3 4 5 6 7 130 146

Overview of Digital Image 0 1 2 3 4 5 6 7 130 146 133 95 71 71 62 78 0 130 146 133 92 62 71 1 139 146 120 62 55 55 55 2 139 139 146 117 112 117 110 3 139 139 4 146 142 139 139 143 125 139 5 156 159 159 146 159 6 168 159 156 159 139 159 7 159 159 10/2/2020 COMP 9517 S 2, 2009 3 band for colour image 4

Digital Images - 2 D Projection of 3 D • 3 D world has

Digital Images - 2 D Projection of 3 D • 3 D world has color, texture, surfaces, volumes, light sources, objects, motion, connections, etc. • 2 D image is a projection of a scene from a specific viewpoint; many 3 D features are captured, but some missed. 10/2/2020 COMP 9517 S 2, 2009 5

Image Receives Reflections • Light reaches surfaces of objects • Surfaces reflect • Camera

Image Receives Reflections • Light reaches surfaces of objects • Surfaces reflect • Camera receives light energy 10/2/2020 COMP 9517 S 2, 2009 6

Radiation • Different types of electromagnetic radiation, such as X-ray, infra-red • Different wavelengths

Radiation • Different types of electromagnetic radiation, such as X-ray, infra-red • Different wavelengths of radiation have different properties • Different devices to detect different radiation 10/2/2020 COMP 9517 S 2, 2009 7

Image Devices • CCD (charge-coupled device) cameras • Lens collects light rays • Cells

Image Devices • CCD (charge-coupled device) cameras • Lens collects light rays • Cells (array of small fixed elements) convert light energy into electrical charge • Through frame grabber or IEEE 1394 to PC 10/2/2020 COMP 9517 S 2, 2009 8

Computer Vision System • Camera inputs to frame buffer • Program can interpret data

Computer Vision System • Camera inputs to frame buffer • Program can interpret data • Program can add graphics • Program can add imagery 10/2/2020 COMP 9517 S 2, 2009 9

Image Formation • The geometry of image formation: the projection of each point of

Image Formation • The geometry of image formation: the projection of each point of the 3 D scene through the centre of projection (or lens centre) onto the image plane • Pinhole Camera • Perspective projection • Affine projection 10/2/2020 COMP 9517 S 2, 2009 10

Perspective Projection • The apparent size of object depends on their distance: far object

Perspective Projection • The apparent size of object depends on their distance: far object appear smaller • By similar triangles • Ignore third coordinate, and get 10/2/2020 COMP 9517 S 2, 2009 11

Affine Project • Scene depth is small relative to the average distance from the

Affine Project • Scene depth is small relative to the average distance from the camera • Let magnification to be positive constant, since is negative, i. e. treat all points in scene being at constant distance from camera • Leads to weak perspective projection 10/2/2020 COMP 9517 S 2, 2009 12

Affine Project • The camera always remains at a roughly constant distance from the

Affine Project • The camera always remains at a roughly constant distance from the scene • Orthographic projection when normalise m to be -1 10/2/2020 COMP 9517 S 2, 2009 13

Picture function • A picture function is a mathematical representation f(x, y) of a

Picture function • A picture function is a mathematical representation f(x, y) of a picture as a function of two spatial variables x and y. – x and y: real values defining points of the picture – f(x, y): real value defining the intensity of point (x, y) 10/2/2020 COMP 9517 S 2, 2009 14

Picture Function and Digital Images • Analog image: a 2 D image F(x, y)

Picture Function and Digital Images • Analog image: a 2 D image F(x, y) has infinite precision in both spatial parameters x, y and intensity at each spatial point (x, y) • Digital image: a 2 D image I[r, c] by a discrete 2 D array of intensity samples with limited precision – Can be stored in a 2 D computer memory structure – 2 D array of discrete values. In C, char I[512] – Intensity as an 8 -bit number allows values of 0 -255 – 3 such values for colour image. 10/2/2020 COMP 9517 S 2, 2009 15

Sampling and Quantisation • Digitisation: convert analog image to digital image • Sampling: digitising

Sampling and Quantisation • Digitisation: convert analog image to digital image • Sampling: digitising the coordinate – spatial discretisation of a picture function f (x, y) – use a grid of sampling points, normally rectangular: image sampled at points x = j Δx, y = k Δy, j = 1. . . M, k = 1. . . N. – Δx, Δy called the sampling interval. 10/2/2020 COMP 9517 S 2, 2009 16

Spatial Resolution • Spatial Resolution: pixels per unit of length • Resolution decreases by

Spatial Resolution • Spatial Resolution: pixels per unit of length • Resolution decreases by one half • Human faces can be recognized at 64 x 64 pixels per face • Appropriate resolution is essential: – too little resolution, poor recognition – too much resolution, slow and wastes memory 10/2/2020 COMP 9517 S 2, 2009 17

Sampling and Quantisation • Quantisation: digitising the amplitude values – called intensity or gray

Sampling and Quantisation • Quantisation: digitising the amplitude values – called intensity or gray level quantisation – Gray-level resolution: • usually has 16, 32, 64, . . , 128, 256 levels • number of levels should be high enough for human perception of shading details - human visual system requires about 100 levels for a realistic image. 10/2/2020 COMP 9517 S 2, 2009 18

Image Coordinate System • Raster oriented: down-leftward (a) • Cartesian coordinate: up-leftward (b, c)

Image Coordinate System • Raster oriented: down-leftward (a) • Cartesian coordinate: up-leftward (b, c) • Relationship btn pixel centre point to I[i, j] 10/2/2020 COMP 9517 S 2, 2009 19

Type of images • Gray-scale image: a monochrome digital image I[r, c] with one

Type of images • Gray-scale image: a monochrome digital image I[r, c] with one intensity value per pixel • Multispectral image: a 2 D image M[x, y] has a vector of values at each pixel, colour image (r, g, b) • Binary image: a digital image with all pixel values 0 or 1 • Labelled image: a digital image L[r, c] with pixel values as symbols denoting the decisions made for that pixel 10/2/2020 COMP 9517 S 2, 2009 20

Digital Image Format • Image file header: non image information for labelling and decoding

Digital Image Format • Image file header: non image information for labelling and decoding data • Image data • Data Compression – Lossless: can be recovered exactly – Lossy: may lose quality 10/2/2020 COMP 9517 S 2, 2009 21

Common Image Format • Run-Coded Binary Image: an efficient coding scheme for binary or

Common Image Format • Run-Coded Binary Image: an efficient coding scheme for binary or labelled images 10/2/2020 COMP 9517 S 2, 2009 22

Common Image Format • PGM(PBM/PGM, PPM): Portable gray map One of the simplest file

Common Image Format • PGM(PBM/PGM, PPM): Portable gray map One of the simplest file formats 10/2/2020 COMP 9517 S 2, 2009 23

Common Image Format • Gif(GIF): Graphics Interchange Format, WWW, 8 bits – 256 colour

Common Image Format • Gif(GIF): Graphics Interchange Format, WWW, 8 bits – 256 colour levels, may be lossless • Tiff(TIFF/TIF): Tag Image File Format, 1 -24 bits, lossy or lossless • Jpeg(JFIF/JFI/JPG): Joint Photographic Experts Group, up to 24 bits, recent standard, independent of colour system, lossy or lossless • Post. Script(PDF/PDL/EPS): encoded by ASCII • Mpeg(MPG/MPEG-2): Motion Picture Expert Group, stream-oriented encoding of video 10/2/2020 COMP 9517 S 2, 2009 24

References • Driscoll, W. and Vaughan, W. , eds (1978), Handbook of Optics, Mc.

References • Driscoll, W. and Vaughan, W. , eds (1978), Handbook of Optics, Mc. Grtaw-Hill. • Boyle, W. and Smith, G. (1970), Charge coupled semiconductor devices, Bell Syst. Tech. J. 49, 587 -593. • Huang, T. S. (1965), PCM Picture Transmission. IEEE Spectrum, vol. 2, no. 12, pp. 57 -63. 10/2/2020 COMP 9517 S 2, 2009 25

Acknowledgement • Some material, including images and tables, were drawn from the textbook and

Acknowledgement • Some material, including images and tables, were drawn from the textbook and Stockman’s online resources. 10/2/2020 COMP 9517 S 2, 2008 26