next up previous
Next: Java's Image Processing Up: Interactive Textbooks; Embedding Image Previous: Introduction

Background

JAVA [14], is an object-oriented language developed by Sun Microsystems, modeled after C++ [7], but designed to be small, simple and machine independent. JAVA programs belong in two categories: applets and applications. Applets are programs that are referenced through an HTML document and are down-loaded over the WWW and executed by the Web browser on the reader's machine. Applications are simply conventional stand-alone programs written in the JAVA language. Due to the educational focus of this project, we used applets rather than applications.

When JAVA code is compiled, the result is not directly executable, but must be interpreted by each computer (using a web browser or other tools). This first `compilation' produces bytecodesgif from the JAVA source code. So that every computer in the world can run the same bytecodes, JAVA has assumed the existence of a Virtual Machine which the bytecode-interpreter (e.g. a WWW Browser) will implement. This scheme works fine for most programs but if more speed is required then two solutions are available:

JAVA has mechanisms that will allow compiled C/C++ to be used in order to improve performance where required. While this solution is fine for applications executed locally, it runs into the portability constraints that all binary executables have. As we are interested in educational materials usable on many platforms, the C/C++ option is impractical. The better solution is Just-in-Time compilers which incrementally translate JAVA bytecodes into native machine code. This will enable JAVA programs to run at almost the same speed as C.

HIPR or Hypermedia Image Processing Reference [12] is a project undertaken by the Machine Vision Unit in the Artificial Intelligence Department of the University of Edinburgh. Its purpose is help students learn about image processing by achieving the golden ratio between too few examples and too much technical information. The majority of textbooks in image processing and machine vision typically err on the side of not providing sufficient intuition-building examples, while image processing software packages supply the user with little theory. HIPR is an HTML based teaching package designed for local network use and sold by site license. The Worksheets section of HIPR includes a series of topics starting from image arithmetic to morphology and image transforms. These worksheets contain a brief theoretical background on each topic plus a number of examples of applications, including numerous before-and-after (processing) example images. This way the student can comprehend the exact effects of the particular operator as well as understand its theoretical basis. An example of a worksheet on the image addition operator can seen at URL:
http://www.dai.ed.ac.uk/daidb/staff/personal_pages/rbf/HIPR/hiprdemo/html/pixadd.htm. What this package is missing is an interactive element and that's where the JAVA fits in.

An initial demonstration of JAVA for image processing was undertaken in the MARBLE Project [1] (see Figure 1) to determine if JAVA was basically suitable.

 
Figure 1: Fitzgibbon's Threshold Applet 

The project investigated a ``thresholding'' applet with a slider to set the threshold value acting on a given source image. This demonstration, coupled with the relevant background theory (in HTML) made for an entertaining and educational experience.

The project described here made use of some of the JAVA classes written for the Marble project. The most useful class was ImageCanvas() whose purpose is to ``tie an image to a canvas, wait until its size is known, resize the canvas and later update the on-screen image''.

Murdock [10] experimented with the development of a greatly simplified Khoros-like[5] environment for image processing that would allow users with little experience in the field to experiment with various operations and their effects. The project developed pull-down instances of operators that could be connected to form longer image transformation processes.



next up previous
Next: Java's Image Processing Up: Interactive Textbooks; Embedding Image Previous: Introduction



Bob Fisher
Fri Jul 4 16:11:50 BST 1997