Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
-
Upload
stephanie-wilson -
Category
Documents
-
view
220 -
download
1
Transcript of Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
![Page 1: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/1.jpg)
Image Processing Basics
![Page 2: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/2.jpg)
What are images?
An image is a 2-d rectilinear array of pixels
![Page 3: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/3.jpg)
Pixels as samples
A pixel is a sample of a continuous function
![Page 4: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/4.jpg)
Images are Ubiquitous
Input Optical photoreceptors Digital camera CCD array Rays in virtual camera (why?)
Output TVs Computer monitors Printers
![Page 5: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/5.jpg)
Properties of Images
Spatial resolution Width pixels/width cm and height pixels/ height cm
Intensity resolution Intensity bits/intensity range (per channel)
Number of channels RGB is 3 channels, grayscale is one channel
![Page 6: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/6.jpg)
Image errors
Spatial aliasing Not enough spatial resolution
Intensity quantization Not enough intensity resolution
![Page 7: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/7.jpg)
Two issues
Sampling and reconstruction Creating and displaying images while reducing
spatial aliasing errors
Halftoning techniques Dealing with intensity quantization
![Page 8: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/8.jpg)
Sampling and reconstruction
![Page 9: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/9.jpg)
Aliasing
Artifacts caused by too low sampling frequency (undersampling) or improper reconstruction
Undersampling rate determined by Nyquist limit (Shannon’s sampling theorem)
![Page 10: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/10.jpg)
Aliasing in computer graphics
In graphics, two major types Spatial aliasing
Problems in individual images Temporal aliasing
Problems in image sequences (motion)
![Page 11: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/11.jpg)
Spatial Aliasing
“Jaggies”
![Page 12: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/12.jpg)
Spatial aliasing
Ref: SIGGRAPH aliasing tutorial
![Page 13: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/13.jpg)
Spatial aliasing
Texture disintegration
Ref: SIGGRAPH aliasing tutorial
![Page 14: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/14.jpg)
Temporal aliasing
Strobing Stagecoach wheels in movies
Flickering Monitor refresh too slow Frame update rate too slow CRTs seen on other video screens
![Page 15: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/15.jpg)
Antialiasing
Sample at a higher rate What if the signal isn’t bandlimited? What if we can’t do this, say because the sampling
device has a fixed resolution?
Pre-filter to form bandlimited signal Low pass filter Trades aliasing for blurring
Non-uniform sampling Not always possible, done by your visual system,
suitable for ray tracing Trades aliasing for noise
![Page 16: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/16.jpg)
Sampling Theory
Two issues What sampling rate suffices to allow a given
continuous signal to be reconstructed from a discrete sample without loss of information?
What signals can be reconstructed without loss for a given sampling rate?
![Page 17: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/17.jpg)
Spectral Analysis
Spatial (time) domain: Frequency domain:
Any (spatial, time) domain signal (function) can be written as a sum of periodic functions (Fourier)
![Page 18: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/18.jpg)
Fourier Transform
![Page 19: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/19.jpg)
Fourier Transform
Fourier transform:
Inverse Fourier transform:
dxexfuF xui
2)()(
dueuFxf xui
2)()(
![Page 20: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/20.jpg)
Sampling theorem
A signal can be reconstructed from its samples if the signal contains no frequencies above ½ the sampling frequency.
-Claude Shannon
The minimum sampling rate for a bandlimited signal is called the Nyquist rate
A signal is bandlimited if all frequencies above a given finite bound have 0 coefficients, i.e. it contains no frequencies above this bound.
![Page 21: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/21.jpg)
Filtering and convolution
Convolution of two functions (= filtering):
Convolution theorem: Convolution in the frequency domain is the same as
multiplication in the spatial (time) domain, and Convolution in the spatial (time) domain is the same as
multiplication in the frequency domain
dxhfxhxfxg
)()()()()(
![Page 22: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/22.jpg)
Filtering, sampling and image processing
Many image processing operations basically involve filtering and resampling. Blurring Edge detection Scaling Rotation Warping
![Page 23: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/23.jpg)
Resampling
Consider reducing the image resolution:
![Page 24: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/24.jpg)
Resampling
The problem is to resample the image in such a way as to produce a new image, with a lower resolution, without introducing aliasing.
Strategy- Low pass filter transformed image by
convolution to form bandlimited signal This will blur the image, but avoid aliasing
![Page 25: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/25.jpg)
Ideal low pass filter
Frequency domain:
Spatial (time) domain:
x
xxsync
)sin(
)(
![Page 26: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/26.jpg)
Image processing in practice
Use finite, discrete filters instead of infinite continous filters
Convolution is a summation of a finite number of terms rather than in integral over an infinite domain
A filter can now be represented as an array of discrete terms (the kernel)
n
nxhfxhxfxg
)()()()()(
![Page 27: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/27.jpg)
Discrete Convolution
![Page 28: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/28.jpg)
Finite low pass filters
Triangle filter
![Page 29: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/29.jpg)
Finite low pass filters
Gaussian filter
![Page 30: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/30.jpg)
Edge Detection
Convolve image with a filter that finds differences between neighboring pixels
111
181
111
filter
![Page 31: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/31.jpg)
Scaling
Resample with a gaussian or triangle filter
![Page 32: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/32.jpg)
Image processing
Some other filters
![Page 33: Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.](https://reader035.fdocuments.us/reader035/viewer/2022081515/56649f1c5503460f94c321b2/html5/thumbnails/33.jpg)
Summary
Images are discrete objects Pixels are samples Images have limited resolution
Sampling and reconstruction Reduce visual artifacts caused by aliasing Filter to avoid undersampling Blurring (and noise) are preferable to aliasing