Artificial Neural Networks Basics
Artificial Neural Networks Basics
Artificial Neural Networks Basics
pq
pq
=
00
where
=
+
+
p q
2
1
for p q + = 2 3 , ,K
For the second and third moments, a set of seven invariant moments can be derived [15].
They are given by:
1 20 02
= +
2 20 02
2
11
2
4 = + ( )
3 30 12
2
21 03
2
3 3 = + ( ) ( )
4 30 12
2
21 03
2
= + + + ( ) ( )
[ ]
[ ]
5 30 12 30 12 30 12
2
21 03
2
21 03 21 03 30 12
2
21 03
2
3 3
3 3
= + + +
+ + + +
( )( ) ( ) ( )
( )( ) ( ) ( )
[ ]
6 20 02 30 12
2
21 03
2
11 30 12 21 03
4
= + +
+ + +
( ) ( ) ( )
( )( )
pq
p q
y x
x x y y f x y =
( ) ( ) ( , )
(25)
[ ]
[ ]
7 12 30 30 12 30 12
2
21 03
2
12 03 21 03 30 12
2
21 03
2
3 3
3 3
= + + +
+ + + +
( )( ) ( ) ( )
( )( ) ( ) ( )
This set of moments has been shown to be invariant to translation, rotation, and scale [15].
Statistical texture features
Statistical features are usually calculated from a window of centred ( ) ( ) 2 1 2 1 n n + +
around a pixel p(x, y). This window can be randomly placed at different locations by the user
in the area of the image in which texture/color need to be classified for data collection. The
data collected is then used in neural classifier to train it for the recognition of a particular
texture/color in images of similar nature. These features are:
! The color primaries, R,G,B of the center pixel or the non-physical primaries (X,Y,Z)
or just the luminance Y, or the luminance along with two of the normalized color
primaries, or another combination depending on the problem you are trying to solve.
! Mean of the pixel values
ij
y j n
j n
x i n
i n
n
p x y =
+
=
+
=
+
1
2 1
2
( )
( , )
p(x,y) could the luminance value or the color primaries, in which case you will have 3
means one for each primary.
! Standard deviation
[ ]
ij ij
y j n
j n
x i n
i n
n
p x y =
+
=
+
=
+
1
2 1
2
( )
( , )
! Skewness
S
n
p x y
ij
ij
ij y j n
j n
x i n
j n
=
+
=
+
=
+
1
2 1 ( )
( , )
! Kurtosis
K
n
p x y
ij
ij
ij y j n
j n
x i n
i n
=
+
=
+
=
+
1
2 1
3
4
( )
( , )
! Entropy
h
n
h k h k
ij
k
L
=
+
=
1
2 2 1
0
1
log( )
( ) log( ( ))
where h(k) is the histogram of the pixels in the window. ( )( ) 2 1 2 1 n n + +
Application Ideas
1. Shape recognition of manufactured parts (invariant moments + neural network).
2. OCR applications (invariant moments + neural network)
3. Face recognition (invariant moments + texture/color + neural network).
4. Thresholding or binarization of gray scale or color images to isolate the foreground, such
as text, from the background which could have water markings, such as in passports,
personal IDs, checks, etc.
5. Color recognition.
6. Recognition of items through color/texture.
7. Color correction.
...etc.
References.
1. D.E.Rumelhart, J.L.McClelland and the PDP research group, Parallel Distrubuted Processing,
Vol.1 MIT Press. (1988).
2. G.V.Reklaitis, A.Ravindran, and K.M.Ragsdell, Engineering Optimization, Methods and
Applications, John Wiley and sons,(1983). 3. Kiefer,J., "Optimum sequential search and
approximation methods under minimum regularity assumption, " J. Soc. Ind. Appl. Math.,
5(3),pp.105-125 (1957).
4. M.J.D. Powell, "An efficient method for finding the minimum of a function of several variables
without calculating derivatives," Computer J., vol. 7, pp.155-162 (1964).
5. R.P.Brent, Algorithm For Minimization Without Derivatives, Prentice Hall, Englewood Cliffs,
NJ, 1973.
6. W.H.Swann, "Report on the development of a direct search method of optimization," ICI Ltd.,
Central Instr. Res. Lab. Res. Note, 64/3, London, 1964.
7. R.L.Zahradnik, Theory and Techniques of Optimization for Practicing Engineers, Barnes and
Noble, Inc. New York, (1971).
8. R.Fletcher and C.M.Reeves, "Function minimization by conjugate gradients," Computer J.,
vol.7, 149-154 (1964).
9. W.C.Davidon, "Variable metric method for minimization," AEC Res. Develop. Rep., ANL-599,
1959.
10. R.Fletcher and M.J.D. Powell, "A rapidly convergent descent method for minimization,"
Computer J., vol. 6, p.163 (1963).
11. A.Abou-Nasr and M.A.Sid-Ahmed, "LBAQ: A pattern recognition neural network that learns
by asking questions," Proceedings of 35th Mid-West Symposium, Washington, (1992).
12. J.A.Hartigan, Clustering Algorithms, John Wiley and Sons, New York (1949).
13. G.A.Carpenter, and S.Grossberg, "Neural dynamics of category learning and recognition:
attention memory consolidation, and amnesia," in J.Davis, R.Newburg, and E.Wegmen (Eds.)
Brain Structure, Learning, and Memory, AAAS Symposium Series, 1986.
14. John Gosch, "Color-recognition system distinguishes more colors, more accurately and faster,"
Electronic Design, A Penton publication, November 21, 1991, vol.39, No.22, pp.30-32.
15. Hu, M. K. [1962]. Visual Pattern Recognition by Moment Invariants, IRE Trans. Info.
Theory, vol. IT-8, pp. 179-187.