Latest question:
How do you think the new GigE standards will influence the machine vision industry?
Respond or ask your question now!
Feature
The JAI Top 10: Sun Engineers Answer Tough Questions about Java Advanced Imaging API
by Brian Burkhalter
October 2002
Brian
Burkhalter, JAI.
There's
one constant in technology: it's always changing. The Java Advanced Imaging
(JAI) API is no exception. We receive many inquiries about this optional
Java package for advanced image processing applications. This Q&A provides
responses to some of the most frequently asked questions and briefly introduces
JAI . To download JAI, you can join the JAI Interest Group. To find out
more about JAI, please refer to the JAI home page at http://java.sun.com/products/java-media/jai/index.html.
The current version of JAI is 1.1.1_01 with version 1.1.2 scheduled for
release later in 2002.
1. How can I perform an image processing operation using JAI?
If the operation is one of the more than 100 operations provided intrinsically
by JAI, it will correspond to a class in the package javax.media.jai.operator
and implement the javax.media.jai.OperationDescriptor interface. By convention,
the name of each operation matches the prefix of its OperationDescriptor
class, so for operation "Warp" this would be "WarpOperationDescriptor."
The HTML documentation or "javadoc" of these OperationDescriptors provides
a textual description of the operation as well as the name, class, and
default value of each parameter. The simplest way to instantiate a rendered
JAI operation is to use the create(operationName,ParameterBlock,RenderingHints)
method of the class javax.media.jai.JAI. The arguments of this method
provide the name, sources, and parameters of the operation, as well as
"hints" regarding desired image layout, tile caching, etc.
2. What if JAI does not include an operation I need?
All operations in JAI are plug-ins. This permits developers to extend
the API by defining new operations and their implementations. Each operation
may have multiple, priority-ordered implementations. This allows for special
case implementations with assigned higher priority to attempt to handle
processing for a given operation with fallback to a general purpose implementation.
This is, in fact, what JAI itself does with its own native acceleration
programmed for the OS and CPU, which falls back to the Java implementation
for cases which cannot be handled by the native implementation. All intrinsic
JAI operations have complete Java versions.\