📄 introduction to java advanced imaging.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0097)http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Introduction.doc.html -->
<HTML><HEAD><TITLE>Introduction to Java Advanced Imaging</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=reference name=collection>
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<CENTER><A
href="http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/JAITOC.fm.html"><IMG
alt=Contents src="Introduction to Java Advanced Imaging.files/contents.gif"></A>
<A
href="http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Preface.doc.html"><IMG
alt=Previous src="Introduction to Java Advanced Imaging.files/previous.gif"></A>
<A
href="http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/J2D-concepts.doc.html"><IMG
alt=Next src="Introduction to Java Advanced Imaging.files/next.gif"></A>
<P><FONT size=5><I>Programming in Java Advanced Imaging</I></FONT> </CENTER><BR>
<CENTER><A name=47227>
<TABLE width="90%" border=0>
<TBODY>
<TR>
<TD align=right><FONT size=3>C H A P T E R</FONT><FONT size=7><IMG
src="Introduction to Java Advanced Imaging.files/sm-space.gif">1</FONT></TD></TR></TBODY></TABLE></A></CENTER>
<CENTER><A name=47285>
<TABLE width="90%" border=0>
<TBODY>
<TR>
<TD align=right>
<HR noShade SIZE=7>
<FONT size=6>Introduction to Java Advanced
Imaging</FONT></TD></TR></TBODY></TABLE></A></CENTER>
<BLOCKQUOTE>
<P><BR><BR><BR>
<P><FONT size=7><B>T</B></FONT>HE Java programming language has continued to
grow both in popularity and scope since its initial release. Java in its
current form is the culmination of several years work, dating back to 1991
when it was conceived as a modular and extensible programming language.
<P>Java is based on the C and C++ programming languages, but differs from
these languages is some important ways. The main difference between C/C++ and
Java is that in Java all development is done with objects and classes. This
main difference provides distinct advantages for programs written in Java,
such as multiple threads of control and dynamic loading.
<P>Another advantage to Java is its extensibility. Since the original release
of Java, several extensions have been added to the core code, providing
greater flexibility and power to applications. These extensions add objects
and classes that improve the Java programmer's ability to use such features
as:
<P>
<UL>
<LI>Java Swing - a component set to create grapical user interfaces with a
cross-platform look and feel
<P></P></LI></UL>
<UL>
<LI>Java Sound - for high-quality 32-channel audio rendering and
MIDI-controlled sound synthesis
<P></P></LI></UL>
<UL>
<LI>Java 3D - for advanced geometry and 3D spatial sound
<P></P></LI></UL>
<UL>
<LI>Java Media Framework - for components to play and control time-based
media such as audio and video
<P></P></LI></UL>
<UL>
<LI>Java Telephony (JTAPI) - for computer-telephony applications
<P></P></LI></UL>
<UL>
<LI>Java Speech - for including speech technology into Java applets and
applications
<P></P></LI></UL><A name=52476>
<H2>1.1 <IMG src="Introduction to Java Advanced Imaging.files/space.gif">The
Evolution of Imaging in Java</H2></A>Early versions of the Java AWT provided a
simple rendering package suitable for rendering common HTML pages, but without
the features necessary for complex imaging. The early AWT allowed the
generation of simple images by drawing lines and shapes. A very limited number
of image files, such as GIF and JPEG, could be read in through the use of a
<CODE>Toolkit</CODE> object. Once read in, the image could be displayed, but
there were essentially no image processing operators.
<P>The Java 2D API extended the early AWT by adding support for more general
graphics and rendering operations. Java 2D added special graphics classes for
the definition of geometric primitives, text layout and font definition, color
spaces, and image rendering. The new classes supported a limited set of image
processing operators for blurring, geometric transformation, sharpening,
contrast enhancement, and thresholding. The Java 2D extensions were added to
the core Java AWT beginning with the Java Platform 1.2 release.
<P>The Java Advanced Imaging (JAI) API further extends the Java platform
(including the Java 2D API) by allowing sophisticated, high-performance image
processing to be incorporated into Java applets and applications. JAI is a set
of classes providing imaging functionality beyond that of Java 2D and the Java
Foundation classes, though it is compatible with those APIs.
<P>JAI implements a set of core image processing capabilities including image
tiling, regions of interest, and deferred execution. JAI also offers a set of
core image processing operators including many common point, area, and
frequency-domain operators.
<P>JAI is intended to meet the needs of all imaging applications. The API is
highly extensible, allowing new image processing operations to be added in
such a way as to appear to be a native part of it. Thus, JAI benefits
virtually all Java developers who want to incorporate imaging into their
applets and applications.
<P><A name=52465>
<H2>1.2 <IMG src="Introduction to Java Advanced Imaging.files/space.gif">Why
Another Imaging API?</H2></A>Several imaging APIs have been developed - a few
have even been marketed and been fairly successful. However, none of these
APIs have been universally accepted because they failed to address specific
segments of the imaging market or they lacked the power to meet specific
needs. As a consequence, many companies have had to "roll their own" in an
attempt to meet their specific requirements.
<P>Writing a custom imaging API is a very expensive and time-consuming task
and the customized API often has to be rewritten whenever a new CPU or
operating system comes along, creating a maintenance nightmare. How much
simpler it would be to have an imaging API that meets everyone's needs.
<P>Previous industry and academic experience in the design of image processing
libraries, the usefulness of these libraries across a wide variety of
application domains, and the feedback from the users of these libraries have
been incorporated into the design of JAI.
<P>JAI is intended to support image processing using the Java programming
language as generally as possible so that few, if any, image processing
applications are beyond its reach. At the same time, JAI presents a simple
programming model that can be readily used in applications without a
tremendous mechanical programming overhead or a requirement that the
programmer be expert in all phases of the API's design.
<P>JAI encapsulates image data formats and remote method invocations within a
re-usable image data object, allowing an image file, a network image object,
or a real-time data stream to be processed identically. Thus, JAI represents a
simple programming model while concealing the complexity of the internal
mechanisms.
<P><A name=52433>
<H2>1.3 <IMG src="Introduction to Java Advanced Imaging.files/space.gif">JAI
Features</H2></A>JAI is intended to meet the requirements of all of the
different imaging markets, and more. JAI offers several advantages for
applications developers compared to other imaging solutions. Some of these
advantages are described in the following paragraphs.
<P><A name=52435>
<H3>1.3.1 <IMG
src="Introduction to Java Advanced Imaging.files/space.gif">Cross-platform
Imaging</H3></A>Whereas most imaging APIs are designed for one specific
operating system, JAI follows the Java run time library model, providing
platform independence. Implementations of JAI applications will run on any
computer where there is a Java Virtual Machine. This makes JAI a true
cross-platform imaging API, providing a standard interface to the imaging
capabilities of a platform. This means that you write your application once
and it will run anywhere.
<P><A name=54528>
<H3>1.3.2 <IMG
src="Introduction to Java Advanced Imaging.files/space.gif">Distributed
Imaging</H3></A>JAI is also well suited for client-server imaging by way of
the Java platform's networking architecture and remote execution technologies.
Remote execution is based on Java RMI (remote method invocation). Java RMI
allows Java code on a client to invoke method calls on objects that reside on
another computer without having to move those objects to the client.
<P><A name=52437>
<H3>1.3.3 <IMG
src="Introduction to Java Advanced Imaging.files/space.gif">Object-oriented
API</H3></A>Like Java itself, JAI is totally object-oriented. In JAI, images
and image processing operations are defined as objects. JAI unifies the
notions of image and operator by making both subclasses of a common parent.
<P>An operator object is instantiated with one or more image sources and other
parameters. This operator object may then become an image source for the next
operator object. The connections between the objects define the flow of
processed data. The resulting editable graphs of image processing operations
may be defined and instantiated as needed.
<P><A name=54286>
<H3>1.3.4 <IMG
src="Introduction to Java Advanced Imaging.files/space.gif">Flexible and
Extensible</H3></A>Any imaging API must support certain basic imaging
technologies, such as image acquisition and display, basic manipulation,
enhancement, geometric manipulation, and analysis. JAI provides a core set of
the operators required to support the basic imaging technologies. These
operators support many of the functions required of an imaging application.
However, some applications require special image processing operations that
are seldom, if ever, required by other applications. For these specialized
applications, JAI provides an extensible framework that allows customized
solutions to be added to the core API.
<P>JAI also provides a standard set of image compression and decompression
methods. The core set is based on international standards for the most common
compressed file types. As with special image processing functions, some
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -