850 likes | 1.86k Views
Chapter 7 Image Feature Extraction. Chapter 5 Image Transforms. Why need transformation?. By image transformation with different basis functions (kernels), image f ( x,y ) is decomposed into a series expansion of basis functions, which are used as the features for further recognition .
E N D
Chapter 5 Image Transforms Why need transformation? • By image transformation with different basis functions (kernels), image f(x,y) is decomposed into a series expansion of basis functions, which are used as the featuresfor further recognition. • Image transformation can also be used in enhancement and compression.
Image Transforms • Fourier transform • Discrete Fourier transform • Discrete Cosine transform • Hough transform • Wavelet transform
Feature Extraction • What are features? • Density features • Projections • Rotation-invariant features • Moment Invariant
Difficulties in Chinese character • recognition • Large in Data Set • Complex in Structure 1. A Large Set of Characters: • English: 26 letters • Russian: 32 letters • Greek: 24 letters • Chinese: • 3,000-7,000 characters are often used • Standard in P. O. China: 6,763 • The first level: 3,755, The second level: 3,008 • 7,000-10,000 Chrs. are collected in small dictionaries • 70,000 Chrs. in the largest contemporary dictionary
In the long history of China, the total number of Chinese characters became larger and larger
8 10 0 0 9 25 21 9 ... 19 7 18 3 ... 2 2 0 3 Input: Chinese character “tree” Preprocessing Cellular Feature Extraction Neural Tree Classification Features (Matrix)
Feature Extraction • What are features? • In pattern recognition, features are used to distinguish one class of objects from another Features are functions of the measurements performed on a class of objects that enable that class to be distinguished from other classes in the same general category. • Example • For polygons • the number of vertices • the number of sides • The lengths of sides • the values of the angles vertice q side
Purpose of feature selection: • reduce dimensionality of representation • minimize measurement extraction costs • assess the potential performance of the pattern recognition system • improve system's performance • Three ingredients in feature selection/ extraction • feature evaluation criteria • dimensionality of the feature space • optimization procedure
Fourier Transform Projection • How to select features? (1) A formal, number-crunching approach: for statistical PR. (2) Design features with semantic contents, some intuitive way correspond to human perception of the objects: for structural PR Examples: (1) Features of 7
K H A B S 2 0 0 3 1 0 5 0 4 0 5 5 5 5 7 5 5 6 (2) VT={0,5} VN={S,A,B,H,K} P: S 0A, A 0B, B 5H, H 5K, K 5 Features of 7
W Wi N= 4 N= 4 Density Features (Cellular Feature) • A pattern image is divided into NN sub-images
How many image pixels in each sub-image N= 4 N= 4 • Calculate thedensity of each sub-image
Projections • In pattern recognition, the term projection usually refers to mapping an image into a waveform • The values of the waveform are the sums of the image points alongparticulardirections • According to directions, 3 projections have been developed: • Horizontal and vertical projection • Ring projection • Central projection
y t x • Formula of the projection: • is the projection direction, R is area of image • [z] is a function such that
Projections of some particular directions = 0°, 45°, 90°and 135°:
( ) f t ( ) f t t t Horizontal and verticalProjections 2-D object is converted into two 1-D signals
( ) f t ( ) f t t t Orthogonal transform (Fourier transform) is used to obtain numerical features
Feature Vectors Va={va1, va2, ..., van, } Vb={vb1, vb2, ..., vbn, } Vc={vc1, vc2, ..., vcn, } ……………….. Vz={vz1, vz2, ..., vzn, }
Ring projection Y. Y. Tang, H.D. Cheng, and C. Y. Suen, “Transformation-Ring-Projection (TRP) Algorithm and its VLSI Implementation,” International Journal of Patter recognition and Artificial Intelligence, Vol. 5, No. 1 and 2, pp. 25-56, 1991.
p(r) 8 p(ri) 49 8 11 10 r 0 rk ri Center of gravity rk ri 9 7 7 7 4 Ring-Projection Algorithm
The 1-D pattern obtained from the Ring- Projection algorithm is invariant to rotations
Extraction of rotation-invariant features • Ring-projection • Cumulative angular function- Fourier descriptor (CAF-FD) • Moment Invariant
Cumulative Angular Function -Fourier Descriptors(CAF-FD) • Cumulative angular function-Fourier descriptor (CAF-FD) can produce rotation-invariant features • When the object is rotated with different angles, the feature are same
Algorithm of CAF-FD Step-1: Represent a pattern by a boundary (closed curve) Step-2: Trace the curve clockwise over the entire boundary Step-3: Find the angular direction(t)at each key points Step-4: Find cumulative angular function(t) Step-5: Normalize the cumulative angular function and produce NCAF*(t) Step-6: Expand NCAF into Fourier series
Step-1:Represent a pattern by a boundary • Cumulative angular function-Fourier descriptor (CAF-FD) require closed curves • Any pattern, that can be approximated by a boundary curve, can be described by CAF-FD A pattern is represented by a boundary
Starting point Step-2:Trace the boundary • The curve is traced clockwise over the entire boundary • The starting point of the curve is arbitrarily chosen • Algorithm: • (Boundary tracing)
Turn right Turn left • Algorithm: • (Boundary tracing)
b d c e a f y i g t h x(t), y(t) (t) x Step-3 & 4: Find the angular direction (t) & cumulative angular function (t) • The curve is traced in the sequence abcdefghia • Parametric representation of a closed curve is given by: Z(t) = [x(t), y(t)] Where x(t), y(t) are the x- and y- coordinates of the point t on
where (t) is the angular direction of at t. (t) is defined as the total angular change from the starting point 0 to t: cumulative angular function (CAF). y y (t) x(t), y(t) x(t), y(t) x(0), y(0) (t) (t) (0) x x Transform the parametric curve into -S space, the curve is given by: (t) = (t) - (0)
Step-5: Normalize the cumulative angular function and produce the NCAF *(t) Normalize the cumulative angular function in the domain [0, 2], Where L is the total length of the curve *(t) is invariant under translation, rotation and it is periodic. C.T. Zahn and R. Z. Roskies, “Fourier Descriptors for Plane Closed Curves,” IEEE Trans. C-21, No. 3, 269-281, 1972.
a p/2 e b d c -3p/2 f l 0 i -p j h g k -p/2 1*(t) p/2 0 -p/2 -p -3p/2
a e b d c f l i j h g k 2*(t) p/2 + 0+ -p/2 + -p + -3p/2 + The pattern is rotated by
2*(t) p/2 + 0+ -p/2 + -p + -3p/2 + 1*(t) p/2 0 -p/2 -p -3p/2 2*(t)= 1*(t)
Step-5: Expand NCAF into Fourier series • Therefore, it can be expanded into Fourierseries and is given by, in polar form 极坐标形式, Ak and akare the Fourier Descriptors of curve • In trigonometric series 三角级数, akand bkare the Fourier Descriptors of curve
(t) (t) (t) CAF-FD
a*(t) b*(t) Fourier transform is used to obtain numerical features CAF-FD Va={va1, va2, ..., van, } Vb={vb1, vb2, ..., vbn, } Feature Vectors
Some Properties of the 2D Fourier Transform • Translation: where the double arrow is used to indicate the correspondence between a function and its FT (and vice versa).
Moment Invariant • Seven invariant moments are used • This set of moments has been shown to be invariant to translation, rotation, and scale change
y y y y y2 y1 x x x x x2 x1 Translation Rotation Scaling
Invariant to translation, rotation, and scaling Translation Same feature Scaling Rotation
Algorithm of Moment Invariant Step-1: Calculate the moment of order (p+q) --- mpq Step-2: Calculate central moments --- pq Step-3: Calculate the normalized central moments --- pq Step-4: Calculate the invariant moments --- i , i =1,2,…7
Step-1: Calculate the moment of order (p+q) - mpq • Given a 2-D continuous function f(x,y), moment of order (p+q) is given by: • P and q are positive integers 0, 1,2, ... • Uniqueness theorem A. Papoulis, Probability, Random Variables, and StochasticProcesses, McGraw-Hill, 1965.
Uniqueness theorem states: • if • f(x,y) is piecewise continuous and • f(x,y) has nonzero values only in finite part of the x-y plane, • then • moments of all order exist and • the moment sequence mpq is uniquely determinedby f(x,y) and vice versa.
Step-2: Calculate the central moment - pq • The central moment is expressed as
For a digital image, we replace the double integral by a double summation. it is given by:
The central moments of order three are: 00, 01, 02 ,03, 10, 20, 30, 11, 12, 21 • They are computed below: