This book presents various algorithms used for the implementation of image processing programs in Java. The difference between this book and other image processing books is that it is written in Java.
Why Should I Care About Java?
The Java difference is: the image processing programs in this book are as portable as the Java virtual machine. All the software has been tested on Suns, Macs and Windows 95,98 and NT. The compile-once run-anywhere mantra means that we are no longer tied to expensive workstations (or a single development platform) for distributing our image processing algorithms. Research will be advanced as we emerge from the software Tower of Babel. It is now possible to perform the most elementary of laboratory behavior (i.e., repeat the experiment and duplicate the results) with a click of the mouse! People have tried to build portable GUI-based systems in the past [Watson]. But none have caught on like Java.
This book presents an object-oriented image processing program and, as such, may be the first book of its kind. It is certainly the first image processing book on Java that I know of.
Who Should Read This Book?
This book was written for the professional and the student. This book assumes some mathematical maturity in the reader. Elementary linear algebra and a first college calculus course should hold the reader in good stead. This book also assumes that the reader has some background in Java. The foundation upon which the book is built would require some detailed knowledge of the Java AWT. However, it is possible for the reader to ignore the low-level coding details and simply make use of the high-level classes. In this way, seasoned image-processing programmers can ease their introduction to Java. To further ease the transition, I have attempted to make the image processing code look as readable as possible. In the trade-off between clarity and speed, I have selected clarity. Speed, via optimization, will come as the code is transitioned to the new Java advanced imaging package (Early Release 1 has only just come out!).
Why Not Use the Advanced Imaging Package?
As of this writing, there are compelling reasons not to use the JAI ;(Java Advanced Imaging) package. One reason is that the package has a native implementation. As a result, there is no reference Java source code available (this is important for those who like to do research and or tinker). Use of the JAI (Java Advanced Imaging) package means that the Java will only run on Windows or Sun systems (i.e., no Macs, No SGIs, etc.). Take heart, however, as this situation may change soon. These are implementation quips; the algorithms for the image processing will continue to have currency. Also, teachable/understandable source code has value (particularly when compared with having no source code at all).
Full source code is disclosed for the entire book. It is possible to get the code and use it without reading the book. This is probably a big waste of your time! The book is reasonably priced and documents the code in detail. In any case, the publisher and I will thank you for buying a copy!!
Once the advanced imaging package is made available, the low-level code will probably change. I shall attempt to keep the API presented in this book as stable as possible, and this should help to protect the time we invest in the development of image processing software. My goal is to never deprecate my own API, if at all possible. Sun, on the other hand, deprecates APIs regularly. I deprecate the practice of deprecation! ;)
This Is Not Just a Textbook
This is not just a textbook, yet it has many attributes of a textbook. For example, some chapters have suggested projects at the end. Some of these projects make for a fine homework assignment. Others could be used for a term project. The more advanced ones explore topics of current research. The projects cover topics that I would have addressed myself, if time and space permitted.
The reason that this is not just a textbook is that it contains a great deal of how-to material and serves as a practicum of image processing. In fact, all the algorithms described in this book are implemented and working (except for those listed in the Project sections at the back of the chapters).
What Chapters Do I Need to Read?
This book contains 15 chapters. Several of them are self-contained. Some are needed in order to provide a basic foundation in the Java software.
Chapter 1 is an elaboration of some of the points raised in this preface. We can consider this preface to be the executive summary of Chapter 1 and the rest of the book.
Chapter 2 provides information about event processing and it is central to the understanding of the event processing program used in the book code (called Kahindu). So, skim or skip Chapter 1, but Chapter 2 is important! Kahindu is a region in Kenya, known for its fine AA coffee.
Chapter 3 gives the basics for image display and processing within the Kahindu program. In many ways it is even more important that Chapter 2 in understanding the Kahindu model of image processing. Thus Chapters 2 and 3 should be read, and in that order.
Appendix B is an optional next read. Appendix B discusses the finer points of the interface design and icon construction. It is good for those who want to emphasize Java interface design and understand the inner workings of the Kahindu program.
Chapter 4 introduces histograms and histogram equalizations. This chapter may be skipped or delayed. It is designed to give a basic introduction to image processing by example.
Chapter 5 introduces many image processing concepts, including transform theory. It is important to the understanding of Chapters 8, 9, 10 and 15. It should probably not be skipped.
Chapter 6 is needed for an understanding of Chapters 7 and 15. It covers streams in Java and is very Java-oriented.
Chapter 7 speaks about the detail of writing various image file formats. It is important to cover some of Chapter 7 in order to understand the code in Chapter 15.
Chapter 8 covers convolution using direct methods. Coverage of Chapter 8 is central to an understanding of Chapter 9.
Chapter 9 covers applications of convolution to perform filtering. This could have been integrated with Chapter 10, but the applications of convolution grew too numerous to be contained in one chapter. Reading Chapter 9 will help with understanding Chapter 10.
Chapter 10 covers edge detection. This chapter could be skipped, particularly if there is little time or interest in the edge detection topic. However, it is better to read Chapter 10 after Chapter 9 and before Chapter 15.
Chapter 11 covers morphological filtering. This topic is not central for an understanding of the rest of the book and this chapter is optional.
Chapter 12 covers non-convolutional methods for edge detection. Sub-topics, such as heuristic search and Hough transforms, are not needed for an understanding of the rest of the book.
Chapter 13 covers color spaces. Some projects in Chapter 15 do refer back to the material contained in Chapter 13, but not in detail. This chapters coverage is optional.
Chapter 14 covers digital image warping. The chapter is not required for an understanding of Chapter 15.
Chapter 15 covers unitary transforms (FFT and Wavelet). Most courses in image processing will want to cover Chapter 15.
A one-term course could be taught without covering Java using Chapters 5, 4, 8, 9, 10, 11, 12, 13, 14, and 15. The professor could then ask the students to perform the projects using whatever language they prefer. Some students do not know Java and are more comfortable in another language.
A course that emphasizes the practical aspects of image processing in Java could cover the Chapters in order, skipping to the topics of interest.
How Can I Use the Web to Teach and Learn More Image Processing?
The Web has shown itself to be a flexible means for submitting such projects to the instructor. They also have the side benefit of increased visibility for the work.
There are Web resources that are used to support this book. These Web resources include mailing lists which readers are welcome to join. The java-list is used for announcing updates for the book and for general Java discussions. I shall try to answer questions as best I can. See Appendix A for the details.
Licensing of the Kahindu software is free for non-commercial use. For commercial use, please send me e-mail. Be sure to indicate if you want a site license or an individual license. The Kahindu program could be turned into the next "killer-app" with the right influx of capital.
If you have an idea that could make this a more useful book, or if you find a bug in an example or error in the text, please feel free to send me e-mail.
Praise my pocket protector and swill that Java!