\chapter*{Preface}

This interactive course is based on hypertext (HTML) and Khoros 2.  It
uses network browsers such as Netscape.  The purpose of the
course is to give users a hands-on approach to Image Processing
through an extensive number of experiments.  This course can be used
as a self study guide or for any type of training format.  We expect
this course to grow through the active participation of the user
community.

We hope that with this new type of technology a wide range of users of
different backgrounds can be introduced to "image engineering". Through
this new type of "toolboxes" as well as collaboration technology, our
ability to learn and work together across geographical, temporal and
cultural distances will be greatly enhanced.

The DIP course has the following objectives:
\begin{enumerate}
\item Transfer the theory and practice required to process and visualize
   digital information.
\item Expose students to state-of-the-art technology through a hands-on
   approach to Digital Image Processing.
\item Present Khoros 2 as a software integration and development
   environment that emphasizes information processing and exploration.
\item Apply Khoros 2  as a common language platform for collaboration,
   software development, demonstration, technology transfer and
   training/education.
\item Provide new teaching and learning tools to motivate the user community
   to collaborate utilizing both synchronous and asynchronous exchanges of
   resources and knowledge. 
\end{enumerate}

The course has a collection of fully illustrated lessons on the topics
of Image Representation, Manipulation, Point Operations (Single, and
Dual operands), Digital Fourier Transform, Linear Operations, Image
Restoration, Wavelets, Non-linear Operations, and Pattern
Classification.  The DIP course has two formats, the first presents
concepts in Image Processing and is fully illustrated.  This first
format requires any network browser. The second format is interactive,
besides the network browser, it requires the \khoros system.

\Khoros is a software development environment which is distributed
through the Internet as Free Access Software via anonymous ftp.  This
software platform provides data exploration, visualization and a
visual language for quick prototyping and system integration.  Khoros
runs on Unix systems with X-windows and promotes portability and
provides a cost effective solution.

The first release was on December 1994. Since then many users have
taken the course via the Internet and others have ftp the DIP course
and installed in their systems. Also, several hands-on courses were
given by the authors in several sites such us Spain, Brazil, Argentina
and USA.  Because of its success, we have decided to keep improving
and releasing it frequently.

\section*{Getting the DIP course}

The DIP Khorosware can be obtained via anonymous ftp or used through
the WWW.  It can be used by any organization but cannot be distributed
or used for profit without a licence.

\begin{verbatim}
For anonymous ftp access:
ftp.khoral.com 		(USA),
ftp.eece.unm.edu 	(USA).
ftp.dca.fee.unicamp.br	(Brazil).
directory:	/pub/khoros/Khoros2/contrib/toolboxes/dipcourse

For WWW access:
http://www.khoral.com/dipcourse/			(USA)
http://www.eece.unm.edu/dipcourse/Welcome.html	        (USA)
http://www.dca.fee.unicamp.br/dipcourse/		(Brazil)
\end{verbatim}


\section*{Installing the DIP course}

\begin{enumerate}
\item Uncompress and untar the dipcourse.tar.gz in the \$KHOROS\_HOME directory:

\begin{verbatim}
   cd $KHOROS_HOME
   gunzip dipcourse.tar.gz
   tar xvf dipcourse.tar
\end{verbatim}

\item Call a network browser such as Netscape:

   {\tt netscape \$KHOROS\_HOME/Welcome.html}

   and follow the extra instructions on "How to install DIP Khorosware"
\end{enumerate}

\section*{Trends, Needs and Course Objective}

As problems become more complex, more variables need to
be considered.  Multivariable models give us a closer approximation to
reality.  In modern problem solving there is a need to process large data sets,
multidimensional and/or time varying data.  Solutions demand computer
intensive operations, for example applications that require modeling,
simulation, animation and algorithms to extract information from the data.
Finally, problem solving requires the collaboration among
interdisciplinary teams.

The field of Digital Image Processing (DIP) has seen a significant increase
in the level of interest from other disciplines.  DIP is continuously
enhanced by other areas such as neural nets, wavelet theory,
mathematical morphology, data compression and recognition, and
artificial intelligence.  With the dramatic drop in the cost of digital
systems and the equally dramatic increase in the level of performance,
the application of DIP in other disciplines is unavoidable.
Digital Image Processing plays a crucial role in the areas of remote
sensing, medical imaging, scientific visualization, telecommunications,
robotics, biology, and environmental engineering among others.

The proposed course has the following objectives:

\begin{itemize}
\item
Transfer the theory and practice required to
process and visualize digital information.
\item
Expose students to state-of-the-art technology
through a hands-on approach to Digital Image Processing.
\item
Present \khoros as a
software integration and development environment that emphasizes
information processing and exploration.
\item
Apply \khoros as a
common language platform for collaboration,
software development, demonstration, technology transfer and
training/education.
\end{itemize}

Digital Image Processing takes the tremendous advances in technology
and combines them with the powerful human ability to visualize and
interpret data, offering creative solutions to complex problems.
Image processing expands
the unique human ability to visualize and interpret data; scientists
worldwide have recognized that DIP is an essential tool for education,
research and technology.  
\Khoros 
software growth thrives on real-time user enhancement, on-line training,
permanent feedback from its broad spectrum of users, and, consequently,
rapid advances in telecommunications, networking and computer architecture.

Creative curricula promotes collaborative applied research, innovation
in resource sharing and a highly skilled industrialized workforce.
Digital Image Processing with Khoros 2 plans to be part of this 
particular curricula reform.

\section*{How to Use DIP Khorosware}

There are several ways you can use DIP Khorosware as a self-study
guide.  Choose the one you prefer best.  Independent of the path selected,
this course is intended to bridge the gap between theory and practice
by providing a "hands-on" approach to digital image processing.

Each lesson or experience is organized as follows:

A {\bf front page} gives a description of the problem or the
concept for the experiment.  This page is typically
full of images and graphics showing the original data and the
processed image or result.  It explains the fundamentals of image
processing in general.  The {\bf front page} is independent and can
be used as a non-practical illustrative DIP course, i.e., without the
"hands-on" touch.

At the end of the {\bf front page} there are two links:

\begin{itemize}
\item Lab
\item Other Examples
\end{itemize}

{\bf Lab} takes you through a step by step
recipe on how to combine Khoros operators/glyphs to solve a problem
or illustrate concepts of a solution or experiment.  It is intended for 
you to acquire experience on where to find and how to use the different
operators.  For the inexperienced user, you will need to go step by step
over the first few workspaces provided.  As you acquire more experience,
you will be able to build a workspace without refering to existing ones,
or look at workspaces only when difficulties arise.  Finally,
at the end you will find a list of suggested {\it exercises}
that provide further questions and problems so that you can extend and
practice what you have learned, and the name of the proposed visual 
program that is ready for execution.

Now you are ready to run, see the results, change parameters and play.
Our experience in teaching indicates that it is {\bf not} advisable to
go straight to and run the workspaces provided in the course.  The reason
is that you will not understand how the workspace was built, why the set of
operators were chosen, why certain parameters were selected whithin
an operator and their values.  Therefore, for your convenience, a
solution workspace is included in the DIP Khorosware so that you can
observe, experiment, and play with a solution to a problem or illustration
of concepts.

\section{Where to Get it and How to Install DIP Khorosware}

The course can be used in two formats

\begin{enumerate}
\item By observing the "html" pages of the course as a passive user.

In this manner you do not need to install anything.  All you need is
a WEB browser such as Netscape.  There are three WEB servers
where you can access the course:

 \begin{itemize}

 \item University of New Mexico, USA: 
  \htmladdnormallink{DIP server at UNM}{http://www.eece.unm.edu/dipcourse}

 \item Universidade Estadual de Campinas, Brazil:
  \htmladdnormallink{DIP server at UNICAMP}{http://dca.fee.unicamp.br/dipcourse}

 \item Khoral Research, Inc., USA: 
  \htmladdnormallink{DIP server at KRI}{http://www.khoral.com/dipcourse}
 \end{itemize}


\item By fully using the interactive facilities of the on-line course.

In this case you need to have Khoros 2 installed, in addition you will
need the DIP Khorosware, MMACH and WAVELET toolboxes.  You can get
Khoros 2 and the toolboxes via anonymous ftp from several sites around
the world, three main sites are:


Khoros 2 can be obtained from

 \begin{itemize}
 \item Khoral Research, Inc., USA:
 \htmladdnormallink{fpt at KRI}{ftp://ftp.khoral.com/pub/khoros/khoros2}
 
 \item Universidade Estadual de Campinas, Brazil:
 \htmladdnormallink{ftp at Unicamp}{ftp://ftp.dca.fee.unicamp.br/pub/khoros}

 \item University of New Mexico, USA:
 \htmladdnormallink{ftp at UNM}{ftp://ftp.eece.unm.edu/pub/khoros2}

 \end{itemize}

DIP Khorosware is also available from all the above ftp sites, under
directory {\tt /pub/khoros/Khoros2/contrib/toolboxes/dipcourse}

The contributed toolboxes MMACH and WAVELET can be obtained from the above
sites under directory {\tt /pub/khoros/Khoros2/contrib/toolboxes/mmach} and
{\tt /pub/khoros/Khoros2/contrib/toolboxes/wavelets}

\end{enumerate}

\section*{Setting up Your "http" Server}

\begin{verbatim}

Digital Image Processing with Khoros 2 "Toolbox-Course"
*********************************************************

1) Requirements:
   - WWW Browser (netscape)
   - Khoros Toolboxes:
		BOOTSTRAP
                DATAMANIP
                DATASERV
                ENVISION
                IMAGE
                DESIGN
                RETRO

   - Contributed "Toolboxes"
     WAVELET: wavelet toolbox 
     MMACH: mathematical morphology routines toolbox
     DIP: this course

   - in your home directory the following file is needed
#
#       .mime.types file for DIP course
#
application/animate             kdfa
application/cantata             wk
application/editimage           kdfe
application/editcmap            kdfc
application/putimage            kdfp kdf
application/putplot2            kdf2
application/putplot3            kdf3
application/xprism              kdfx
application/puticon             kdfic 
application/putpalette          kdfpa 
application/putanimate          kdfpan
application/preview             pane form

   - in your home directory the following file is needed
#
#       .mailcap file for DIP course
#
application/animate; animate -i %s
#application/cantata; runwksp -wksp %s
application/cantata; cantata -wksp %s
application/editimage; editimage -i %s
application/editcmap; edicmap -i %s
application/putimage; putimage -i %s
application/putplot2; putplot2 -i %s 
application/putplot3; putplot3 -i %s 
application/xprism; xprism -i1 %s 
application/preview; preview -i %s
application/puticon; puticon -i %s
application/putpalette; putpalette -i %s
application/putanimate; putanimate -i %s

2) all data (kdf, ascii, etc) files are located in the
"$DIP/data" directory

\end{verbatim}

\section*{Acknowledgements}

This course has been developed thanks to the continuous support of many
individuals and institutions.  To all of them our sincere appreciation for
their encouragement, enthusiasm and financial support.

\begin{itemize}

\item University of New Mexico, USA
      \htmladdnormallink{UNM}{http://www.unm.edu}

\item Universidade Estadual de Campinas, Brazil
      \htmladdnormallink{UNICAMP}{http://www.unicamp.br}

\item Conselho Nacional de Desenvolvimento Cient{\'\i}fico e Tecnol{\'o}gico, Brazil
      \htmladdnormallink{CNPq}{http://cnpq.br}

\item Funda{\c c}{\~a}o de Amparo {\`a} Pesquisa do Estado de S{\~a}o Paulo, Brazil
      \htmladdnormallink{FAPESP}{ http://www.fapesp.br}

\item Softex 2000, Brazil.

\item ISTEC industrial members: Motorola Inc., Northern Telecom/BNR.

\item BSP Group for useful discussions and suggestions

\item Students from discipline IA-636 at Unicamp, Brazil.
\end{itemize}

For this particular edition, I would like to thanks the help from 
Prof. Jose Raimundo de Oliveira, Mauro Tatibana, Wellington D. Felix da
Silva in the preparation of this notebook.

\section*{Contributions}

Tha authors are interested in enhancing the DIP with Khoros course
with contributions made by the user community. In order for the course
to grow and to facilitate the process, we encourage those who wish to
contribute to follow the same structure of the course. All
contributions should be channelled through the authors, and will be
fully acknowledged.  

\section*{DIP and Khoros Software Free Access License}
{\small

{\bf Acceptance}

The DIP Khorosware can be obtained via anonymous ftp or used through
the WWW.  It can be used by any organization but cannot be distributed
or used for profit without a licence.

Please read this license agreement before using Khoros.
Do not use, copy, or distribute this software until you have read and
agreed to the Terms and Conditions of this license agreement.  This is
a contract with important legal consequences.  You and your
organization, as the Licensee, agree to the Terms and Conditions of
this agreement by using, copying, or distributing this software.

{\bf Registration}

Please register your license with Khoral Research, Inc. (KRI).  If you
do not have an attached registration form, execute the program
kregister to send KRI electronic mail or print out a registration form
that can then be sent to KRI via postal mail or FAX.

{\bf Definitions}

"Khoros Software" is defined to include source code, object code,
executables, libraries, user interface specifications, and
documentation of Khoros, all of which is owned by KRI.  Khoros also
includes components that are not owned by KRI; these components are
clearly marked and contain the owner's notices.

"Loaded" is defined to mean combining object code to form an
executable.

{\bf Right to Redistribute}

Permission to distribute this Software using electronic media and at no
cost is granted, provided that the Software contains no modifications,
provided that the distribution is not assigned any price or value in
any way, provided that the distribution is not combined with any
product or service in any way, and provided that the distributed
Software is identical to the Software that is currently being
distributed at no cost via computer network by KRI.

{\bf Derivative Works}

Permission to prepare derivative works or to modify the Khoros Software
for internal use only is granted to Licensee. However, all rights to
such modifications and derivative works, including all copyrights, are
the property of KRI. New software developed by Licensee as a result of
using the Khoros Software belongs to the author and is not bound by
this license agreement. However, any Khoros Software that is Loaded
with the author's software is bound by this license agreement.

{\bf Licensee Agrees}

By distributing the Khoros Software, the Licensee agrees to abide by the
copyright law and all other applicable laws of the U.S. and foreign
countries, including, but not limited to, export control laws, and the
terms of this license.

{\bf TERMINATION}

KRI shall have the right to terminate this license immediately by
written notice upon Licensee's breach of, or non-compliance with, any
of the terms of this license. Licensee may be held legally responsible
for any copyright infringement that is caused or encouraged by
Licensee's failure to abide by the terms of this license.

{\bf Government Use Rights}

Use, duplication, or disclosure by the U.S. Government is subject to
restrictions set forth in subparagraphs (a) through (d) of the
Commercial Computer Restricted Rights clause of FAR 52.227-19 when
applicable, or in subparagraph (c)(1)(ii) of the Rights in Technical
Data and Computer Software clause at DFARS 252.227-7013, and in similar
clauses in the NASA FAR Supplement. Any provision of Khoros
Software to the U.S. Government is with Limited Rights.

{\bf Additional Rights and Consortium Membership}

No additional rights or Khoros Consortium membership are granted.

For more information on additional rights and Khoros Consortium
membership, contact KRI at the address below.

{\bf Entire Agreement}

This License Agreement constitutes the entire agreement between KRI and
Licensee and may be amended or changed only by written agreement signed
by both parties.  This License Agreement is governed by the laws of the
State of New Mexico.

{\bf Disclaimer of Warranty}

THIS SOFTWARE IS PROVIDED BY KRI "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
IN NO EVENT SHALL KRI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

{\bf Questions and Information}

If you have any questions concerning this license agreement, the
copyright, or trademarks, please contact KRI via electronic mail at
khoros-request@khoral.com or via postal mail at Khoral Research,
Inc., 6001 Indian School Road N.E., Suite 200, Albuquerque, NM 87110.

{\bf Copyright Notice}

"Copyright (C) 1996-1995 KRI, ISTEC, Ramiro Jord{\'a}n, Roberto Lotufo.
All Rights Reserved."

Licensee can not remove or obscure any of the copyright or 
trademark notices in this software.  Khoros is a registered trademark
of KRI. Cantata, Composer, Craftsman, Guise, Orchestrate and Xprism are 
trademarks of KRI. 

}
