Digital image processing is the use of computer algorithms to perform image processing on digital images. Digital image processing has the same advantages over analog image processing as digital signal processing has over analog signal processing ² it allows a much wider range of algorithms to be applied to the input data, and can avoid problems such as the build -up of noise and signal distortion during processing. The most common kind of digital image processing is digital image editing. Pattern recognition aims to classify data (patterns) based on either a priori knowledge or on statistical information extracted from the patterns. The patterns to be classified are usually groups of measurements or observations, defining points in an appropriate multidimensional space. This is in contrast to pattern matching, where the pattern is rigidly specified.

Table of Contents 1. 2. 3. 4. Front Page Candidate Declaration Certificate Certificate (External, Internal) 5. Acknowledgement
6. 1.Fundamentals 7. 2.Image formats supported by Matlab 8. 3.Working formats in Matlab 9. 4.Intensity image (gray scale image) 10. 5.Binary image 11. 6.Indexed image 12. 7.RGB image 13. 8.Multiframe image 14. 9.How to convert between different formats 15. 10.Image format conversion 16. . How to display an image in Matlab

Working with Strings in MATLAB Distance Measures in MATLAB Computing Forming Pattern Vectors Recognition Based on Decision-Theoretic Methods

Image: An image may be defined as a two-dimensional function ( x,y ) ,where x and y are spatial (plane) coordinates, and the amplitude of f at any pair of coordinates (x,y)is called the intensity or gray level of the image at that point.

Analog Image: Can be mathematically represented as a continuous range of values representing position and intensity. Digital Image: a digital image is restricted in both its spatial coordinates and in its allowed intensities. The field of digital image processing refers to processing digital images by means of a digital computer. Note that a digital image is composed of a finite number of elements, each of which has a particular location and value. These elements are referred to as picture elements, image elements, pels, and pixels. Pixel is the term most widely used to d enote the elements of a digital image

A digital image is composed of pixels which can be thought of as small dots on the screen. A digital image is an instruction of how to color each pixel. We will see in detail later on how this is done in practice. A typical size of an image is 512-by-512 pixels. Later on in the course you will see that it is convenient to let the dimensions of the image to be a power of 2. For example, 29=512. In the general case we say that an image is of size m-by-n if it is composed of m pixels in the vertical direction and n pixels in the horizontal direction. Let us say that we have an image on the format 512-by-1024 pixels. This means that the data for the image must contain information about 524288 pixels, which requires a lot of memory! Hence, compressing images is essential for efficient image processing. You will later on see how Fourier analysis and Wavelet analysis can help us to compress an image significantly. There are also a few "computer scientific" tricks (for example entropy coding) to reduce the amount of data required to store an image. Image formats supported by Matlab The following image formats are supported by Matlab:
y y y y y


the multiframe format is a convenient way of working with a sequence of images. This is very common in biological and medical imaging where you might study a sequence of slices of a cell. The other class is called uint8 which assigns an integer between 0 and 255 to represent the brightness of a pixel. The value 0 corresponds to black and 255 to white. many mathematical functions can only be applied to thedouble class. Each matrix corresponds to one of the colors red. The second matrix is called the color map and its size may be different from the image. For these cases. we must convert it into a different format.jpg is stored in the JPEG format and we will see later on that we can load an image of this format into Matlab.y XWB Most images you find on the Internet are JPEG-images which is the name for one of the most widely used compression standards for images. an image named myimage. Binary image This image format also stores an image as a matrix but can only color a pixel black or white (and nothing in between).) An indexed image stores an image as two matrices. Multiframe image In some applications we want to study a sequence of images. . The class uint8 only requires roughly 1/8 of the storage compared to the class double. This section explains four common formats. If you have stored an image you can usually see from the suffix what format it is stored in. Indexed image This is a practical way of representing color images. green or blue and gives an instruction of how much of each of these colors a certain pixel should use. It assigns a 0 for black and a 1 for white. In case you choose to work with biological imaging later on in this course. Intensity image (gray scale image) This is the equivalent to a "gray scale image" and this is the image we will mostly work with in this course. There are two ways to represent the number that represents the brightness of the pixel: The double class (or data type). you may use this format. for example perform a wavelet transform on the image. It represents an image with three matrices of sizes matching the image format. RGB image This is another format for color images. (In this course we will mostly work with gray scale images but once you have learned how to work with a gray scale image you will also know the principle how to work with color images. It represents an image as a matrix where every element has a value corresponding to how bright/dark the pixel at the corresponding position should be colored. We will see later how to convert between double and uint8. For example. This assigns a floating number ("a number with decimals") between 0 and 1 to each pixel. On the other hand. Working formats in Matlab If an image is stored as a JPEG-image on your disc we first read it into Matlab. However. How to convert between different formats . in order to start working with an image. e first matrix has the same size as the image and one number for each pixel. The numbers in the first matrix is an instruction of what number to use in the color map matrix. The value 0 corresponds to black and the value 1 corresponds to white.

if you down load an image from the web. converts an image named I from uint8 to double. let's say. Once we are done processing an image. mat2gray() Convert between RGB format to intensity format. Put the file name within single quotes ' '. ind2rgb() Convert a regular matrix to intensity format by scaling. it is usually in form of a file (for example. How to read files When you encounter an image you want to work with. post the processed image on the web. (Within the parenthesis you type the name of the image file you wish to imread() read. for example.) Write an image to a file. This is done using the imread and imwrite commands. converts an image named I from double to uint8. ) you have worked with.) Operation: Matlab command: Convert between intensity/indexed/RGB format to binary format. rgb2ind() The command mat2gray is useful if you have a matrix representing an image but the values representing the gray scale range between. you should store it as a uint8 image since this requires far less memory than double. 0 and 1000.These commands require the Image processing tool box! Reading and writing image files Operation: Matlab command: Read an image. All these commands require the Image processing tool box! Image format conversion (Within the parenthesis you type the name of the image you wish to convert. rgb2gray() Convert between RGB format to indexed format. When you are processing an image (that is performing mathematical operations on an image) you should convert it into a double. I=im2uint8(I). I=im2double(I). dither() Convert between intensity format to indexed format.The following table shows how to convert between the different formats given above. it is usually stored as a JPEG-file). we may want to write it back to a JPEG-file so that we can. As a second argument within the parenthesis you type the name of the file . The command mat2gray automatically re scales all entries so that they fall within 0 and 255 (if you use the uint8 class) or 0 and 1 (if you use the double class). How to convert between double and uint8 When you store an image. ind2gray() Convert between indexed format to RGB format. Converting back and forth between these classes is easy. (As the first argument within the parenthesis you type the name of the image imwrite( . gray2ind() Convert between indexed format to intensity format.

investigate its format and save the matrix representing the image. load X Examples In the first example we will down load an image from the web. read it into Matlab. Loading and saving variables Operation: Matlab command: Save the variable X . ... Example 1.) Make sure to use semi-colon . Note thatsave and load are commonly used Matlab commands. after these commands. otherwise you will get LOTS OF number scrolling on you screen. and works independently of what tool boxes that are installed. Once you have read a file. Once you are done you may want to save the matrix representing the image in order to continue to work with this matrix at another time.jpg. The commands imread and imwrite support the formats given in the section "Image formats supported by Matlab" above. you probably convert it into an intensity image (a matrix) and work with this matrix. Loading and saving variables in Matlab This section explains how to load and save variables in Matlab.and format that you want to write the image to. This is easily done using the commands save and load. save X Load the variable X . Down load the following image (by clicking on the image using the right mouse button) and save the file as cell1. Put the file name within single quotes ' '.

mat. . load I % Load the variable I that we saved above. (Of course. % There should now be a file named "I. Next we will see that we can display an image using the command imshow.) I=imread('cell1.mat" in you directory % containing your variable I. you do not have to type in the comments given in the code after the% signs. (You can check what files your directory contains by typing ls at the Matlab prompt. ls % List the files in your directory. Cellular and Developmenta l Biology at CU. You change directory using the command cd. Note that all variables that you save in Matlab usually get the suffix .jpg'). % Load the image file and store it as the variable I. % Convert the variable into double. Now open Matlab and make sure you are in the same directory as your stored file.This is an image of a cell taken by an electron microscope at the Department of Molecular. save I % Save the variable I. whos % Check that the variable indeed was converted into double % The next procedure cuts out the upper left corner of the image % and stores the reduced image as Ired. This command requires the image processing tool box. clear % Clear Matlab's memory. Commands for displaying images will be explained in more detail in the section "How to display images in Matlab" below. whos % Type "whos" in order to find out the size and class of all stored variables. imshow(I) % Display the image I=im2double(I). whos % Check that it was indeed loaded.) Now type in the following commands and see what each command does.

in this course we will mostly work with gray scale images. 0<s<1 gives a brighter image. clear A=imread('pic-home. Change the colors to gray. end end whos % Check what variables you now have stored. colormap(gray) . use the ind2gray command described in the section "How to convert between different formats" above. (Make sure you are in the same directory as your image file). imagesc(X) Adjust the brightness. This means that the image was loaded as an RGB image (see the section "RGB image above"). whos imshow(A) Note that when you typed whos it probably said that the size was 300x504x3. s is a parameter such that brighten(s) -1<s<0 gives a darker image.for i=1:256 for j=1:256 Ired(i. In that case. A=rgb2gray(A). Save the image as pic-home.jpg'). Displaying an image given on matrix form Operation: Matlab command: Display an image represented as the matrix X.jpg Next. % Convert to gray scale whos imshow(A) Now the size indicates that our image is nothing else than a regular matrix.j). imshow(Ired) % Display the reduced image.j)=I(i. Note: In other cases when you down load a color image and type whos you might see that there is one matrix corresponding to the image size and one matrix called map stored in Matlab. In order to convert the indexed image into an intensity (gray scale) image. However. you have loaded an indexed image (see section above). How to display an image in Matlab Here are a couple of basic Matlab commands (do not require any tool box) for displaying an image. do the following in Matlab. so let us convert it into a gray scale (or "intensity") image. Example 2 Go to the CU home page and down load the image of campus with the Rockies in the background.

Forming Pattern Vectors 19. Representation and Description . 5. I recommend you to use the command imshow to display an image. Shape Numbers 11. If you are using Matlab with an Image processing tool box installed. Distance Measures in MATLAB 17. M-Files Operators Flow Control Code Optimization InteractiveRepresentation and Description Some Additional MATLAB and IPT Functions Used Some Basic Utility M-Functions 433 x Contents 8. You can then use the command colormap(gray) to "force" Matlab to use a gray scale when displaying an image. Turn off the zoom function. Chain Codes 9. 4. Fourier Descriptors 14. Zoom in (using the left and right mouse button). 3. Computing 18. Descriptors 463 11. Displaying an image given on matrix form (with image processing tool box) Operation: Display an image represented as the matrix X.Sometimes your image may not be displayed in gray scale even though you might have converted it into a gray scale image. 7. Matlab command: imshow(X) zoom on zoom off y Analysis Objective of Project In this Project we are using an analog image and than converted into the digital image and than proceed by matlab tool Requirement Gathering In our project we are using the following matlab tools for digitalizing and processing an image List of the Matlab tools are given blow 1. Statistical Moments 13. 2.4.1 Function 12. Working with Strings in MATLAB 16. Polygonal Approximations Using Minimum-Perimeter Polygons 10. Object Recognition 15. 6. Recognition Based on Decision-Theoretic Methods 20.

Descriptors 463 11. Polygonal Approximations Using Minimum-Perimeter Polygons 40. Working with Strings in MATLAB 61. Some Basic Utility M-Functions 433 x Contents 23. Descriptors 463 11.4. Computing 33. Computing . Fourier Descriptors 44. Descriptors 463 11. Shape Numbers 56. Fourier Descriptors 59.21. Object Recognition 45. Polygonal Approximations Using Minimum-Perimeter Polygons 25. Some Additional MATLAB and IPT Functions Used 37. Distance Measures in MATLAB 32. Object Recognition 60. Representation and Description 36. Working with Strings in MATLAB 46. Recognition Based on Decision-Theoretic Methods 35. Statistical Moments 28.4. Distance Measures in MATLAB 47.1 Function 42. Chain Codes 24. Some Additional MATLAB and IPT Functions Used 52. Working with Strings in MATLAB 31. Some Basic Utility M-Functions 433 x Contents 38.1 Function 57. Some Additional MATLAB and IPT Functions Used 22. Distance Measures in MATLAB 62.4. Statistical Moments 58.1 Function 27. Computing 48. Shape Numbers 41. Polygonal Approximations Using Minimum-Perimeter Polygons 55. Statistical Moments 43. Forming Pattern Vectors 49. Chain Codes 39. Fourier Descriptors 29. Forming Pattern Vectors 34. Some Basic Utility M-Functions 433 x Contents 53. Chain Codes 54. Object Recognition 30. Representation and Description 51. Shape Numbers 26. Recognition Based on Decision-Theoretic Methods 50.

3 Wireframe and Surface Plotting 84. Some Additional MATLAB and IPT Functions Used 96. Modeling the Degradation Function 85. Representation and Description 100. Direct Inverse Filtering 86. Histogram Equalization 68. Freque 76. Forming Pattern Vectors 64. High-Frequency Emphasis Filtering 81.63. Segmentation Using the Watershed Transform 91. Histogram Matching (Specification) 79. Lowpass Frequency Domain Filters 129 4. 2 Logarithmic and Contrast-Stretching Transformations 66. Iterative Nonlinear Restoration 89. Model of the Image Degradation/Restoration Process 83. Representation and Description 95. 10. Obtaining Frequency Domain Filters from Spatial Filters 69. Summary 425 93. Generating and Plotting Image Histograms 67. Constrained Least Squares (Regularized) Filtering 87. Nonlinear Spatial Filtering 72. Recognition Based on Decision-Theoretic Methods 65. Image Processing Toolbox Standard Spatial Filters 73.5. Preview Computing and Visualizing the 2-D DFT in MATLAB 77. Region Splitting and Merging 94. Some Additional MATLAB and IPT Functions Used 101. Linear Spatial Filters 74. Polygonal Approximations Using Minimum-Perimeter Polygons . Using the Lucy-Richardson Algorithm 88. Nonlinear Spatial Filters 75. Linear Spatial Filtering 71.1 Basic Formulation 407 90. Some Basic Utility M-Functions 433 x Contents 97. Restoration in the Presence of Noise Only²Spatial Filtering 80. 5 Image Restoration 82. Chain Codes 98. -Controlled Watershed Segmentation 92.4. Chain Codes 103. An M-function for Filtering in the Frequency Domain 78. Polygonal Approximations Using Minimum-Perimeter Polygons 99. Spatial Filtering 70. Some Basic Utility M-Functions 433 x Contents 102.

interactive scopes. streaming. Representation and Description 109. spectral estimation. baseband communications. and other applications.4. multirate. For embedded system design and rapid prototyping. Some Additional MATLAB and IPT Functions Used 110. and multirate systems System objects for use in MATLAB and blocks for use in Simulink Algorithms for FFT and other transforms. Statistical Moments 116.1 Function 115. and implementation on embedded hardware.104. Descriptors 463 11. The blockset provides techniques for FFTs. including multichannel audio Fixed-point data type modeling and bit-true simulation Support for automatic C-code generation 1 . You can use the blockset to develop and validate real-time signal processing systems. Most algorithms and tools are available as both System objects (for use in MATLAB®) and blocks (for use in Simulink®). and LMS and RMS adaptive filters Signal generators and I/O support for multimedia files and devices. spectrum analyzers. and linear algebra Design and realization architectures for FIR. the blockset supports fixed-point arithmetic. statistical and linear algebra computations. Descriptors 463 11. and other tools for visualizing signals and simulation results. Shape Numbers 114.4. Shape Numbers 105. IIR. Key Features Simulation of streaming. C-code generation. Statistical Moments 107. Fourier Descriptors 108. Object Recognition Design and simulate signal processing systems Signal Processing BlocksetŒ provides algorithms and tools for the design and simulation of signal processing systems. signal statistics. It also includes signal generators. FIR and IIR digital filtering. spectral estimation. You can develop DSP algorithms for speech and audio processing. frame-based. Chain Codes 112.1 Function 106. Fourier Descriptors 117. Some Basic Utility M-Functions 433 x Contents 111. radar tracking. Polygonal Approximations Using Minimum-Perimeter Polygons 113. windowing. and multirate processing.

object oriented. .and ended up later being renamed to Java. FORTRAN.  It is platform independent  It is highly secure and robust. after an oak tree that stood outside Gosling's office and also went by the name Green . from a list of random words. virtual machines. and class libraries were developed by Sun from 1995. Special programs called applets that can be downloaded from the internet and played safely within a web browser. The original and reference implementation Java compilers. Gosling's goals were to implement a virtual machine and a language that had a familiar C/C++ style of notation.  It is simple and object oriented  It helps to create user friendly interfaces. multithreaded programming language with a strongly typed exception-handling for writing distributed and dynamically extensible programs.  It supports internet programming Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun's Java platform. in compliance with the specifications of the Java Community Process. Pearl and many others. safe. As of May 2007. simple. interpreted or dynamically optimized. Sun made available most of their Java technologies as free software under the GNU General Public License. Java a supports this application and the follow features make it one of the best programming language. You can use java to write computer applications that crunch numbers. Java is an object oriented programming language. Small talk. architectural. store data or do any of the thousands of other things computer software can do. play games. process words. byte coded. such as the GNU Compiler for Java and GNU Classpath. Java applications are typically compiled to byte code which can run on any Java virtual machine (JVM) regardless of computer architecture. garbage collected.  It supports multithreading. The Java language was created by James Gosling in June 1991 for use in a set top box project. The language derives much of its syntax from C and C++but has a simpler object model and fewer low-level facilities. third generation language like C. Java is a high-level. The language was initially called Oak.Software Requirement OVERVIEW OF LANGUAGE USED About J2EE & Microsoft Access JAVA Java is a small.  It is very dynamic. Others have also developed alternative implementations of these Sun technologies.

y Java SE (Standard Edition): For general purpose use on desktop PCs. 5. including: y Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices which are sufficiently limited that supplying the full set of Java libraries would take up unacceptably large amounts of storage. including being embedded in a web page as an applet. but rather an execution engine (called a virtual machine) and a compiler with a set of standard libraries which are implemented for various hardware and operating systems so that Java programs can run identically on all of them. 2. It should be designed to execute code from remote sources securely. the Java compiler. which converts Java source code into Java bytecode (an intermediate language for the Java Virtual Machine (JVM)). or platform. converts intermediate bytecode into native machine code on the fly. each of which provides a distinct portion of its overall capabilities. The Java Platform consists of several programs. It should contain built-in support for using computer networks. .Primary goals There were five primary goals in the creation of the Java language: 1. Also supplied are extensive libraries (pre-compiled into Java bytecode) containing reusable code. as well as numerous ways for Java applications to be deployed. For example. The sophisticated Java Runtime Environment (JRE). complementing the JVM with a just-in-time (JIT) compiler. The Java platform is the name for a bundle of related programs. It should use the object-oriented programming methodology. The platform is not specific to any one processor or operating system. 3. servers and similar devices. 4. is provided as part of the Java Development Kit (JDK). some available only in certain editions. y Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier client-server enterprise applications. from Sun which allow for developing and running programs written in the Java programming language. There are several other components. Different "editions" of the platform are available. It should allow the same program to be executed on multiple operating systems. It should be easy to use by selecting what were considered the good parts of other objectoriented languages.

Since JRE version 1. tend to run about as fast as native programs. or JVM. Java Virtual Machine The heart of the Java Platform is the concept of a "virtual machine" that executes Java bytecode programs. The use of a JIT compiler means that Java applications.The essential components in the platform are the Java language compiler. after a short delay during loading and once they have "warmed up" by being all or mostly JIT-compiled. and the runtime environment in which Java intermediate bytecode "executes" according to the rules laid out in the virtual machine specification. Sun's JVM implementation has included a just-in-time compiler instead of an interpreter. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution. The use of bytecode as an intermediate language permits Java programs to run on any platform that has a virtual machine available. the libraries. There is a JIT compiler within the Java Virtual Machine.2. . This bytecode is the same no matter what hardware or operating system the program is running under.

a large body of reusable code is provided to simplify the programmer's job. a program written in native code on the host hardware that interprets and executes generic Java bytecode.io libraries implement the required native code internally. the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. when some underlying platform does not support all of the features a Java application expects. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. they provide the programmer a well-known set of functions to perform common tasks. One should be able to write a program once. resulting in faster execution. the Java Platform provides a comprehensive set of standard class libraries. such as maintaining lists of items or performing complex string parsing.Although Java programs are Platform Independent. compile it once. the class libraries can either emulate those features using whatever is available. either before or during program execution. (In some JVM versions. standardized libraries are provided to allow access to features of the host machines (such as . Platform independence One characteristic. bytecode can also be compiled to native code. Like other standard code libraries.) Further. This is achieved by most Java compilers by compiling the Java language code halfway (to Java bytecode) simplified machine instructions specific to the Java platform. Finally. Every Operating System has its own JVM. Instead. the code of the Java Virtual Machine (JVM) that execute these programs are not. The code is then run on a virtual machine (VM). Tasks such as network access and file access are often heavily dependent on the native capabilities of the platform. or at least provide a consistent way to check for the presence of a specific feature. then provide a standard interface for the Java applications to perform those tasks. applications cannot rely on any of the existing libraries. means that programs written in the Java language must run similarly on any supported hardware/operating-system platform.net and java. Class libraries In most modern operating systems. The Java class libraries serve three purposes within the Java Platform. Because the Java Platform is not dependent on any specific operating system. The Java java. and run it anywhere. In addition. containing much of the same reusable functions commonly found in modern operating systems. platform independence.

the output of these compilers can only be run on a single architecture. More recent JVM implementations produce programs that run significantly faster than before. These implementations produced programs that ran more slowly than programs compiled to native executables. One technique. using multiple techniques. although there is an explicit compiling stage. Some see avoiding the VM in this manner as defeating the point of developing in Java. Dynamic recompilation can achieve optimizations superior to static compilation because the dynamic compiler can base optimizations on knowledge about the runtime environment and the set of loaded classes. the Java bytecode is interpreted or converted to native machine code by the JIT compiler. Note that. removing the intermediate bytecode stage. translate the Java language code to native object code. in which the VM can analyze the behavior of the running program and selectively recompile and optimize critical parts of the program. commonly known as static compilation. that take up the most execution time). often inner loops. More sophisticated VMs usedynamic recompilation. Another technique. and can identify the hot spots (parts of the program.graphics. known as just-in-time compilation (JIT). so the language suffered a reputation for poor performance. at some point. which results in a program that executes faster than interpreted code but also incurs compilation overhead during execution. as well as an optimised native code version of an application. Static Java compilers. JIT compilation and dynamic recompilation allow Java programs to take advantage of the speed of native code without losing portability. however it can be useful to provide both a generic bytecode version. The first implementations of the language used an interpreted virtual machine to achieve portability. This achieves good performance compared to interpretation. is to compile directly into native code like a more traditional compiler. Automatic memory management . translates the Java bytecode into native code at the time that the program is run. such as GCJ. for instance written in C or C++. threading and networking) in unified ways. but at the expense of portability.

One of the ideas behind Java's automatic memory management model is that programmers be spared the burden of having to perform manual memory management. for example. With the small cost of potential performance penalties (inner-loop construction of large/complex objects). In some languages the programmer allocates memory for the creation of objects stored on the heap and the responsibility of later deal locating that memory also resides with the programmer. holding and reusing them. Comparing Java and C++. In Java. from a low-level point of view. but at the same time loses the option of writing lower level code. a memory management model for specific classes can be designed in C++ to improve speed and lower memory fragmentation considerably). Additionally. a memory leak occurs and the program can consume an arbitrarily large amount of memory. developers may have no notion of when garbage collection will take place as it may not necessarily correlate with any actions being explicitly performed by the code they write. in non garbage collected environments. garbage collection is built-in and virtually invisible to the developer. Depending on intended application. there is a certain degree of overhead and complexity of user-code to track and finalize allocations. this facilitates thread-isolation (no need to synchronize as different threads work on different object instances) and data-hiding. The use of transient immutable value-objects minimizes side-effect programming. it is possible in C++ to implement similar functionality (for example. If. this can be beneficial or disadvantageous: the programmer is freed from performing low-level tasks. with the possible cost of adding comparable runtime overhead to that of Java's garbage collector. they may choose to more freely construct objects instead of pre-initializing. In Java. they can still occur but at higher conceptual levels. If the programmer forgets to deallocate memory or writes code that fails to do so. the developer assumes that the cost of memory allocation/recollection is low. the Java garbage collector automatically deletes the unreachable object. When no references to an object remain. the result is undefined and the program may become unstable and may crash. That is. and of added development time and application complexity if one favors manual implementation over using an existing third-party library. if the program attempts to deallocate the region of memory more than once. Often developers may box themselves into certain designs to provide reasonable assurances that memory leaks will not occur. and the Java runtime is responsible for managing the object's lifecycle. Additionally. Memory leaks may still occur if a programmer's code holds a reference to an object that is no longer needed in other words. is its address on the heap). The programmer determines when objects are created. The use of garbage collection in a language can also affect programming paradigms. The program or other objects can reference an object by holding a reference to it (which. this potential problem is avoided by automatic garbage collection. the garbage collection capability . Finally. freeing memory and preventing a memory leak.

for example. or JRE. One of the unique advantages of the concept of a runtime engine is that errors (exceptions) should not 'crash' the system. TECHNOLOGY SPECIFICATIONS Java Platform. End-users commonly use a JRE in software packages and Web browser plugins. Performance Java's performance has improved substantially since the early versions. and performance of JIT compilers relative to native compilers has in some tests been shown to be quite similar. C++. This is because the garbage collector may relocate referenced objects. Sun also distributes a superset of the JRE called the Java 2 SDK (more commonly known as the JDK). invalidating such pointers. Another reason that Java forbids this is that type safety and security can no longer be guaranteed if arbitrary manipulation of pointers is allowed. Java does not support pointer arithmetic as is supported in. in runtime engine environments such as Java there exist tools that attach to the runtime engine and every time that an exception of interest occurs they record debugging information that existed in memory at the time the exception was thrown (stack and heap values). Standard Edition (Java SE) and is the industry standard for implementing enterprise-class service-oriented . is the software required to run any application deployed on the Java Platform. Java Runtime Environment The Java Runtime Environment. Enterprise Edition (Java EE) builds on the solid foundation of Java Platform. Jar and debugger. only careful testing can reveal the true performance issues in any system. Javadoc. These Automated Exception Handling tools provide 'root-cause' information for exceptions in Java programs that run in production. as large heaps will cause apparently random stalls in performance.demands some attention to tuning the JVM. which includes development tools such as the Java compiler. Moreover. The performance of the compilers does not necessarily indicate the performance of the compiled code. testing or development environments.

stable. J2EE supports pure HTML as well as java applets or applications. transaction management (Enterprise JavaBeans). just to name a few. It is a powerful standard that is well-suited for Internet-based applications because it provides many of the underlying services such as HTTP request processing (Java Servlet API). there are a number of common business logic functions. although the tools they use to do so are quite different. Building on the Java Platform. Each component service adds a level of overhead to the application processing that must be considered. These practices include evaluating and selecting the right set of software components and services to do the job. and fast Java platform for the enterprise. deploying. Additionally. At the client side tier. such as error handling. API s and protocols that provide functionality for developing multitiered web based application. secure. security and reliability of server side technology. Java 2 Enterprise Edition (J2EE) technology is becoming a pervasive platform for the development of Internet-based. OVERVIEW OF J2EE Today more and more developments want to write distributed transactional applications for the enterprise and leverage the speed. This is no different than in other professions. reusable components and applications. EJB provide another layer . It provides a robust development platform upon which to build flexible. java centric environment from sun for developing. a carpenter or a steelworker both use an architecture plan to build things. An application development effort using J2EE should give careful consideration to the services provided by the platform and how application components can best utilize them. and managing multitier. Java EE adds the capabilities that provide a complete. There are a number of best practices one should consider in order to be highly effective in building J2EE components and integrating them into applications. building and deploying web based enterprise application online. J2EE is a platform independent. It relies on JSP and Servlet codes to create HTML or other formatted data for the client. modular architecture built upon J2EE will likely comprise a selection of the appropriate set of J2EE services combined with a custom foundation of common business logic functions. Java Platform. Standard Edition (Java SE).architecture (SOA) and next-generation web applications. J2EE is also a complex and changing standard that leaves the technologist with many design decisions and performance considerations. The J2EE platform consists of a set of services. A scalable. server-centric applications. Enterprise Edition (Java EE) is a set of coordinated technologies that significantly reduces the cost and complexity of developing. However. transactional business applications. that must be designed and de developed for each component and application. and messaging (Java Message Service).

The J2EE application parts shown in Figure  Client-tier components run on the client machine. To reduce costs and fast-track enterprise application design and development. and flexible transaction control. a unified security model. The figure shown below shows two multi tiered j2EE applications divided into the tiers described in the following list. Application logic is divided into components according to function.  Web-tier components run on the J2EE server. concurrency. Enterprise edition (J2EE) technology provides a component-based approach to the design.  Business-tier components run on the J2EE server. development.where the platform s logic is stored. the java2 platform. the ability to reuse components. An EJB server provides functions such as threading. DISTRIBUTED MULTI TIERED APPLICATIONS The J2EE platform uses a multi tiered distributed application model. J2EE Application1 Application Client J2EE Application2 Dynamic HTML Pages Client Machine Client tier JSP Pages Web Tier J2EE Server Enterprise Beans Enterprise Beans Business Tier Machine Database Database Database EIS Tier Server . assembly and distribut d e application model. security and memory management. integrated Extensible Markup Language (XML) based data interchange. Enterprise information system (EIS)tier software runs the EIS server. and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multi tiered J2EE environment to which the application component belongs.

They use the protocols and methods of the container for interacting with each other and with platform services. Containers provide a federated view of the underlying J2EE APIs to the application components. J2EE application components never interact directly with other J2EE application components. Containers provide the runtime support for J2EE application components.  Java Servlet and Java Server Pages (JSP) technology components are Web components that run on the server. such as declarative transaction management. A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and that following J2EE components: Application clients and applets are components that run on the client. A typical J2EE product will provide a container for each . In addition. you are free to concentrate on solving the business problem at hand. and other complex low-level details. J2EE components are written in the java programming language and are compiled in the same way as any program in the language. resource pooling. The component-based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components. Because you do not have to develop these services yourself. thin-client multi tiered applications are hard to write because they involve many lines of intricate code to handle transaction and state management. The difference between J2EE components and standard java classes is that J2EE components are assembled into a J2EE application. Verified to be well formed and in compliance with managed by the J2EE server. Interposing a container between the application components and the J2EE services allows the container to transparently inject the services defined by the components deployment descriptors. res ource pooling. multithreading. the J2EE server provides underlying services in the form of a container for every component type.  Enterprise Java Beans (EJB) components are business components that run on the server. J2EE CONTAINERS Normally. and state management.J2EE COMPONENTS J2EE applications are made up of components. security checks.

Here are some of the highlights: . transaction management. which include services such as security. and remote connectivity. Java Naming and Directory Interface (JNDI) lookups. and enterprise bean container. CONTAINERS AND SERVICES Components are installed in their containers during deployment and are the interface between a component and the low-level platform-specific functionality that supports the component. A J2EE server provides EJB and Web containers. Container settings customize the underlying support provided by the J2EE Server. enterprise bean. The component-based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components and the J2EE server provides underlying services in the form of a container for every component type. web component container. Figure: J2EE Server and Containers J2EE Server Browser Servlet JSP Page Application Client Application client container Web Container Enterprise Bean Enterprise Bean Database EJB Container Client Machine J2EE SERVER It is a runtime portion of a J2EE product. applet container.application component type: application client container. The assembly process involves specifying container settings for each component in the J2EE application and for the J2EE application itself. or application client component can be executed. it must be assembled onto a J2EE application and deployed into its container. Before a web.

and other features that are defined in the J2EE specification for purchase.  The application assembler takes a set of components that are developed by component providers and assembles them in the form of an enterprise archive (EAR) file.  The tool provider offers tools that are used for the development and packaging of application components as part of the J2EE specifications.  The deployer is responsible for deploying an enterprise application into a specific operational environment that corresponds to a J2EE platform product.  The J2EE transaction model lets you specify relationships among methods that make up a single transaction so all methods in one transaction are treated as a single unit. enterprise beans. After an enterprise bean is created. APIs. . a client invokes methods on it as if it were in the same virtual machine. applets.  The application component provider creates Web components. or application clients to use in J2EE applications.  The J2EE remote connectivity model manages low-level communications between clients and enterprise beans. The J2EE security model lets you configure a web component or enterprise bean so system resources are accessed only by authorized users. J2EE PLATFORM ROLES The J2EE platform also defines a number of distinct roles that are performed during the application development and deployment life cycle:  The product provider designs and offers the J2EE platform.  JNDI lookup services provide a unified interface to multiple naming and directory services in the enterprise so application components can access naming and directory services.

Understanding this separation of roles is important because it helps to determine the approach when developing and deploying J2EE applications. and on the platform run time. The system administrator is responsible for the operational environment in which the application runs. Application component providers and application assemblers focus on the application. Deployers and system administrators focus on providing the J2EE application with platform-specific artifacts. J2EE BENEFITS The J2EE specification provides customers a standard which can be used to ensure investment protection when purchasing or developing applications. transmission and representation for autonomous machine perception Application Areas of Image Processing 1) Television 2) Signal Processing 3) Satellite Image Processing 4) Medical Image Processing 5) Robot Control 6) Visual Communications 7) LawEnforcement . Comprehensive. Processing of image data for storage. Product providers and tool providers have a product focus. These roles help identify the tasks and people involved. independent Compatibility Test Suites ensure vendor compliance with J2EE Digital image processing focuses on two major tasks: y y Improvement of pictorial information for human interpretation.

(2nd edition 2000). New York. Important application areas are image analysis. video compression. 1982. Duda. portable digital devices. feature extraction. Heart: Pattern Classification and Scene Analysis. Wiley & Sons. . Woods . and even digital movies. character recognition. man and machine diagnostics. Its applications pass far beyond simple aesthetical considerations. person identification and industrial inspection. We have been flying over some elementary notions in image processing but there is yet a lot more to explore. It encloses subdisciplines like discriminant analysis. References: y y Digital Image Processing 2nd Edition Rafael C. and they include medical imagery. grammatical inference and parsing. error estimation.CONCLUSION: Digital image processing has become a vast domain of modern signal technologies. cluster analysis. security. Pattern recognition is the research area that studies the operation and design of systems that recognize patterns in data. Gonzalez Richard E. J. speech analysis. television and multimedia signals.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times