Image Processing Edited by Yung-Sheng Chen I m a ge Proce ssi n g Edited by Yung-Sheng Chen I-Tech Image Processing http://dx.doi.org/10.5772/122 Edited by Yung-Sheng Chen © The Editor(s) and the Author(s) 2009 The moral rights of the and the author(s) have been asserted. All rights to the book as a whole are reserved by INTECH. The book as a whole (compilation) cannot be reproduced, distributed or used for commercial or non-commercial purposes without INTECH’s written permission. Enquiries concerning the use of the book should be directed to INTECH rights and permissions department (permissions@intechopen.com). Violations are liable to prosecution under the governing Copyright Law. Individual chapters of this publication are distributed under the terms of the Creative Commons Attribution 3.0 Unported License which permits commercial use, distribution and reproduction of the individual chapters, provided the original author(s) and source publication are appropriately acknowledged. If so indicated, certain images may not be included under the Creative Commons license. In such cases users will need to obtain permission from the license holder to reproduce the material. More details and guidelines concerning content reuse and adaptation can be foundat http://www.intechopen.com/copyright-policy.html. Notice Statements and opinions expressed in the chapters are these of the individual contributors and not necessarily those of the editors or publisher. No responsibility is accepted for the accuracy of information contained in the published chapters. The publisher assumes no responsibility for any damage or injury to persons or property arising out of the use of any materials, instructions, methods or ideas contained in the book. First published in Croatia, 2009 by INTECH d.o.o. eBook (PDF) Published by IN TECH d.o.o. Place and year of publication of eBook (PDF): Rijeka, 2019. IntechOpen is the global imprint of IN TECH d.o.o. Printed in Croatia Legal deposit, Croatia: National and University Library in Zagreb Additional hard and PDF copies can be obtained from orders@intechopen.com Image Processing Edited by Yung-Sheng Chen p. cm. ISBN 978-953-307-026-1 eBook (PDF) ISBN 978-953-51-5848-6 Selection of our books indexed in the Book Citation Index in Web of Science™ Core Collection (BKCI) Interested in publishing with us? Contact book.department@intechopen.com Numbers displayed above are based on latest data collected. For more information visit www.intechopen.com 4,200+ Open access books available 151 Countries delivered to 12.2% Contributors from top 500 universities Our authors are among the Top 1% most cited scientists 116,000+ International authors and editors 125M+ Downloads We are IntechOpen, the world’s leading publisher of Open Access books Built by scientists, for scientists Meet the editor YUNG-SHENG CHEN was born in Taiwan, on 30 June 1961. He received BS degree from Chung Yuan Chris- tian University in 1983, and the MS and PhD degrees from National Tsing Hua University, Taiwan, in 1985 and 1989, respectively, all in electrical engineering. He received a Best Paper Award from the Chinese Institute of Engineers in 1989, and an Excellent Paper Award from the Chinese Biomedical Engineering Society in 1995, respectively. He is a member of the IEEE and IPPR of ROC. In 1991, he joined the Electrical Engineering Department of the Yuan-Ze Institute of Technology, Taoyuan, Taiwan, ROC, where he is now a Professor. Since 1998, his name is listed in the Who’s Who of the World. His interests include human visual percep- tion, neural model, fuzzy computing, computer vision, and circuit design. Preface Computers, imaging produces, electronic circuits, and software engineering have become very popular and common techniques in the modern society. We can find that there are more and more diverse applications of image processing in these technologies. Nowadays, multimedia applications occupy an important position in technology due to Internet development; however, the topics on image processing, which have been studied for near half a century, still remain tons of fundamentals worth in-depth researches. Generally speaking, developing image processing is aimed to meet with either general or specific needs. Specially, algorithm design is treated as the core topic of the image processing, whatever kinds of applications would benefit from good algorithms to achieve their desired goals. Besides, computer-aided diagnoses applied to medical imaging also plays an extremely significant role on the existing health care systems. Neural networks, fuzzy systems, and genetic algorithms are frequently applied to the variety of intelligent analyst applications. Speeding image processing hardware, especially, should take credit for solving problems with execution performance of appliance-based image processing as well. There are six sections in this book. The first section presents basic image processing techniques, such as image acquisition, storage, retrieval, transformation, filtering, and parallel computing. Then, some applications, such as road sign recognition, air quality monitoring, remote sensed image analysis, and diagnosis of industrial parts are considered. Subsequently, the application of image processing for the special eye examination and a newly three-dimensional digital camera are introduced. On the other hand, the section of medical imaging will show the applications of nuclear imaging, ultrasound imaging, and biology. The section of neural fuzzy presents the topics of image recognition, self-learning, image restoration, as well as evolutionary. The final section will show how to implement the hardware design based on the SoC or FPGA to accelerate image processing. We sincerely hope this book with plenty of comprehensive topics of image processing development will benefit readers to bring advanced brainstorming to the field of image processing. Editor Yung-Sheng Chen Yuan Ze University Taiwan, ROC Contents Preface IX 1. Image Acquisition, Storage and Retrieval 001 Hui Ding, Wei Pan and Yong Guan 2. Efficient 2-D DCT Computation from an Image Representation Point of View 021 G.A. Papakostas, D.E. Koulouriotis and E.G. Karakasis 3. Rank M-type Filters for Image Denoising 035 Francisco J. Gallegos-Funes and Alberto J. Rosales-Silva 4. Removal of Adherent Noises from Image Sequences by Spatio-Temporal Image Processing 059 Atsushi Yamashita, Isao Fukuchi and Toru Kaneko 5. Parallel MATALAB Techniques 077 Ashok Krishnamurthy, Siddharth Samsi and Vijay Gadepally 6. Feature Extraction and Recognition of Road Sign Using Dynamic Image Processing 095 Shigeharu Miyata, Akira Yanou, Hitomi Nakamura and Shin Takehara 7. Development of Low Cost Air Quality Monitoring System by Using Image Processing Technique 105 C.J. Wong, M.Z. MatJafri, K. Abdullah and H.S. Lim 8. Remote Sensed Image Processing on Grids for Training in Earth Observation 115 Dana Petcu, Daniela Zaharie, Marian Neagul, Silviu Panica, Marc Frincu, Dorian Gorgan, Teodor Stefanut and Victor Bacu XII 9. Ballistics Image Processing and Analysis for Firearm Identification 141 Dongguang Li 10. A Novel Haptic Texture Display Based on Image Processing 175 Juan Wu, Aiguo Song and Chuiguo Zou 11. Image Processing based Classifier for Detection and Diagnosis of Induction Motor Stator Fault 185 T. G. Amaral, V. F. Pires, J. F. Martins, A. J. Pires and M. M. Crisóstomo 12. Image Processing and Concentric Ellipse Fitting to Estimate the Ellipticity of Steel Coils 203 Daniel C. H. Schleicher and Bernhard G. Zagar 13. On the Automatic Implementation of the Eye Involuntary Reflexes Measurements Involved in the Detection of Human Liveness and Impaired Faculties 221 François Meunier, Ph. D., ing. 14. Three-Dimensional Digital Colour Camera 245 Yung-Sheng Chen, I-Cheng Chang, Bor-Tow Chen and Ching-Long Huang 15. Single Photon Emission Tomography (SPECT) and 3D Images Evaluation in Nuclear Medicine 259 Maria Lyra 16. Enhancing Ultrasound Images Using Hybrid FIR Structures 287 L. J. Morales-Mendoza, Yu. S. Shmaliy and O. G. Ibarra-Manzano 17. Automatic Lesion Detection in Ultrasonic Images 311 Yung-Sheng Chen and Chih-Kuang Yeh 18. Image Processing in Biology Based on the Fractal Analysis 323 István Sztojánov, Daniela Alexandra Cri ş an, C ă t ă lina Popescu Mina and Vasilic ă Voinea 19. Image Recognition on Impact Perforation Test by Neural Network 345 Takehiko Ogawa 20. Analog-Digital Self-Learning Fuzzy Spiking Neural Network in Image Processing Problems 357 Artem Dolotov and Yevgeniy Bodyanskiy XIII 21. Multichannel and Multispectral Image Restoration Employing Fuzzy Theory and Directional Techniques 381 Alberto Rosales and Volodymyr Ponomaryov 22. Fast Evolutionary Image Processing using Multi-GPUs 403 Jun Ando and Tomoharu Nagao 23. Image Processing: Towards a System on Chip 415 A. Elouardi, S. Bouaziz, A. Dupret, L. Lacassagne, J.O. Klein and R. Reynaud 24. Acquisition and Digital Images Processing, Comparative Analysis of FPGA, DSP, PC for the Subtraction and Thresholding. 437 Carlos Lujan Ramirez, Ramón Atoche Enseñat and Francisco José Mora Mas 25. Hardware Architectures for Image Processing Acceleration 457 Almudena Lindoso and Luis Entrena 26. FPGA Based Acceleration for Image Processing Applications 477 Griselda Saldaña-González and Miguel Arias-Estrada 27. An FPGA-based Topographic Computer for Binary Image Processing 493 Alejandro Nieto, Víctor M. Brea and David L. Vilariño 1 Image Acquisition, Storage and Retrieval Hui Ding, Wei Pan and Yong Guan Capital Normal University China 1. Introduction In many areas of commerce, government, academia, hospitals, and homes, large collections of digital images are being created. However, in order to make use of it, the data should be organized for efficient searching and retrieval. An image retrieval system is a computer system for browsing, searching and retrieving images from a large database of digital images. Due to diversity in content and increase in the size of the image collections, annotation became both ambiguous and laborious. With this, the focus shifted to Content Based Image Retrieval (CBIR), in which images are indexed according to their visual content. The chapter will provide mathematical foundations and practical techniques for digital manipulation of images; image acquisition; image storage and image retrieval. Image databases have particular requirements and characteristics, the most important of which will be outlined in this Section. 1.1 The description of CBIR Content Based Image Retrieval or CBIR is the retrieval of images based on visual features such as colour, texture and shape (Michael et al., 2006). Reasons for its development are that in many large image databases, traditional methods of image indexing have proven to be insufficient, laborious, and extremely time consuming. These old methods of image indexing, ranging from storing an image in the database and associating it with a keyword or number, to associating it with a categorized description, have become obsolete. This is not CBIR. In CBIR, each image that is stored in the database has its features extracted and compared to the features of the query image. It involves two steps (Khalid et al., 2006): • Feature Extraction: The first step in the process is extracting image features to a distinguishable extent. • Matching: The second step involves matching these features to yield a result that is visually similar. Many image retrieval systems can be conceptually described by the framework depicted in Fig. 1. The user interface typically consists of a query formulation part and a result presentation part. Speci cation of which images to retrieve from the database can be done in many ways. One way is to browse through the database one by one. Another way is to specify the image in terms of keywords, or in terms of image features that are extracted from the image, such as a color histogram. Yet another way is to provide an image or sketch from which features Image Processing 2 of the same type must be extracted as for the database images, in order to match these features. A nice taxonomy of interaction models is given in (Vendrig, 1997). Relevance feedback is about providing positive or negative feedback about the retrieval result, so that the systems can re ne the search. Fig. 1. Content-based image retrieval framework 1.2 A short overview Early reports of the performance of Content based image retrieval (CBIR) systems were often restricted simply to printing the results of one or more example queries (Flickner et al., 1995). This is easily tailored to give a positive impression, since developers can chooses queries which give good results. It is neither an objective performance measure, nor a means of comparing different systems. MIR (1996) gives a further survey. However, few standard methods exist which are used by large numbers of researchers. Many of the measures used in CBIR (such as precision, recall and their graphical representation) have long been used in IR. Several other standard IR tools have recently been imported into CBIR. In order to avoid reinventing pre-existing techniques, it seems logical to make a systematic review of evaluation methods used in IR and their suitability for CBIR. CBIR inherited its early methodological focus from the by then already mature field of text retrieval. The primary role of the user is that of formulating a query, while the system is given the task of finding relevant matches. The spirit of the time is well captured in Gupta and Jain’s classic review paper from 1997 (Gupta & Jain, 1997) in which they remark that “an information retrieval system is expected to help a user specify an expressive query to locate relevant information.” By far the most commonly adopted method for specifying a query is to supply an example image (known as query by example or QBE), but other ways have been explored. Recent progress in automated image annotation, for example, reduces the problem of image retrieval to that of standard text retrieval with users merely entering search terms. Whether this makes query formulation more intuitive for the user remains to be seen. In other systems, users are able to draw rough sketches possibly by selecting and combining visual primitives (Feng et al., 2004; Jacobs et al., 1995; Smith & Chang, 1996). Content-based image retrieval has been an active research area since the early 1990’s. Many image retrieval systems both commercial and research have been built. Image Acquisition, Storage and Retrieval 3 The best known are Query by Image Content (QBIC) (Flickner et al., 1995) and Photo-book (Rui et al., 1997) and its new version Four-Eyes. Other well-known systems are the search engine family Visual-SEEk, Meta-SEEk and Web-SEEk (Bach et al., 1996), NETRA, Multimedia Analysis and Retrieval System (MARS) (Honkela et al., 1997). All these methods have in common that at some point users issue an explicit query, be it textual or pictorial. This division of roles between the human and the computer system as exempli ed by many early CBIR systems seems warranted on the grounds that search is not only computationally expensive for large collections but also amenable to automation. However, when one considers that humans are still far better at judging relevance, and can do so rapidly, the role of the user seems unduly curtailed. The introduction of relevance feedback into image retrieval has been an attempt to involve the user more actively and has turned the problem of learning feature weights into a supervised learning problem. Although the incorporation of relevance feedback techniques can result in substantial performance gains, such methods fail to address a number of important issues. Users may, for example, not have a well-de ned information need in the rst place andmay simply wish to explore the image collection. Should a concrete information need exist, users are unlikely to have a query image at their disposal to express it. Moreover, nearest neighbour search requires ef cient indexing structures that do not degrade to linear complexity with a large number of dimensions (Weber et al., 1998). As processors become increasingly powerful, and memories become increasingly cheaper, the deployment of large image databases for a variety of applications have now become realisable. Databases of art works, satellite and medical imagery have been attracting more and more users in various professional fields. Examples of CBIR applications are: • Crime prevention: Automatic face recognition systems, used by police forces. • Security Check: Finger print or retina scanning for access privileges. • Medical Diagnosis: Using CBIR in a medical database of medical images to aid diagnosis by identifying similar past cases. • Intellectual Property: Trademark image registration, where a new candidate mark is compared with existing marks to ensure no risk of confusing property ownership. 2. Techniques of image acquire Digital image consists of discrete picture elements called pixels. Associated with each pixel is a number represented as digital number, which depicts the average radiance of relatively small area within a scene. Image capture takes us from the continuous-parameter real world in which we live to the discrete parameter, amplitude quantized domain of the digital devices that comprise an electronic imaging system. 2.1 Representations for the sampled image Traditional image representation employs a straightforward regular sampling strategy, which facilitates most of the tasks involved. The regular structuring of the samples in a matrix is conveniently simple, having given rise to the raster display paradigm, which makes this representation especially efficient due to the tight relationship with typical hardware. The regular sampling strategy, however, does not necessarily match the information contents of the image. If high precision is required, the global sampling resolution must be increased, often resulting in excessive sampling in some areas. Needless to say, this can Image Processing 4 become very inefficient, especially if the fine/coarse detail ratio is low. Many image representation schemes address this problem, most notably frequency domain codifications (Penuebaker & Mitchell, 1993; Froment & Mallat, 1992), quad-tree based image models (Samet, 1984) and fractal image compression (Barnsley & Hurd, 1993). Sampling a continuous-space image ( , ) c g x y yields a discretespace image: ( , ) ( , ) d c g m n g mX nY = (1) where the subscripts c and d denote, respectively, continuous space and discrete space, and ( , ) X Y is the spacing between sample points, also called the pitch. However, it is also convenient to represent the sampling process by using the 2-D Dirac delta function ( , ) x y δ In particular, we have from the sifting property of the delta function that multiplication of ( , ) c g x y by a delta function centered at the fixed point 0 0 ( , ) x y followed by integration will yield the sample value 0 0 ( , ) c g x y , i.e., 0 0 0 0 ( , ) ( , ) ( , ) c c g x y g x y x x y y dxdy δ = − − ∫∫ (2) Provided ( , ) c g x y is continuous at 0 0 ( , ) x y . It follows that: 0 0 0 0 0 0 ( , ) ( , ) ( , ) ( , ) c c g x y x x y y g x y x x y y δ δ − − ≡ − − (3) that is, multiplication of an impulse centered at 0 0 ( , ) x y by the continuous-space image ( , ) c g x y is equivalent to multiplication of the impulse by the constant 0 0 ( , ) c g x y . It will also be useful to note from the sifting property that: 0 0 0 0 ( , ) ( , ) ( , ) c c g x y x x y y g x x y y δ ∗ − − = − − (4) That is, convolution of a continuous-space function with an impulse located at 0 0 ( , ) x y shifts the function to 0 0 ( , ) x y To get all the samples of the image, we define the comb function: , ( , ) ( , ) X Y m n comb x y x mX y nY δ = − − ∑ ∑ (5) Then we define the continuous-parameter sampled image, denoted with the subscript s , as , ( , ) ( , ) ( , ) ( , ) ( , ) s c X Y d m n g x y g x y comb x y g x y x mX y nY δ = = − − ∑∑ (6) We see from Eq. (6) that the continuous- and discrete-space representations for the sampled image contain the same information about its sample values. In the sequel, we shall only use the subscripts c and d when necessary to provide additional clarity. In general, we can distinguish between functions that are continuous space and those that are discrete space on the basis of their arguments. We will usually denote continuous-space independent variables by ( x,y ) and discrete-space independent variables by ( m,n ). 2.2 General model for the image capture process Despite the diversity of technologies and architectures for image capture devices, it is possible to cast the sampling process for all of these systems within a common framework. Image Acquisition, Storage and Retrieval 5 Since feature points are commonly used for alignment between successive images, it is important to be aware of the image blur introduced by resampling. This manifests itself and is conveniently analysed in the frequency domain representation of an image. The convenience largely arises because of the Convolution Theorem (Bracewell, 1986) whereby convolution in one domain is multiplication in the other. Another technique used is to work in the spatial domain by means of difference images for selected test images. This technique is less general, though careful construction of test images can be helpful. In (Abdou & Schowengerdt, 1982), the question of the response to differential phase shift in the image was considered in the spatial domain. That study, though thorough, was concerned with bi- level images and used a restricted model for the image capture process. 2.3 Image decimation and interpolation Interpolation and decimation are, respectively, operations used to magnify and reduce sampled signals, usually by an integer factor. Magnification of a sampled signal requires that new values, not present in the signal, be computed and inserted between the existing samples. The new value is estimated from a neighborhood of the samples of the original signal. Similarly, in decimation a new value is calculated from a neighborhood of samples and replaces these values in the minimized image. Integer factor interpolation and decimation algorithms may be implemented using efficient FIR filters and are therefore relatively fast. Alternatively, zooming by noninteger factors typically uses polynomial interpolation techniques resulting in somewhat slower algorithms. 2.3.1 Downsampling and decimation Decimation is the process of filtering and downsampling a signal to decrease its effective sampling rate, as illustrated in Fig. 2. To downsample a signal by the factor N means to form a new signal consisting of every Nth sample of the original signal. The filtering is employed to prevent aliasing that might otherwise result from downsampling. Fig. 2. Downsampling by the factor N Fig. 2. shows the symbol for downsampling by the factor N . The downsampler selects every Nth sample and discards the rest: = ∈ , ( ) ( ) ( ), N n y n Downsam p le x x Nn n Z (7) In the frequency domain, we have π − − = = ∈ ∑ 2 1 1 , 0 1 ( ) ( ) ( ), N N N jm N n m Y z ALIAS x X z e z C N (8) Thus, the frequency axis is expanded by factor N , wrapping N times around the unit circle, adding to itself N times. For N =2, two partial spectra are summed, as indicated in Fig. 3. Using the common twiddle factor notation: π − 2 j N N W e (9) the aliasing expression can be written as : Image Processing 6 − = = ∑ 1 1 0 1 ( ) ( ) N N m N m Y z X W z N (10) Fig. 3. Illustration of 2 A LLAS in frequency domain 2.3.2 Upsampling and Interpolation The process of increasing the sampling rate is called interpolation. Interpolation is upsampling followed by appropriate filtering. ( ) y n obtained by interpolating ( ) x n , is generally represented as: Fig. 4. Upsampling by the factor N ( ) ( ) ( ), N y n STRETCH x x Nn n Z = ∈ (11) Fig. 4 shows the graphical symbol for a digital upsampler by the factor N . To upsample by the integer factor − 1 N , we simply insert zeros between ( ) x n and + ( 1) x n for all n . In other words, the upsampler implements the stretch operator defined as : ⎧ = ⎨ ⎩ , ( / ), ( ) ( ) 0, n N N n x n N y n STRETCH x otherwize (12) In the frequency domain, we have, by the stretch (repeat) theorem for DTFTs: = ∈ , ( ) ( ) ( ), N N n Y z REPEAT X X z z C (13) Plugging in = j w z e , we see that the spectrum on π π − [ , ) contracts by the factor N , and N images appear around the unit circle. For = 2 N , this is depicted in Fig. 5. Fig. 5. Illustration of 2 ALLAS in frequency domain For example, the down sampling procedure keeps the scaling parameter constant (n=1/2) throughout successive wavelet transforms so that it benefits for simple computer implementation. In the case of an image, the filtering is implemented in a separable way by