690 likes | 807 Views
The Art of Digital Image processing. C. S. Tong Department of Mathematics Hong Kong Baptist University. Is the left center circle bigger?. No, they're both the same size. It's a spiral, right?. No, these are a bunch of independent circles.
E N D
The Art of Digital Image processing C. S. Tong Department of Mathematics Hong Kong Baptist University
Is the left center circle bigger? No, they're both the same size
It's a spiral, right? No, these are a bunch of independent circles
Keep staring at the black dot. After a whilethe gray haze around it will appear to shrink.
How many colors do you see? There are only 3 colors: White, green, and pink.There seem to be two different shades of pink,but there is only one pink.
Do you see a cube missing a corner?Or do you see a small cube in a big one?
What is a digital image? • A digital image is just a 2D array of picture elements (pixels)
What is a digital image? • Each pixel is associated with a number which represents its intensity or brightness • Usually allow up to 256 levels of brightness (so called 8-bit images) • how many levels do you think you can distinguish?
Effects of Quantization Effects of changing intensity resolution 8-Bit image 7-Bit image 6-Bit image 5-Bit image 4-Bit image 3-Bit image 2-Bit image 1-Bit image
Effects of Quantization The demo showed that the human eye can only resolve about 20-30 grey levels
What is a digital image? • The density of pixels significantly affect the quality of the image • A typical scanner or digital camera has a resolution of about 600 dpi (or about 1 million pixels per picture) • By comparison, the human eye has a resolution of about 10,000 dpi (or 100 million cone cells)
Effects of Quantization Effects of changing spatial resolution
Effects of Quantization Can be used for concealing identify
What is a digital image? • Colour can be represented by three primary colour components: Red, Green and Blue 24-bit RGB images • For special editing effects such as transparency, some image formats support 32-bit RGB- ,the additional 8-bit describes the channel • Video is just a sequence of images. Frame rate of over 24 pictures per second is often sufficient
What is a digital image? • A more efficient image format for representing colours is the Index Image Format • All the distinct colours that appear in an image are stored in a file called the colormap • The colour image is now an array of indices, each of which specify the color of that pixel as the corresponding colour in the colormap
Chroma-keying • The idea of editing the colormap can be used for many movie effects • Take pictures of an actor in front of a blue screen • Edit the colormap and make the blue color transparent • Overlay the pictures to a desired background
Chroma-keying Map the black background to the Tsing Ma Bridge
Editing Colormap Convert image to black and white image Increase intensity in the Blue component Increase intensity in the Red component
Contrast Stretching Original image Contrast adjusted plus cropping Histogram Contrast adjusted
Histogram Equalization Original image Histogram Equalized Contrast Adjusted
Median Filtering Original Image MF (3-by-3) 5% Binary Noise
Median Filtering 20% Binary Noise MF (3-by-3) MF (3-by-3) 50% Binary Noise
Independent Component Analysis Original Image Denoising using ICA Noisy Image
Edge Detection Original Sobel Noise (0.01) Sobel Laplacian Noise (0.05) Laplacian Sobel Laplacian
High-boost Filter Original High-passed High-boost Low-passed
Fourier Transform Spatial Domain Frequency Domain F logF
Ghost-buster Ghost appears Ghost removed
Image Degradation Perfect Photo Blurred Photo
Image Restoration Original Image Blur removed using Wiener Filter (nsr=0.05) • Motion Blurred Image
Image Restoration WF restorations CST restorations Original • Blur removed using nsr=0.05 • Blur removed using nsr=0.01 • Blur removed using nsr=0.005 Blur removed using nsr=0.001 • Blur removed using nsr=0.1
Blurred Image Blurred Image Restored Image Restored Image Result
Horizontal Blurred Vertical Blurred Restored Image Restored Image Other Blurring Function
How to Recognize Shapes? After appropriate translation, rotation , and scaling, we can now see the two shapes are the same!
How to Recognize Shapes? After all possible translation, rotation , and scaling, we can now see the two shapes are not the same!
Pattern Recognition: Overview • Each pattern to be related to a set of features (feature vector) • Distinguish a set of patterns by some measure of distance between feature vectors
Feature Extraction • This is the most crucial part of a recognition system • Usually prefer features which are invariant to translation, rotation and scaling • Standard approach include: statistical moments and PCA • Very much context-dependent
A small scale illustration Patterns Features Apples, Lemons Colour Size + Melons Shape + Bananas + Oranges, Grape Fruits... Texture...
Complexity • Clearly, as the set of patterns grows, the number and complexity of the features grow • There may not be any suitable distinguishing features Sometimes I can’t even read my own hand writing!
Chinese Character Recognition • There are over 20,000 Chinese Characters • Although not all are in common usage, at least 5,000 are needed in most applications • Chinese Characters come in many font types
Chinese Character Recognition • For fixed font character recognition, each character is represented by a N-by-M binary matrix (typically 24-by-24) • Or equivalently, a character is a 576 dimensional vector • Noise in scanning is modelled by bit-reversal (so called binary noise)
Chinese Character Recognition • Handwriting is much more difficult: no natural representation available • A character involves combining a number of elementary strokes in two spatial dimension • Large variation in writing styles