BookPDF Available

Algorithms of Digital Image Processing and Pattern Recognition

Authors:

Abstract

This book is based on the class notes of the course on Digital Image Processing (DIP) given by Prof. Javier Montenegro Joo (JMJ) to Science and Engineering graduate-level students. The algorithms presented in this book include those that the author implements as computer programs when working on Computer Vision, specifically in Automatic Pattern Recognition. The author is a university lecturer and an experienced developer of Science and Engineering Virtual Labs dealing with Physics, Mathematics, DIP, etc. In his software developments the author applies many techniques of mathematical modeling, computer visualization and DIP. JMJ has executed research on invariant pattern recognition, which mainly includes invariant moments, neural networks, and polar Hough transform and, some of those results have been included in this book, which is addressed to university students taking a course on DIP, though it may be used as well by any person desiring to know about DIP and Pattern Recognition. This book includes flowcharts of some DIP algorithms, thus making it ideal for those readers who are inclined to algorithm development and, who would like to develop their own computer programs.
Contents
1. Introduction
7
2. Applications of Digital Image Processing
7
3. Examples of situations that demand an efficient DIP
8
4. Images from the point of view of the DIP
9
5. Binary, grey level and color images
10
6. Conversion of Colour to Grey-level images
11
7. Digitization
16
8. Pixels and Neighborhoods
16
9. Geometric Transformations on Images
17
10. Centroid of a polygon
21
11. Rotating a polygon about its Centroid
21
12. Problems generated by discretization
22
13. Straight lines in Digital Image Processing
23
14. Variation of Darkness and Brightness in an image
24
15. Image Colour Inversion
25
16. Rotating and Flipping images
26
17. Image subtraction
27
18. Image Segmentation
27
19. The Wrap-to-Segment algorithm
29
20. Histograms
33
21. Process to obtain the histogram of grey levels
34
22. Histogram Equalization
35
23. Histograms of colour Images
36
24. Histogram-based Binarization of Grey-Levelled Images
38
25. Thresholded Binarization
39
26. Weighted Average Grey-level
41
27. Heuristic Thresholding
41
28. Boundary (Edge) Detection of Binary Images
42
29. Algorithm to identify edge pixels in a binary image
43
30. Detection of edges through Histogram thresholding
44
31. Spatial Operators, Box Filters, Windows, Templates and Masks
46
32. High-pass and Low-pass filters and Median Filters
51
33. User defined convolution filters
52
34. Smoothing Filters
53
35. Noise-Reduction Median Filters
55
36. Unsharp Masking Filter
57
37. Detection of Discontinuities in Digital Images, Detection of Dots
58
38. Detection of Line Orientation
60
39. Detection of Edges
61
40. Edge Detection by First Derivatives and by Gradient
63
41. Edge Enhancement by Gradient. The Sobel Operators
65
42. The Generalized Sobel Operators
68
43. Edge Detection with the Laplacian
68
44. The High-boost Filter
70
45. Image Dilation & Erosion
72
46. Opening & Closing
75
47. Thresholded Image Difference and Controlled Image Fusion
76
48. Controlled Image Fusion
77
49. Image Fusion by Weighted Average of two input images
79
50. Ignoring a color during Image Fusion
81
51. Pattern Recognition
86
52. Computer Vision
87
53. Signatures: Pattern Centroidal Profile Representation
88
54. The Invariant Moments
91
55. The M. K. Hu’s Massive Invariant Moments
91
56. The C.C. Chen’s Boundary Invariant Moments
97
57. The Polar Hough Transform
106
58. References
117
References
This Digital Image Processing course is based on the following material:
[1] Ming-Kuei Hu, Pattern recognition by moment invariants, Proceedings of the IRE, vol
49, page 1428, sept 1961
[2] Ming-Kuei Hu, Visual Pattern recognition by moment invariants, IRE Transactions on
information theory, 179-187, Feb-1962
[3] Chaur-Chin Chen, Improved moment invariants for shape discrimination, Pattern
recognition, Vol 26, No 5, 683-686, 1993
[4] Montenegro Joo, J., Invariant Boundary moments in Pattern Recognition. The method
of C.C. Chen. Doctoral Qualification Exam (April 1994). Cybernetic Vision Research
Group, Instituto de Física de Sao Carlos (IFSC), Dpto.de Física e Informática,
Universidade de Sao Paulo (USP), Brazil.
[5] Bing-Chen Li and Jun Shen, Fast computation of moment invariants. Pattern
Recognition, Vol 24, No 8, 807-813, 1991
[6] Mark H. Singer, A general approach to moment calculation for polygons and line
segments. Pattern Recognition, Vol 26, No 7, 1019-1028, 1993
[7] X.Y. Jiang and H. Bunke, Simple and fast computation of moments. Pattern
recognition, Vol 24 No 8, 801-806, 1991
[8] Jia-Guu Leu, Computing a shape's moments from its boundary. Pattern recognition, Vol
24 No 10, 949-957, 1991
[9] S. Dudani, K. Breeding, R. McGhee, Aircraft identification by moment invariants. IEEE
transactions on computers, vol C26, No 1, Jan 1977
[10] Z. Mingfa, S. Hasani, S. Bhattarai, H. Singh, Pattern recognition with moment
invariants on a machine vision system. Pattern Recognition Letters, Vol 19, 175-180, April
1989
[11] C.W. Fu, J.C. Yen, S.Chang, Calculation of moment invariant via Hadamard
transform. Pattern Recognition, Vol 26, No 2, 287-294, 1993
[12] W. Wen, A. Lozzi, Recognition and inspection of manufactured parts using line
moments of their boundaries. Pattern recognition, Vol 26, No 10, 1461-1471, 1993
[13] J. Illingworth J. & J. Kittler, (1988) - A survey of the Hough transform. CVGIP, 44.
[14] R. Krishnapuram and D. Casasent, (1987) Hough space transformations for
discrimination and distortion estimation. Computer Vision, Graphics and Image Processing,
CVGIP, Vol 38
[15] P.K. Sinha., F.Y. Chen, R.E.N. Horne, (1993) Recognition and location of shapes in
the Hough pattern space. IEE Electronics Div. Colloquium on Hough Transform,
1993/106, Savoy Place, London.
[16] G. Gerig and F. Klein, (1986) Fast contour identification through efficient Hough
transform and simplified interpretation strategy. IJCPR-8 Paris
[17] L. da F. Costa, Montenegro Joo J., and R. Koberle (1993) Distance-Discriminator
Neural Networks for Classification and Pattern Recognition. Anais do Sibgrapi.
[18] Montenegro Joo, J., L. da Fontoura Costa, R. Koberle, (1993) Geometric
Transformation-Invariant Pattern Recognition with Hough Transforms and Distance-
Discriminator Neural Networks. Workshop sobre Computação de Alto Desempenho para
Procesamento de Sinais.
[19] Montenegro Joo J., (1998) A Polar-Hough-Transform Based Algorithm for the
Translation, Orientation and Size-Scale Invariant Pattern Recognition of Polygonal Objects.
UMI Dissertation Microform, LD03769.
[20] Montenegro Joo, J. (1994), Geometric-Transformations Invariant Pattern Recognition
in the Hough Space, Doctoral Degree Project. Cybernetic Vision Research Group, Instituto
de Física de Sao Carlos (IFSC), Dpto. de Física e Informática, Universidade de Sao Paulo
(USP), Sao Carlos, SP, Brazil.
[21] Montenegro Joo, J. (2002), Invariant Recognition of Rectangular Biscuits through an
Algorithm Operating exclusively in Hough Space. Flawed Pieces Detection. Revista de
Investigación de Física, RIF-UNMSM, Vol 5.
[22] Montenegro Joo, J., (2005), Improved Moment Invariants Know How, Why and
When, RIF-UNMSM., Vol. 8, No 2
[23] Montenegro Joo, J., (2003) Improved-Invariant-Edge Moments Without Object-Edge
Tracing. Electronica UNMSM, No 12, Dec. 2003
[24] Montenegro Joo, J., (2005) Knowing-How on Boundary Geometric Moments. Revista
de Electronica, 16, UNMSM.
[25] Montenegro Joo, J. (2006), Boundary Geometric Moments and its application to
automatic quality control in the Industry, Industrial Data, 9(1).
[26] Montenegro Joo, J, (2006), Hough-Transform based algorithm for the automatic
invariant recognition of rectangular chocolates. Detection of defective pieces, Industrial
Data, 9(2).
[27] Montenegro Joo, J. (2007), Hough-Transform based Automatic Invariant Recognition
of Metallic Corner-Fasteners, Industrial Data, Vol. 10(1).
[28] Montenegro Joo, J. (2007), Automatic Classification of Products in the Industry via
Invariant Boundary Moments. Industrial Data, 10(2).
[29] Montenegro Joo, J. (2010), Image Segmentation through Encapsulation of its
Constituents, Industrial Data, 13(1).
[30] Cheng C H, Pau L F, Wang P S P, (1993), Handbook of Pattern Recognition and
Computer Vision, World Sci. Publ. Co.
[31] Gonzales R Woods R, (1993) Digital Image Processing,, Addison Wesley.
[32] Gonzales R, Woods R, (2008), Digital Image Processing (PearsonPrentice Hall),
USA.
[33] Gonzales R, Woods R, (1992), Digital Image Processing (Addison - Wesley), USA.
[34] Schalkoff R. J, (1989), Digital Image Processing and Computer Vision, Willey, USA.
[35] Jhane B, (1995) Digital Image Processing, Springer-Verlag, USA.
[36] Jhane B., (2004), Practical handbook on image processing for scientific and technical
applications, CRC Press, USA.
[37] Montenegro Joo J, (2006) Imagery: Virtual Lab for Computer-Aided training on
Digital Image Processing. RISI, Vol. 3, No 4.
[38] Montenegro Joo J, (2009) Imagery 37: Digital Image Processing Virtual Lab., Fifth
International Conference on Multimedia and ICT in Education (m-ICTE 2009), Lisboa,
Portugal.
[39] Montenegro Joo, J. , Class notes of computer assisted course on Digital Image
Processing with the “Imagery” EduVirtualLab.
ResearchGate has not been able to resolve any citations for this publication.
Article
Full-text available
La Transformada de Hough (TH) ha sido usada para crear un algoritmo de reconocimiento invariante (rotación, traslación y cambio de escala) de objetos poligonales. En esta investigación, el sistema desarrollado ha sido exitosamente aplicado al reconocimiento automático invariante de chocolates rectangulares, incluyendo la identificación de piezas falladas. Como la ejecución total del sistema resultante es totalmente autónoma, los resultados pueden ser aplicados al control automático de calidad en aplicaciones industriales.
Article
Full-text available
Imagery is an intuitively-easy-to-use Virtual Lab to be used as a Digital Image Processing (DIP) laboratory, allowing the user to experiment with DIP algorithms, enabling him to see their effects on images included by its author and also on those of the user. Research papers and books on DIP deal with algorithms to digitally operate on images, and generally some images to show the effects of those algorithms are included; however most times those images are not enough to make evident all the potential of the algorithms. Reflecting the specialization field if its author, Imagery includes some modules dealing with algorithms used in Invariant Pattern Recognition. In this paper the creation of Imagery, a Virtual Lab for Computer Assisted Education (teaching and learning) of DIP is reported. Imagery may be used in the classroom, in the lab and at home. The advantage of using software to teach (learn) a given image transformation like those performed in DIP, is that with the help of the software the transformations can be appreciated in real time, control parameters can be varied and the corresponding effects appreciated. Even though the author has included some supporting theory in the software, Imagery is a very useful complement to a specialized textbooks and classes.
Article
Full-text available
A comprehensive study of the C.C. Chen's Improved Moment Invariants is presented. The Chen's Moments, a set of Invariant Moments to be evaluated on the object border pixels, have been scrupulously analysed and their performance compared to that of the traditional (Massive) Moments; the pattern recognition power of the former is thoroughly assessed against that of the latter. The Chen's moments are evaluated by two methods, in the first by edge-tracing, in the second, the edge pixels are considered as they are met when sweeping the image space, and it is found that the boundary moments produce the same numerical results with the two methods. It is also found that the average "distance" between a template and trial samples for massive and boundary moments produce approximate values, which means that these two pattern recognition algorithms are equivalent concerning accurateness. It is concluded that the computation of the Chen's Boundary Moments by sweeping the image space associates minimum computational complexity to a high enough object classification efficiency, thus they may be used in lieu of the traditional (Massive) moments, which are more demanding in terms of computational resources (complexity and time). Since this research verifies that it is not necessary to calculate the Chen's (boundary) Moments by walking along the border of objects –as suggested by their creator-but simply sweeping the image space, this study embraces also their application to hollowed objects and, it is experimentally established that pattern classification of this kind of objects may also be successfully achieved with the boundary moments. Resumen Se presenta un estudio detallado de los Momentos Invariantes Mejorados de C. C. Chen. Los Momentos de Chen, un conjunto de momentos invariantes que se evalúan sobre los pixels de borde de los objetos, ha sido cuidadosamente analizado y su desempeño comparado con aquel de los momentos (masivos) tradicionales; el poder de reconocimiento de patrones de los primeros es cabalmente medido con relación a los últimos. Los momentos de Chen son evaluados mediante dos métodos, primero, rastreando los bordes, y después, los pixeles de borde son considerados al tiempo que ellos son detectados al barrer el espacio imagen. Se encuentra que los momentos de borde producen los mismos resultados numéricos mediante ambos métodos. También se encuentra que la " distancia " promedio entre un modelo y las muestras, producen resultados aproximados, para los momentos masivos y los de borde. Esto implica que ambos métodos son equivalentes en lo que respecta a exactitud. Se concluye que el cálculo de los momentos de borde de Chen mediante barrido de imagen, asocia una complejidad computacional mínima a una alta eficiencia para clasificar objetos, de modo que ellos pueden ser usados en lugar de los momentos masivos tradicionales, los cuales demandan más en términos de recursos computacionales (complejidad y tiempo). Ya que esta investigación verifica que no es necesario calcular los momentos de borde de Chen mediante desplazamiento a lo largo de los bordes, tal como es sugerido por su creador, sino simplemente barriendo el espacio imagen, esta investigación incluye su aplicación a objetos con cavidades, y se establece experimentalmente que la clasificación de este tipo de objetos puede llevarse a cabo exitosamente con los momentos de borde.
Article
Full-text available
Invariant Recognition of Rectangular Biscuits through an Algorithm Operating Exclusively in Hough Space. Flawed Pieces Detection. An Algorithm based on the polar Hough Transform has been developed so as to carry out rotation, translation and size-scaling invariant pattern recognition. The algorithm exploits the fundamental properties of the HT and all the required operations take place strictly in Hough space. The developed system has been successfully applied to the recognition of biscuits in the form of rectangular crackers, including flawed pieces, which were easily discriminated against by the algorithm. The results suggest the possibility of an industrial application of this algorithm particularly in industrial quality control.
Conference Paper
Full-text available
Digital Image Processing (DIP) exploits the algorithms and techniques developed to transform and to extract information from images and, Imagery is an intuitively-easy-to-use DIP virtual lab conceived as a teaching-and-learning tool, it is based on several textbooks and research papers on DIP. This software may be used by supervised students (in a computer room with an instructor), by unsupervised ones (studying by themselves or under distance learning programs) and by people who enjoy investigating and acquiring expertise at their own pace. Originally Imagery was a teaching tool used by its creator to teach Digital Image Processing at the university, but at the request of the students, this software became also a learning tool used out of the classroom; in this way Imagery became an educational software used as a teaching and learning aid in the classroom and out of it. Even though DIP is a rather highly technical area, there are out-of-school people interested in the potentials of this field, these may also use Imagery to get familiar with DIP. Modules in Imagery are based on the mathematical algorithms and techniques devised to transform and extract information from images, and they include a concise theory. Imagery is highly friendly, it constitutes a foolproof environment for learning, this with the aim on avoiding erroneous button clicks and wrong data input. No user manual is required, the easiness of use and didactic of Imagery encourages learning not only by students but also by amateurs. Imagery allows the user to apply an algorithm to an image and to maintain the resulting image on screen for comparison with other images resulting of changing parameters to the same algorithm. The 37 modules currently included in Imagery are: (1) Color synthesis, (2) RGB color mixing, (3) Color to grey-level transform, (4) Straight line, (5) Geometrical transforms: Translation, (6) Rotation, (7) Size scaling, (8) Shearing, (9) Image transforms, (10) Image subtraction, (11) Modulated image fusion, (12) Pattern Centroidal Profile, (13) Point and small hole detection masks, (14) Line detection masks, (15) Binary image edge detector, (16) Histograms, (17) Binarization of grey-level images, (18) Histogram-assisted edge detection, (19) Erosion, (20) Dilation, (21) Binary image segmentation, (22) High Boost filter, (23) Edge enhancement by first derivatives and gradient, (24) Operators: Roberts, (25) Prewitt, (26) Sobel, (27) Generalized Sobel, (28) Laplacian edge enhancement, (29) Edge direction detection through Gradient, (30) Convolution filters, (31) User-defined convolution filters, (32) Sharpening filters, (33) Noise-reduction Median filter, (34) Massive RTS-invariant moments, (35) Boundary RTS-invariant moments, (36) Polar Hough transform, (37) Hough-Transform-based line detection
Article
Full-text available
An algorithm to carry out segmentation of binary images has been developed and applied to computer synthesized images. The algorithm is based on surrounding image elements with different wrappings or capsules, which afterwards are individually extracted. The proposed algorithm may be used in pattern recognition and also in industrial automatization, for instance, to calculate the area of objects in an image.
Article
Full-text available
IMPROVED-INVARIANT-EDGE MOMENTS WITHOUT OBJECT-EDGE TRACING It is pointed out the fact that after discretizing the Chen’s Improved (Edge) moments line integral, it is no more necessary to maintain the restriction of computing it by edge-tracing the contour over which the integral is to be evaluated, as the original algorithm states. In practice, walking along the object contour (edge-tracing) and simply sweeping the image space, where the object is, yields exactly the same numerical results. The chain code representation of the shape contour suggested by Chen in order to evaluate the improved moments is not necessary at all. Also in this work the pattern recognition power of the improved edge moments is assessed against that of the original Hu’s massive moments, it is concluded that the former are more advantageous than the latter.
Article
Full-text available
The technique of the Invariant Boundary Moments (IBM) is applied to the automatic classification of two different randomly selected objects, independently of their size, position and orientation. It is shown that if the objects differ only in position and orientation (size is maintained), the power of the IBM is optimum; however when variations in size are included, overlapping results in the IBM show up, placing strong limitations to their use as a classifier tool, in cases like these a pre-defined margin of tolerance must be introduced.
Article
Full-text available
The Polar Hough Transform has been used to create a system for rotation, translation and size-scaling automatic invariant pattern recognition of polygonal objects, and it has been successfully applied to the invariant recognition of L-shaped metallic corner-fasteners. Since the performance of the developed system is autonomous it may be applied to automatic quality control and automatic classification in the industry.