Sage 0303
Sage 0303
I
mage processing (IP) can be taught very effective- standard IP algorithm in Java. Next, students are asked
ly by complementing the basic lectures with com- to extend the algorithms progressively. This construc-
puter laboratories where the participants can tive approach is made possible thanks to a programmer-
actively manipulate and process images. This friendly environment and an additional software
offering can be made even more attractive by allowing interface layer that greatly facilitates the developments
the students to develop their own IP code within a rea- of plug-ins for ImageJ. Taking into account the fact
sonable time frame. After a brief review of existing soft- that our students are not experienced programmers
ware packages that can be used for teaching IP, we (they typically do not even know Java), we use a “learn
present a system that we have designed to be as “stu- by example” teaching strategy, with good success.
dent friendly” as possible. The software is built around
ImageJ, a freely available, full-featured, and user-friend- Teaching by Doing
ly program for image analysis. The computer sessions Because of the widespread use of imaging, there is an
are alternated with lectures, typically, a three-hour ses- ever-pressing need to train engineers who are proficient
sion at the end of every chapter. The sessions are in the with this new technology. This trend is likely to contin-
form of assignments that guide the students toward the ue as the cost of imaging devices (digital camera, scan-
solution of simple imaging problems. The starting ners, etc.) keeps declining and as the power of PCs
point is typically the understanding and testing of some keeps increasing, making sophisticated IP algorithms
Listing 2. Example of a nonseparable filtering template (vertical edge detector) given to the students.
public ImageAccess filter2D_NonSeparable(ImageAccess input) {
int nx = input.getWidth();
int ny = input.getHeight();
ImageAccess output = new ImageAccess(nx, ny);
double block[][] = new double[3][3];
double value = 0.0;
for (int x=0; x<nx; x++) {
for (int y=0; y<ny; y++) {
input.getNeighborhood(x, y, block);
value = (block[2][0] - block[0][0] + block[2][1] -
block[0][1] + block[2][2] - block[0][2]) / 6.0;
output.putPixel(x, y, value);
}
}
return output;
}
In practice, we give these two templates as examples thresholding). To simplify their task, we give the tem-
to the students and ask them to program other digital plates of separable routines for the analysis part (Listing
filters such as a horizontal edge detector and a 5*5 mov- 4); we ask them to code the 1-D Haar transform and
ing-average filter (nonseparable and to write the synthesis part (both 1-D
separable implementation). By master- and 2-D) from scratch.
ing those examples, they get a rather As far as the students are con-
complete exposure to the topic of lin- cerned, this is perhaps one of the most
ear filtering. impressive sessions they go through.
The great majority of them are capa-
Wavelet Transforms ble of completing the full assignment;
Another interesting example is the the 1-D routines split_1D and
implementation of a separable merge_1D for the Haar transform are
wavelet transform in 2-D (c.f. Figure rather easy—two liners—and the
2). The students have three hours to wavelet synthesis is the same as the
program the transform and to apply it analysis, but the other way around.
to various IP tasks (simple coding by
zeroing out nonsignificant coeffi- ▲ 2. Haar wavelet transform of Lena Classroom
cients and noise reduction by soft- (three iterations across scale). A three-hour laborator y session is
typically devoted to one chapter of the course. The all students can undertake the experimental part of the
assignment is given one week in advance. It contains a assignment under equal conditions; of course, they are
programming part and an experimental part, where the greatly encouraged to run their own code and make
desired results are processed images. As backup, we sure that they get the same results. The sessions take
usually provide reference versions of the assigned algo- place in two computer rooms with 30 Windows 2000
rithms as executable code (bytecode) to make sure that machines in each. There are typically three teaching
[12] B.M. Dawant, “MATLAB-supported undergraduate image processing [37] R. Fisher, S. Perkins, A. Walker, and E. Wolfart, Hypermedia Image
instruction,” in Proc. SPIE Medical Imaging 1998, vol. 3338, 1998, pp. Processing Reference (HIPR). Available: http://www.dai.ed.ac.uk/HIPR2/
276–284. [38] B. Morse, Java Image and Graphics Library (JIGL), Brigham Young
[13] H.J. Trussell and M.J. Vrhel, “Image display in teaching image processing. I. University, Provo, UT. Available: http://rivit.cs.byu.edu/jigl/
Monochrome images,” in Proc. IEEE Int. Conf. Acoustics, Speech, and Signal [39] D. Sage and M. Unser, “Easy Java programming for teaching image-process-
Processing (ICASSP’00), Istanbul, Turkey, 2000, vol. 6, pp. 3518–3521. ing,” in Proc. IEEE Int. Conf. Image Processing (ICIP’01), Thessaloniki,
[14] C.S. Zuria, J.M. Ramirez, D. Baez-Lopez, and G.E. Flores-Verdad, “MAT- Greece, 2001, vol. 3, pp. 298–301.
LAB based image processing lab experiments,” in Proc. IEEE Frontiers in [40] D.Y. Wang, B. Lin, and J. Zhang, “JIP: Java image processing on the
Education Conf. (FIE’98), Tempe, AZ, 1998, pp. 1255–1258. Internet,” Proc. SPIE Color Imaging: Device-Independent Color, Color
[15] S.L. Eddins and M.T. Orchard, “Using MATLAB and C in an image process- Hardcopy, and Graphic Arts, vol. 3648, pp. 354–364, Dec. 1998.
ing lab course,” in Proc. IEEE Int. Conf. Image Processing (ICIP’94), Austin,
TX, 1994, vol. 1, pp. 515–519. [41] Y. Cheneval, L. Balmelli, P. Prandoni, J. Kovacevic, and M. Vetterli,
“Interactive DSP education using Java,” in Proc. IEEE Int. Conf. Acoustics,
[16] Khoros Pro 2001 Integrated Development Environment, Khoral Inc., Speech and Signal Processing (ICASSP’98), Seattle, WA, 1998, vol. 3, pp.
Albuquerque, NM [Online]. Available: http://www.khoral.com/ 1905–1908.
[17] R. Jordan and R. Lotufo, Digital Image Processing (DIP) with Khoros Pro [42] D.A. Lyon, Image Processing in Java. Upper Saddle River, NJ: Prentice-Hall,
2001, visited in February 2001. 1999.
[18] R. Lotufo and R. Jordan, “Hands-on digital image processing,” in IEEE Proc. [43] D. Roman, M. Fischer, and J. Cubillo, “Digital image processing—An object-
Frontiers in Education Conf. (FIE’96), Salt Lake City, UT, 1996, pp. oriented approach,” IEEE Trans. Educ., vol. 41, no. 4, pp. 331–333, 1998.