520 likes | 794 Views
Chapter 2: Digital Image Fundamentals. Fall 2003, 劉震昌. Outline. Elements of Visual Perception Image sensing and acquisition Image sampling and quantization Relationships between pixels. Understanding visual perception. Most image processing operations are based on math. and probability
E N D
Chapter 2: Digital Image Fundamentals Fall 2003, 劉震昌
Outline • Elements of Visual Perception • Image sensing and acquisition • Image sampling and quantization • Relationships between pixels
Understanding visual perception • Most image processing operations are based on math. and probability • Why understanding visual perception? • Human intuition plays an important role in the choice of processing technique
Structure of the Human eye 角膜 虹膜 水晶體 Diameter:20mm 網膜
2 class of receptors: cones and rods • Distribution of cones and rods 1 cone -> 1 nerve Many rods -> 1 nerve
Discrete nature of human vision • Area of cones Cone density: 150,000 per mm 15mm
Images? Illumination source scene reflection
Image sensors • Incoming energy is transformed into a voltage by the combination of input electrical power and sensor material (continuous)
Sensor strips • Flat-bed scanner • aircraft
Sensor arrays • CCD arrays in digital camera
Image sampling and quantization • Sampling: digitize the coordinate values • Quantization: digitize the amplitude values • Why? Limited representation power in digital computers continuous data digital data discretize
Image sampling and quantization (cont.) • Sometimes, the sampling and quantization are done mechanically • Limitation on the sensing equipment sensor array
Sampling rule • How to determine the sampling rate? • Nyquist sampling theorem • If input is a band-limited signal with maximum frequency ΩN • The input can be uniquely determined if sampling rate ΩS > 2ΩN • Nyquist frequency : ΩN • Nyquist rate : ΩS
Representing digital images (cont.) • Matrix form f(0,0) f(0,1) … f(0,N-1) f(1,0) f(0,1) … f(1,N-1) … … f(M-1,0) f(M-1,1) … f(M-1,N-1) MxN bits to store the image = M x N x k gray level = 2k
Representing digital images (cont.) • L = 2k gray levels, gray scales [0,…,L-1] • The dynamic range of an image • [min(image) max(image)] • If the dynamic range of an image spans a significant portion of the gray scale -> high contrast • Otherwise, low dynamic range results in a dull, washed out gray look
Spatial and gray-level resolution • L-level digital image of size MxN • = digital image having • a spatial resolution MxN pixels • a gray-level resolution of L levels • Spatial resolution in real-world space line width=W cm space width=W cm Resolution = 1/2W (line/cm)
Spatial and gray-level resolution (cont.) • Resolution of printer or screen • dpi(dot per inch) • pixel/unit of distance • When an digital image of size MxN is to be printed or viewed using devices with resolution k dpi, how large will be the output image?
Multi-rate image processing • Down-sampling • Up-sampling • neighboring pixel duplication • interpolation 2 2
Gray-level reduction false contouring
Empirical study of resolutions • 2k-level digital image of size NxN • How K and N affect the image quality Increased details
Empirical study of resolutions(cont.) • iso-preference curses *shift up and right *A detailed image may need less gray levels
Zoom and Shrink • Operations applied to digital images • Zoom: up-sampling • Pixel duplication • Bi-linear interpolation • Shrink: down-sampling
Zoom and shrink: idea Idea: adjust the grid size over the original image
Zooming: example pixel duplication bilinear interpolation
Neighbors of a pixel • 4-neighbors of p: N4(p) • Diagonal neighbors: ND(p) • 8-neighbors = 4-neighbors+diagonal neighbors : N8(p) p p
Adjacency, connectivity, regions, and boundaries • Connectivity of pixels • They are neighbors • Their gray levels satisfy a specified criterion of similarity • Concept about regions and boundaries • Adjacency • 4-adjacency: p and q with intensity from V and q is in N4(p) • 8-adjacency: p and q with intensity from V and q is in N8(p)
Connectivity and adjacency (cont.) • m-adjacency(mixed adjacency): p and q having intensity from V and • q is in N4(p), or • q is in ND(p) and N4(p) N4(q) has no pixels whose values are from V
Path • A path from p: (x,y) to q: (s,t) is a sequence of pixels: • Length = n • It’s a k-path if it is 4-, 8-, and m-adjacency (x,y), (x1,y1), (x2,y2),…, , (xn-1,yn-1),(s,t) consecutive pixels are adjacency
Growth of definitions adjacency path S connected component S connected set (region) S boundary
Summary • We need solid mathematical definitions to let the algorithm run on a computer
Distance measure • p: (x,y), q: (s,t) • Euclidean distance • De(p,q)=[(x-s)2+(y-t)2]1/2 • D4 distance • D4(p,q)=|x-s|+|y-t| • D8 distance • D8(p,q)=max(|x-s|,|y-t|) r 2 2 1 2 2 1 0 1 2 2 1 2 2 2 2 2 2 2 2 1 1 1 2 2 1 0 1 2 2 1 1 1 2 2 2 2 2 2
Pixel-wise operation • For example, how does image I divided by image M? • Division is carried out between corresponding pixels in the two images • Matlab: Q = I./M
Linear and non-linear operations • H be an operator whose input and output are images • H is linear if • H(af+bg) = aH(f)+bH(g) • Otherwise non-linear • We have well-understood theoretical and practical results about linear operators
Announcement !!! • There are solutions to the marked problems in the textbook • http://www.imageprocessingbook.com/teaching/problem_solutions.htm • HW#1