You are on page 1of 39

Table of Contents

ABSTRACT......................................................................................................................3 ABREVIATIONS ............................................................................................................3 INTRODUCTION.............................................................................................................4 IMAGE PROCESSING....................................................................................................5 INTRODUCTION TO IMAGE PROCESSING...............................................................5 PENTIUM MMX..............................................................................................................5 DESCRIPTION..................................................................................................................5 USABILITY.......................................................................................................................5 COMPATIBILITY.............................................................................................................6 MICROSOFT DIRECTX...................................................................................................6 DESCRIPTION..................................................................................................................6 USAGE AND USABILITY...............................................................................................6 PORTABILITY ................................................................................................................6 IMAGE PROCESSING IN MATLAB..............................................................................7 DESCRIPTION..................................................................................................................7 USABILITY.......................................................................................................................7 USER LEVEL....................................................................................................................7 EXPANDABILITY ..........................................................................................................7 PORTABILITY ................................................................................................................8 INTERNET .......................................................................................................................8 AUTOMATION.................................................................................................................8 ADOBE PHOTOSHOP ....................................................................................................8 DESCRIPTION..................................................................................................................8 USABILITY.......................................................................................................................8 USER LEVEL....................................................................................................................9 EXPANDABILITY ...........................................................................................................9 Writing a plug-in................................................................................................................9 Using a plug-in...................................................................................................................9 EXTENSIBILITY...............................................................................................................10 PORTABILITY .................................................................................................................11 METHOD OF IMAGE PROCESSING..............................................................................11 AUTOMATION.................................................................................................................11 PROBLEM DESCRIPTION...............................................................................................11 IMPORTANCE OF THIS PROJECT................................................................................11 RESEARCH AND ANALYSIS - USABILITY.................................................................11 STANDARD TOOLBAR...................................................................................................12 DESIGN AREA..................................................................................................................12 MODIFIER TOOLBAR ....................................................................................................12 RESEARCH AND ANALYSIS - EXTENSIBILITY .......................................................13 RESEARCH AND ANALYSIS - EXPANDABILITY.......................................................14 COMPONENT SPECIFICATION .....................................................................................15 OVERVIEW. ......................................................................................................................15 DECLARATIONS. .............................................................................................................15 EXCEPTIONS. ....................................................................................................................16 EVENTS. .............................................................................................................................16
1|Page

INPUTS:...............................................................................................................................16 OUTPUTS:...........................................................................................................................16 PRODUCT EVALUATION.................................................................................................17 SCREEN SHOTS.................................................................................................18 1. HOME PANEL18 2. OPEN FILE..19 3. OPENED IMAGE....20 4. EXPORT FILE.21 5. CROP IMAGE......22 6. CROPPED IMAGE..23 7. RESIZE.24 8. RESIZED IMAGE....25 9. ROTATE IMAGE.26 10. BRIGHTEN IAMGE.27 11. BLUR28 12. SHARPEN.29 13. EDGE DETECT.30 14. WATERMARKING..31 15. ABOUT US....32 16. TOOLS....33 16.1 CALCULATOR.33 16.2 NOTEPAD..34 16.3 MS PAINT..35 16.4 MS WORD..36 17.EXIT.....37 FUTURE DEVELOPMENT...................................................................................................38 BIBLIOGRAPHY...................................................................................................................38

ABSTRACT
Image processing tools are being rapidly developed for different operating system platforms. These tools are usually big in size, not completely portable across different platforms and lack an ability to be efficiently fielded on the Internet. The purpose of this project is to research current image processing tools and create a
2|Page

simple, easy and flexible image processing widget based on the Java Imaging (JI) API. This widget will address the above-mentioned general problems associated with most image processing tools. This is followed by a more detailed discussion on creating a java widget based on JI. The features that make this widget easy to use to the average user, as well as any software developer wanting to expand it, are discussed. Further advantages and disadvantages of this widget are also discussed. This is followed by a specification for such a widget. This specification is developed into a design and finally implemented. This software is completely developed in java.

ABREVIATIONS
OS Operating System GUI Graphical User Interface JI Java Imaging

3|Page

INTRODUCTION
Image processing is the ability to extract information from images. This is the shortest and simplest definition of image processing. To extract information of any kind from an image, the image has to be first transformed into a data set. Mathematical operations can now be applied on to this data set. This thesis starts off with an introduction to image processing. This is followed by descriptions of current image processing applications and libraries. There are numerous programs that handle image processing. Matlab is one of the more popular programs. Image processing involves intensive mathematics and Matlab being a program designed for intensive mathematics is ideal for writing image-processing applications. Matlab allows a user to manipulate at the lowest level, that is, individual values in the data set. ImageMagick is another program that can do image processing. Unlike Matlab, ImageMagick has command line tools that can be used for image processing. Another program, Photoshop, is a cross between image processing and art. Photoshop was not designed for image processing functions per se, but rather, for creative and artistic needs. DirectX is a set of drivers from Microsoft that are optimised for 2D operations. To use DirectX, a user would have to write a program which calls the necessary routine from the corresponding DirectX file. DirectX was designed to give programmers a standard API (for Windows) for such operations as image processing. This information gives some necessary background information about todays image processing applications. Java Imaging (JI) is the Java Application Programming Interface (API) for handling complex graphics. Unlike other graphics libraries, which are known to have portability problems, JI does not have this problem as JI has been almost completely1 written in Java and thus is as portable as Java itself. Consequently, this portability comes at a cost, namely the speed of processing. JI is slower than other graphics libraries as it runs in conjunction with a Java Virtual Machine (JVM). Despite this, JI is still popular and has other advantages. JI is probably the most viable graphics library that can be deployed over the Internet. The power is already in the JVM in the clients browser. JI inherits Java's highly modular programming structure allowing programmers to build highly modular programs. This project requires a graphical component that is based on JI. A whole report is dedicated to discussing the project. This report starts with a formal problem description with possible enhancements that can be made. This is followed discussions on the areas that were researched for this project. Why these areas were deemed important, sample scenarios and some sample solutions are also discussed. This is followed by a formal specification for the component. The specification mainly defines the state machine for such a component. Component behavior, event generation and response are also defined.
4|Page

In the next chapter, this specification is developed into a design in Universal Modelling Language (UML). This design shows how objects interact with other objects and the relationships as well. The final chapter is the conclusion. The degree of success achieved by this project is discussed here. Further improvements are suggested. This is followed by a partial code listing in the appendix. All the interfaces used in the implementation are given, but no source code is included. The primary goal of this project is to create a component that will allow fast and easy access to image processing tools, while being lightweight and portable across multiple operating system platforms.

IMAGE PROCESSING
INTRODUCTION TO IMAGE PROCESSING
The brief definition of image processing is the ability to retrieve information from images. This is achieved by, first transforming the image into a data set. Mathematical operations can be done on this new format. Different kinds of information are retrieved by the different operations that are performed on the data set. It is important to note that the reverse, constructing an image from data, is also image processing. 0 Image processing is used in many different fields. In medicine (the ultrasound machine, X-ray machine), astronomy (Hubbles telescope taking photographs in X-rays, Gamma rays, Infrared) and military (image maps used in ground hugging missiles), these are just a few of the fields in which image processing is widely used. Image processing is also used in every day items (digital cameras) to mission critical systems.

PENTIUM MMX
DESCRIPTION
Generally known as Multimedia Extension, MMX is a set of instructions that were added to the original Pentium microprocessor from Intel Corporation. MMX consists of 57 [13] new instructions. The purpose of the MMX instruction set extension was to provide a hardware performance boost for certain types of multimedia programming. Specifically, MMX instructions are designed to allow processing of large amounts of similar data at once, using a single (or with the minimum number of) instruction(s). This is known as a Single Instruction Multiple Data [4] or SIMD. Objects that benefit from this boost include, audio, video and graphics because they contain a large amount of similar data. Therefore, image processing using MMX can receive a tremendous boost in processing speed over non-MMX processing.

USABILITY
It is not possible for non-MMX applications to use the power of MMX. This means that
5|Page

applications have to be specifically written for MMX. On a higher level, this means that the source code will have to be recompiled with a compiler that can generate and optimise MMX instructions.

COMPATIBILITY
Most of the microprocessors that came out after the introduction of MMX, support the MMX instruction set. Currently, nearly all major computer microprocessor manufacturers, including Intel, AMD and Cyrix, support MMX. Therefore, programmers are almost guaranteed of MMX supported hardware (at least for the desktop computers).

MICROSOFT DIRECTX
DESCRIPTION
Microsoft describes [14] DirectX as an advanced suite of multimedia APIs built into the Windows Operating System. Introduced in 1995 and recognized as a standard on the Windows platform, DirectX provides a standard development platform (for Windowsbased PCs only) by enabling software developers to access specialized hardware features without having to write hardware-specific code. DirectX is used extensively in games programs as intense image processing is involved. A games programmer could design a game and implement the game using DirectX without getting concerned about what hardware would be available on end computer.

USAGE AND USABILITY


DirectX provides developers with a common set of instructions and components, across all Windows based platforms. At the same time, DirectX also takes advantage of high performance hardware such as dedicated 3D graphics cards. DirectX achieves this by providing a "hardware abstraction layer" (HAL), which uses software drivers to communicate between computer software and computer hardware. As a result, developers can use DirectX to write a single version of their product for the wide range of hardware devices and configurations that exist and at the same get high performance. DirectX provides another layer called the hardware emulation layer (HEL). This layer acts as software-based drivers for actual hardware when hardware is unavailable. For example, HEL could emulate 3D graphics when there is no 3D graphics available.

PORTABILITY
DirectX is only available for the Windows platform. Therefore, programmers wanting to port their programs to other Operating Systems, will have to re-write their program. However, DirectX applications are completely portable across all2 Windows platforms. This is because all Windows platforms use the same DirectX drivers.

6|Page

IMAGE PROCESSING IN MATLAB


DESCRIPTION
Matlab is a program that specialises in numerical computation. Consequently, Matlab is often used by engineers [5] and students to solve problems involving complex arithmetic. Image processing in Matlab is essentially done by the Image Processing Toolbox. Basically, this is just a collection of image processing functions. These functions rely on the mathematical computational engine behind Matlab to do these functions. Many of these functions are in script format, specifically Matlab M files. Thus, a user wanting to view the code can easily view the source code, (possibly) make modifications and create new functions. Matlab is one of the most popular image processing applications available. Matlab allows manipulations at the lowest level, such as the modification of a single value in a data set. Many extended functions for image processing are available.

USABILITY
Image processing in Matlab is the same as using Matlab for any other problem. Matlab usage requires a user entering commands at the prompt to ask Matlab to do things. This is very similar to the command shell in Unix or Linux. The user can enter a single command to do something or write a script file (or even multiple files) to do a more complex task. In Matlab, this script file would be called an M file. Using these image-processing functions in Matlab requires a general understanding of Matlab itself. Further, to create any complex image manipulation, would require some knowledge of writing M files and thus the Matlab script language. The user should also have some knowledge in the mathematical workings involved in image processing to get the best result efficiently. There are books and tutorials (including one at the Matlab homepage) available to learn image processing in Matlab.

USER LEVEL
Image processing in Matlab requires a user who already understands how to use Matlab. The user must also know how to write scripts in Matlab to get the best result. Further, the commands used are short and technical requiring the user know what the commands do. Thus, image processing in Matlab is mostly aimed for professionals [18], as it requires a skilled user.

EXPANDABILITY
7|Page

Most of the image-processing functions available in Matlab are scripts, which are (usually) available for viewing and modification. Even if it were not, Matlab still allows the user to use them in writing new functions. These new functions can then be used to do more image processing. This means that Matlab provides, almost unlimited expandability. Moreover, as the functions are just script files, functions are easily copied over to other machines decreasing wasted time and increasing efficiency.

PORTABILITY
Currently, Matlab is supported on a number of popular Operating Systems and a number of computer platforms (notable exception: Apple Macintosh). Matlab applications are fully portable over different platforms without any modifications. Matlab data files are automatically converted to compatible formats when moved to different platforms, relieving the user from doing any manual file format changes.

INTERNET
Matlab has not been designed to be used over the Internet. Matlab requires a lot of processing and system resources and thus is unsuitable to be used over the Internet. Though it is conceivable that applications written in Matlab may be used over the Internet, it is unlikely as there are more suitable image-processing libraries for this specific purpose.

AUTOMATION
Matlab provides complete automation for all purposes. A user could write a script to perform a common image-processing sequence or even compile it as an application. The application can now be used by anyone to perform the image-processing sequence.

ADOBE PHOTOSHOP
DESCRIPTION
Photoshop is one of the most powerful and popular graphics applications in the (Windows) market today [6]. The current version (version 6) is the latest in this series of products and has built on the stability and performance of its predecessors. Photoshop can also be obtained in a suite of (Adobe Systems Incorporated) applications that allow a high degree of flexibility and collaboration within the applications contained in the suite. Photoshop is not a true image processing application. Photoshop has been primarily designed for creative arts or artists or for users aspiring to be a similar profession. Photoshop has been included in the study because it offers an enormous amount of
8|Page

image processing functions to assist the user in getting better artistic results.

USABILITY
A Photoshop user would be faced with a GUI that is familiar to any Windows user. Photoshop contains similar menu systems (menus file, edit, ) and toolbars (standard toolbar tool buttons new, open, save, ) as any standard windows application. Thus in Photoshop, most users would not be spending additional time learning basic operations as they are identical to standard Windows applications. Graphic design in Photoshop is based on toolboxes and palettes. As is almost standard in all graphic design applications, Photoshop uses floating toolboxes and palettes. This means that a particular toolbox or palette can be dragged around to a position the user wants and will be visible at all times, that is, it will be on top of the application. This allows fast access to frequently used tools and customized familiarity; a different configuration could be easily changed into a particular configuration by just dragging and moving the toolboxes and palettes around. This also means that most users that have been using other image processing applications should find at least some familiarity when they switch over to Photoshop.

USER LEVEL
Photoshop is a high-level image processor. Users are not required to write any code to perform any image processing functions. This makes Photoshop ideal to the novice user. Users without a mathematical background and theories involved in image processing will also like what Photoshop has to offer. This is because Photoshop offers all image processing functions with a GUI front-end. A typical result of selecting an image processing function will give the user a dialog window (if it is not already open) with (possibly) all the options that that function offers. The user can change any values in these options until such time as the user is completely satisfied. Usually, the user would be able to preview the changes in real time from within the function itself. This improves the usability of the software.

EXPANDABILITY
To expand Photoshop, that is, to add more image processing functionality, a user would have to install a plug-in. This would be additional software that can be run from within the Photoshop environment. With the enormous popularity of Photoshop, there are a number of plug-ins available both from the maker of Photoshop and third party vendors. These plug-ins are available as both commercial software which a user will have to buy and free software.

Writing a plug-in
Photoshop comes with its own collection of APIs for programmers wanting to write plug-ins. Plug-ins are thus written to conform to these APIs. This involves intimate
9|Page

knowledge of programming (usually C, C++ or other languages). Further, the programmer must be familiar with the image processing libraries and the functions it contains to effectively leverage the power behind the Photoshop image-processing engine. The programmer must also be familiar with at least some of the mathematics involved image processing. For example a convolution operation requires a matrix of input values. The mathematical knowledge would let the programmer know what these values are and how they could be effectively manipulated. Knowledge of the Photoshop image processing libraries would allow the programmer to program efficiently using the Photoshop image-processing engine. The programming knowledge would allow the programmer to link these aspects to create a new image processing function. In conclusion, writing plug-ins is not something that the average user or even an advanced user could achieve with ease. It is more suitable, to buy commercial plug-ins or contract another company to write a plug-in that is suited to the users needs.

Using a plug-in
A plug-in would install itself quite easily if it were correctly written. After installation, the plug-in tool appears and behaves just as a native tool would. A user familiar with Photoshop itself should not find a big difference between using native tools and the plug-in.

EXTENSIBILITY
Photoshop is propriety software developed by Adobe Systems Incorporated. Adobe has not released the source code for Photoshop and as is the nature of propriety software, only the owner is allowed to change it. Therefore, a feature such as a particular print order that is not supported by Photoshop could not be added by a third person, user or programmer. Only Adobe can add such features.

PORTABILITY
Photoshop is available only for the Windows platform. This makes it virtually impossible for a user relying on another operating system to make an attempt at using Photoshop for image processing needs because it is unlikely that the user would dual boot or run another operating system on a virtual machine for the sole purpose of using Photoshop.

METHOD OF IMAGE PROCESSING


Photoshop uses two methods for image processing. A user could make changes directly to the image. Simple operations such as image transformations are usually done with direct image manipulation. The second method, which is much more powerful and flexible, is to use layers. A layer is simply a set of modifications that can be individually altered. An image seen through that layer would be modified as per the settings on that
10 | P a g e

layer. To make additional changes, a user could modify, add or delete the layers properties or apply another layer on top. Layers are also used to achieve image animations.

AUTOMATION
Photoshop has no methods to automate a sequence of image modifications. Some features such as the layers feature [16], reduce the work load to apply the same modifications on multiple images, but true automation is not available.

PROBLEM DESCRIPTION
In brief, this project requires an image-processing component that is reusable, lightweight, easy to use and flexible. Specifically, this component will be based on the JI API, which is the Java extension that provides complex image processing functions. Further, this component would be a graphical component and should provide a rapid application development environment (in image processing terms). A user should be able to draw up a sequence of changes by placing image processing tools and connecting them in the order that the user wants. Further areas of relevance include the ability to field this component or field an application containing this component on the Internet, both easily and efficiently. The ability to use this component just as any other Java component (buttons, labels and so on), gives a Java programmer quick access to this component without involving any undue hardship.

IMPORTANCE OF THIS PROJECT


JI in its current form is a collection of Java classes that are designed to do image processing [7]. At the moment, JAI does not have a GUI, which can be used to access the image-processing tools available in JI. Code has to be written to do this job. This is the first time that GUI has been designed for JI. Further, JI has the highest chance of becoming a cross platform image-processing library that is lightweight. This project would create a graphical component that can be used to access the image processing tools available in JI. Instead of writing code, users would be able to just drag and drop the required tools on to a canvas and graphically connect them in the order the user desires. Users can see the changes on the spot by double clicking any tool. Further, for the JI tools that allow user input (such as Convolution, Threshold), real time image modification can be seen as the user keeps changing the available options. This component can also be fielded on the Internet in the form of a Java Applet. The advantage here is that much of the processing power already resides on the users computer (in the form of a JVM and JI API) and this component would be acting as a front-end to this existing resource base. Where these resources are not available, they
11 | P a g e

have to be downloaded only once and are available from the Internet for free. This component has also been designed with the future in mind. As the JI API is upgraded, the newer tools can be added without modifying and recompiling this component. This component can also be extended easily to add newer features such as the undo function. This is done by providing a clear step-by-step instruction guide to the developer on achieving this.

RESEARCH AND ANALYSIS - USABILITY


This involves making the component easy and intuitive to use to the average user. Since this component would have a graphical interface, standard graphical interfaces were looked at. This component was divided into three main sub-components and each of these sub-components were looked at individually.

STANDARD TOOLBAR
Most current graphical applications have common standard tools. The most basic of these would be the standard toolbar. Usually this toolbar is always visible and is located at the top of the window. This toolbar contains the most basic operations including file operations (open, save, export) and other commonly used tools such as undo and redo. Most of these operations would be included in our component and thus a standard toolbar was included at the top of the component. Operations that were included in this toolbar are file operations (open, save, export) and edit ha button has several features like crop, brighten, resize and other tools features.

DESIGN AREA
This would be the area in which the user would create an image processing design. This process would involve pasting image-processing tools and moving them around within this area. It would also require a connector object that will connect the tools on this area to form a logical sequence of modifications for the input image(s). Further, design environments (for designing anything) provide some common and basic features that help the user. These include a visual grid and the ability to automatically snap objects to particular grid locations. This forces the tools and objects on the design area to be aligned to the grid and evenly spaced. These features are visually appealing to the user. The design area had to be appealing and easy to use. A visual grid and the ability to automatically snap objects to the grid were added to the drawing area. Further, the requirement to be able to move all objects on this area required that a drag feature be built into this sub-component that would handle the moving of all objects within this design area. Other enhancements include: The easy differentiating of the selected object from the rest of the objects on
12 | P a g e

this area. Messages to the status bar to inform the user of what has happened in response to a user event.

MODIFIER TOOLBAR
This toolbar contains the tools specific to our component and image processing. Thus, there is nothing to compare this toolbar with. The following reasoning has been used to design this toolbar. Some tools, notably the ones that are not associated with JI, would be used more frequently. These include, an input tool (used to select the image to process in the design), a connector tool (used to connect the tools on the design area), an output tool (to declare where the design ends) and a viewer tool (a help tool to display the image at that point in the design). These tools would be visible to the user at all times. The tools associated with JAI would be divided into logical categories. This would help in un-congesting this toolbar. The user would be able to select different JAI tools by selecting the corresponding category from a combobox. This would load the appropriate tools onto the toolbar. Thus, this toolbar would contain the most frequently used tools followed by a combobox which would allow the user to select a category of JI tools the user wants to use. The method of adding these tools to the design area would be to click the tool on the toolbar and then by clicking on the point in the design area where you want to add the tool. This would add the tool that was clicked on to the design area, at the point (the closest snap to point) the user clicked.

RESEARCH AND ANALYSIS - EXTENSIBILITY


Extensibility would be one of the key areas of importance in building this component. Extensibility requires the addition of extra features to the core component and this should be achieved relatively quick and easy. For example, if it was decided to add an undo function, there should be a clear and precise way of adding the necessary button(s) and corresponding code with a minimal amount work. This area is important because a need may arise in the future for a particular feature in the core component. The ability to quickly upgrade the component is an increase in productivity (or even revenue if releasing commercially). Extensibility involves adding code to the core component. For a person (programmer) not involved in building this component and not knowing what kind of data structures and relations are used, this might seem to be a difficult task. This problem is similar to a programmer writing a program to communicate or extend an existing program. Most of the current applications in the world come with their own APIs to alleviate this problem. The programmer would write the program conforming to this API and it is the API that communicates with the core component. Thus, it protects the programmer from having to know any internal, implementation specific details. This general method can be applied to our component on a smaller scale. Whilst APIs are generally quite big, our component is quite small and this makes it even easier.
13 | P a g e

However, there is one major difference. For our component, we would need to write the source code for the core component as well (as stated in the above API comparison). To achieve this, we would be using interfaces to communicate between the major subcomponents in our image-processing component. Lets look at the example raised previously, that is, the addition of an undo function and lets assume that this function is going to be added to the standard toolbar. We know that interfaces are used to communicate between the major sub-components. If we look at the interface used by the standard toolbar we would see all the methods used by the standard toolbar to communicate to the other sub-components. To this interface we add the method that will be used to handle the undo function. This would be the part that is visible to the user (the button on the toolbar). Next, we take a look at the sub-component that implements the standard toolbar interface, that is, the subcomponent that actually contains the code for the methods in the standard toolbar interface. To this, we add the extra method we defined in the standard toolbar interface, and write the code that will implement the undo function. This is the standard procedure that will be used to extend our component. work independently of each other, as all they need is the interface. Furthermore, while there would be some final integration testing of the new component, much testing can be achieved individually (including compilation) while the other part is still being written. This saves time, reduces the requirement that all programmers be familiar with the component (familiarity with the sub-component is enough) and thus increases efficiency in fielding extensibility to our component.

RESEARCH AND ANALYSIS - EXPANDABILITY


Expandability is another area that would be of importance in building our component. Expandability involves the addition of extra image-processing functions to our component and again there should be a way to achieve this relatively quickly and easily. For example, if it was decided to add a threshold function, there should be a clear and precise way of adding the necessary button(s) and corresponding code with a minimal amount work. This area was of particular interest because our component was being based on the JI API. Any API was going to change with time. There could be slight updates to major overhauls of the whole API. Whole sets of new functions could have been added in a newer version. Therefore, the initial conclusion was that the part of our component that communicated with JAI had to be at least made extremely flexible so that more functions could be added later. This same problem could be looked at from a different perspective. How would a programmer be able to add more image-processing tools without disturbing any of the existing tools or the core component? The solution to this problem was to make all image-processing tools separate from the core component. That is, all image-processing tools would be loaded by the core component at runtime. Thus, in contrast to extensibility, expandability does not require the addition or modification of the core component or any existing tools. The programmer is only expanding our component. In solving this problem what has been achieved is the complete separation of the core
14 | P a g e

component from the JI tools. This means the core component can exist without any JI tools. Of course the user could not do any image processing, as there are no JI based tools. But the user could still experiment with our component by adding and connecting the basic tools (image input, viewers and connectors). This is another example of the highly modular design of our component. The following method was designed for modularizing the JI tools of our component. JI tools are divided into logical categories. Following this procedure, makes it quick and easy to add more image processing tools. Much of the work required is already done for the programmer. The highly modular design results in the following advantages. The programmers are only allowed to create and modify the files within the modules they are creating, which allows them to add extras to the JI tools that they are writing while at the same time not changing any of the existing tools or the core component. This maintains consistency among all the tools. Multiple programmers can work simultaneously on different modules or even the tools contained in the same module. Again, these programmers are able to work independently of each other, as all of them are following the specification required by the core component. Complete individual testing can be attained before packaging saving valuable production time. Compatibility is virtually guaranteed if the programmer followed the specification provided by the core component. The highly modular design also protects the programmer from having to know any of the internal workings of the core component. The specification provides the (minimal) methods that have to be implemented. The programmer has discretion to add more. This usage of modules has one other important advantage. Namely, modules can be traded commercially.

COMPONENT SPECIFICATION
OVERVIEW.
Software specifications are nearly always very abstract. The specification does not talk about implementing data structures, even less, the implementing language. However, this specification requires a component, similar to a re-usable Unix widget, for the Java Advanced Imaging (JI) Application Programming Interface (API). Thus, we already know what language this component would be implemented in and hence have a good idea of the final product. In Java, such components are implemented as a JavaBean (or bean for short). Hence, the title of this specification. Despite the fact that we already have prior knowledge of the final product, the specification is kept as abstract as possible. The Image Processing Bean (IP) is a JavaBeans component, which brings together the many image processing features present in the JAI API. The IP would have a fully featured Graphical User Interface (GUI). The IP would not have any keyboard shortcuts. This is in part because the IP is not a full application and due to the fact that a shortcut key in the IP may conflict with another shortcut key in the host application. However, this issue is raised in the expected changes section.
15 | P a g e

The aim of the IP would be to shorten the time taken to modify an image (or streaming images) by providing the user with a friendly GUI based environment that allows the user to see what's being modified/created approximately on the fly. It is approximate because the user will have to design and run it to see the output. As all JavaBeans, the IP would be fully compatible with all java graphical components. For example: the IP could be added to Sun Microsystems' Forte software suite and be used as one would use a java button.

DECLARATIONS.
This section specifies the constants, warnings, exceptions and events that are going to be used in the IP. Respective values and descriptions are given in the following subsections.

EXCEPTIONS.
This section lists and describes all possible messages that a user may get during interaction with the IP. All message identifiers are lowercase, post fixed with for exception messages or for warning messages.

EVENTS.
This section lists and describes all possible events that may be triggered by a user during interaction with the IP. Event Name Description Click open clicking the open icon on the standard toolbar Click save clicking the save icon on the standard toolbar Click crop clicking the cut icon on the standard toolbar Click resize clicking the copy icon on the standard toolbar Click watermarking clicking the paste icon on the standard toolbar Click rotate clicking the delete icon on the standard toolbar Click brighten clicking the execute button on the standard toolbar

OUTPUTS:

Warning/Exception messages displayed via dialog boxes. Property change dialog boxes in response to double clicking modifier buttons. Updates to the drawing area. Image modification as per user requirements when user wants the results.
16 | P a g e

PRODUCT EVALUATION
A final product was created to the specification and design given above in this document. The product met all requirements given in the above specification. However, only a few JI operations were implemented for the final testing of the product. These operations were divided into two categories and thus were in two different modules. The component was tested with no modules, with one module and two modules. Each time, the component loaded correctly with the available tools (if available). Each tool button on each toolbar was tested individually. The drawing area was tested with a variable number of tools and connectors on them, and checked if mouse operations worked correctly for all objects on the drawing area. Clipboard functions were tested for modifier tools on the drawing area. Property setting functions for modifier tools were checked. All of these tests passed. The component was also tested with invalid modules. The component executed correctly by dumping the module when an error state was reached. Finally a simple design was created on the drawing area. The design executed correctly giving the expected output. More complex designs were created and they also gave the correct output. It should be noted that the save and open function were not completed for this component. The completed part for both of these functions worked correctly. One very important feature that was not in the specification was implemented. This was an on the fly check of the modified image. This involved double clicking any tool on the drawing area, which, if connected correctly, opened up the properties window with the modified image up to that point. Further, modifier tools with custom properties were made to show real-time image modification in response to changes the user makes to its settings. Thus, less time was wasted in running the whole design.Other features that were implemented but was not in the specification were arrows on connectors showing the direction of the connection, special highlighting of connectors that were connected correctly and tool tips for all tools in the component. All these features worked correctly.

17 | P a g e

SCREEN SHOT 1. Home Panel: This screen shot is home panel(main control panel) of this image processing software. We can select any operation this screen.

18 | P a g e

2. Open File : This screen show for opening a file. This is linked in file menu. Through this we can browse a image file that will show in our panel.

19 | P a g e

3. Opened File : This screen show for opened file in home panel.

20 | P a g e

4. Export File : This screen is for exporting a file extension of image file should be specifies. This is linked in file menu. Through this we can save a screen image on hard disk.

21 | P a g e

5. Crop : Through this panel or option we can crop a image file and then click to save this file will updated and cropped. If we do not want to change same file and want to store into another then click to export for saving on hard disk.

22 | P a g e

6. Cropped Image : Through this panel or option we can crop a image file and then click to save this file will updated and cropped. If we do not want to change same file and want to store into another then click to export for saving on hard disk.

23 | P a g e

7. Resize Image : This screen opens for opening resize a image file. This is linked in edit menu. It requires a height and width for a image.

24 | P a g e

8.Resized Image: This is now resized with specified height and with.

25 | P a g e

9. Rotate Image : This screen show scroll through this we can rotate a image file.

26 | P a g e

10. Brighten Image : Through this we can change brightness of a image file using slider.

27 | P a g e

11. Blur Image : Through this we can do blur the image file using button. This is in increasing mode.

28 | P a g e

12. Sharpen Image : Through this we can do sharpen a image file using button. This is in increasing mode.

29 | P a g e

13. Edge Detect Image : Through this we can detect the edges in image file using button. This is in increasing mode.

30 | P a g e

14. Watermarking : Watermarking is used for writing on image. This writes the text on image file. If we write this same text multiple times then this makes bold.

31 | P a g e

15. About Us : A internal window from will about us information. We can give the information about the team.

32 | P a g e

16. Tools : This is used for if we required tools then we can directly access the tools through this aaplication.

16.1 Calculator

33 | P a g e

16.2 Notepad

34 | P a g e

16.3 MS Paint

35 | P a g e

16.4 MS Word

36 | P a g e

17.Exit This is menu through which we can exit this application.

These all snap shot will describe all the feature of the software.

37 | P a g e

FUTURE DEVELOPMENT
The above mentioned on the fly check could be extended to show changes to images that lie higher up on the hierarchy, such as the final output. Thus, a user would be able to see real-time changes, say, of the final output by changing settings on other tools. This would further boost productivity. Scripting ability could also be added to the component. This would be the major change, if I were to do a future version of this product. The specification and the resulting design had no requirement for scripting capability to be built into the component. Therefore, it is expected that this change may result in significantly more work than a simple extension or an addition of a feature. This would also allow the component to be used in a non-graphical sense, to create a design from within the script, and get the final output. The parts that were not finished, saving a design and opening a design, is expected to be implemented in the next upgrade of the product or in a new release. Other standard features can be added to this component.

BIBLIOGRAPHY
[1] Theo Pavlidis, Algorithms for Graphics and Image Processing, Computer Science Press, 1982. [2] John C. Russ, The Image Processing Handbook, CRC Press, 1995. [3] Ernest L. Hall, Computer Image Processing, Academic Press, 1979. [4] David Bistry [et al.], Complete Guide to MMX Technology, McGraw-Hill 1997. [5] Joe King, Matlab for Engineers Second Edition, Addison-Wesley Publishing Co., 1998. [6] Barry Haynes, Photoshop 6 Artistry Mastering the Digital Image, New Riders Publishing, 2001. [7] Lawrence H. Rodriguez, Building Imaging Applications with Java Technology, Addison-Wesley Publishing Co., 2001. [8] Michael J. Laslo, Object-Oriented Programming featuring Graphical Applications in Java, Addison-Wesley Publishing Co., 2001. [9] Mitchell Waite [et al.], Data Structures and Algorithms in Java, Waite Group Press, 1999. [10] Matthew Robinson [et al.], Swing, Manning [11] Daniel M Hoffman, Software Design, Automated Testing and Maintenance, International Thompson Computer Press, 1995. [12] C. T. Arrington, Enterprise Java with UML, John Wiley and Sons, 2001. [13] www.intel.com [14] www.microsoft.com

38 | P a g e

39 | P a g e

You might also like