METAPAPER Image Enhancer : A Graphic Editor to Apply Numerous Effects in Digital Image

Introduction Image Enhancer was developed in keeping certain perspectives in mind. Even the openCV, being one the finest real time computer vision library in recent times, does not come with an “out-of-the-box” GUI, apart from some burning issues like complex usability, memory management schemes and developmental environment dependencies. Since there are a very limited number of open source software for performing image processing research so the need for incorporating all digital imaging filters integrated in one place was one of the major goals of this development. As a result, the researchers in the fields of image processing and computer vision could utilize it in their research or developers may extend the code for specific application development. Also the ability to edit the parameters of an image processing algorithm is another important aspect in Image Processing research which increases the reusability of the algorithm significantly. The parameters of the digital imaging filters can be customized according to end user choices so that the reusability and popularity of the software increases for the researchers/developers who want to develop an image processing workflow. Currently, it also provides support for several image file types apart from jpg and bmp. The source code of Image Enhancer Release Candidate version can be found here (http://imageenhancer.codeplex.com/SourceControl/latest). It was awarded with “100% FREE” & “100% CLEAN” awards by several popular software archives of the world. Using Image Enhancer is quite simple. The end user navigates through the three interfaces by just pressing the “Next” or “Back” buttons. If any problem occurs during image conversions then the errors and exceptions are handled in a proper manner with relevant warning or error dialogues. Users can also use the “Refresh” button to reload the picture viewer area. As an example, when an input image is loaded in picture viewer area (Fig. 1), we choose a specific filter to be applied upon the image. When we press the specific filter button, a separate dialogue appears for us to choose parameter values of that specific filter (Fig. 2). When the threshold values are chosen, users can get their desired image as per their requirements (Fig. 3). Similarly, the video buffering interface has a drop down list in which the users can select the USB/ Surveillance camera according to their choice from a list of cameras, if connected to the computer. ‘Start’, ‘Stop’ buttons starts and stops video buffering in the picture box viewer respectively. ‘Save’ button saves the snapshot to the disk drive after stopping the video buffering. The user interface was built in Windows Form which provides access to native MS Windows interface elements by wrapping the Windows API in managed code as a replacement of old and complex Microsoft Foundation Class (MFC) library in C++. The code was written in Visual C# and SOFTWARE METAPAPER

(1) Overview Introduction Image Enhancer was developed in keeping certain perspectives in mind.Even the openCV, being one the finest real time computer vision library in recent times, does not come with an "out-of-the-box" GUI, apart from some burning issues like complex usability, memory management schemes and developmental environment dependencies.Since there are a very limited number of open source software for performing image processing research so the need for incorporating all digital imaging filters integrated in one place was one of the major goals of this development.As a result, the researchers in the fields of image processing and computer vision could utilize it in their research or developers may extend the code for specific application development.Also the ability to edit the parameters of an image processing algorithm is another important aspect in Image Processing research which increases the reusability of the algorithm significantly.The parameters of the digital imaging filters can be customized according to end user choices so that the reusability and popularity of the software increases for the researchers/developers who want to develop an image processing workflow.Currently, it also provides support for several image file types apart from jpg and bmp.The source code of Image Enhancer Release Candidate version can be found here (http://imageenhancer.codeplex.com/SourceControl/latest).It was awarded with "100% FREE" & "100% CLEAN" awards by several popular software archives of the world.
Using Image Enhancer is quite simple.The end user navigates through the three interfaces by just pressing the "Next" or "Back" buttons.If any problem occurs during image conversions then the errors and exceptions are handled in a proper manner with relevant warning or error dialogues.Users can also use the "Refresh" button to reload the picture viewer area.As an example, when an input image is loaded in picture viewer area (Fig. 1), we choose a specific filter to be applied upon the image.When we press the specific filter button, a separate dialogue appears for us to choose parameter values of that specific filter (Fig. 2).When the threshold values are chosen, users can get their desired image as per their requirements (Fig. 3).Similarly, the video buffering interface has a drop down list in which the users can select the USB/ Surveillance camera according to their choice from a list of cameras, if connected to the computer.'Start', 'Stop' buttons starts and stops video buffering in the picture box viewer respectively.'Save' button saves the snapshot to the disk drive after stopping the video buffering.fine-tuned for optimal time and space complexity to support faster execution of the software.
Image Enhancer contains 64 simple and complex imaging filters covering well known image enhancement techniques (e.g.brightness correction, increment or decrement, contrast correction or stretching, RGB scale rotation), Linear Edge Detection Techniques (Simple, Canny, Sobel), Dithering (Simple, Burkes, Sierra, Stucki, Jarvis Judis Ninke), Interest Point Detection (Susan Corner Detector) and many more.Almost all the parameters of an image processing algorithm can be modified generically

Implementation and architecture
Image Enhancer was written using C# and Microsoft .Net 4.0 framework which allows high performance, scalable and robust software development for windows platform.The main files are Form1.cs,Form2.cs& Form3.cswhere the events for filter invocation of all the filters were written.Each filter was implemented in its own separate class e.g.Image Binarization was implemented in Binarization.cs, Adaptive Smoothing in AdaptiveSmooth.csand so on.Form1.cs.design,Form2.cs.design & Form3.cs.design are the designer classes contain the code for the three interfaces.When the software runs, the first GUI is loaded.Using the "Open Image" button, which is basically an "OpenFileDialogue" control in Windows Form, the input image is loaded into the image frame (Fig. 1).The GUI is quite simple and user friendly, which contains all the buttons and functionalities for digital imaging filters.The output of the applied filter is shown in the picture box to get a widening idea about the effect of the applied imaging filter.The GUI has the "Save" button option through which the filtered image may be saved to disk drive according to the choices of the users.Also the snapshot from a video source (USB/Surveillance Camera) may be taken and saved using the third form interface.

Using the code
Code section of Image Enhancer is located at Microsoft CodePlex repository (http://imageenhancer.codeplex.com/SourceControl/latest) under the GNU Lesser General Public License (LGPL).In the following code example, Binarization filter is applied on the input image.At the very beginning, all namespaces required for this project in .NET were imported into the workspace.At first, when the "Binarize" button is clicked from the interface, the Binarize_Click event is invoked (Line 6).
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using AForge.Imaging.Filters; using AForge.Math.Random; using AForge.Imaging.Textures; using System.IO; using System.Drawing.Imaging; using AForge.Imaging; Until the filter is applied on the input image, current cursor icon will be a busy cursor indicating that a task is running in the background (Line 10).Then the input image (rgb_image) is copied to a Bitmap object for further processing (Line 12).An object of Binarization class is created (Line 15) which is a partial windows form class capable of accepting Binarization threshold (0-255 for an 8 bit image) from users.Next an instance of FiltersSequence class from AForge.Imaging.Filters namespace is created to add and apply Grayscale and Threshold filters (Line 19-26).Belonging to AForge.Imaging.Filters namespace, The FiltersSequence class, represents collection of filters, which need to be applied to an image in sequence.Using this class, user may specify set of filters, which will be applied to source image one by one in the order users define them.The Grayscale filter converts the RGB image to grayscale, Otsu Threshold filter is used for threshold setting in binarized images and to convert from grayscale image to binary image.These filters are combined in FiltersSequence object and applied on the input image and output image is stored.The resultant binarized image is shown in the picture box viewer (Line 28).If the input image to this method stub is null then the user is prompted to browse for the input image (Line 31-34).Any errors or exceptions occurred during conversion from RGB to binary image, is properly handled through catch block (Line 36-40).

Parameter customization of imaging filter
Like other image editors, editing the threshold parameters of a specific image processing algorithm is also an important aspect of Image Enhancer.The following part (Code Segment 2) represents the Binarization class through which users can edit the binarization threshold.Whenever, threshold value selected from the Binarization dialogue control, the SetValue() method (Line 14-17) present in Binarization.cs,sets the value of the threshold and GetValue() method (Line 18-22) returns the threshold value to the Binarize_Click event.Whenever the user chooses the threshold value from Binarization dialogue, it is ensured whether the user enters a valid threshold value within the range (For an 8 bit image, the RGB intensity varies between 0 -255) (Line 32-37) otherwise a warning dialogue appears notifying the user to enter valid threshold values (Line 38-40).
Whenever the Binarize_Click event occurs, an object of binarization class is created, through which the GetValue() Depth of Inheritance Tree (DIT) -It is defined as the maximum length from the node to the root of the tree which was found to be 7 here.Since all classes inherit from System.Object class, the depth 7 means 6 child classes are utilized under System.Object.(Ref. 1) could be of utter use and attraction to the undergraduate and graduate student community, aiming to start their research career in this field.Researchers working in computer vision and digital image processing in academia and industry will also find this software useful.Apart from this, it is also attractive for general end users interested in photography, multimedia, animation & graphic editing utility.

Support Mechanisms for Image Enhancer
Image Enhancer is not part of any officially funded project, hence does not attain any donation or support from any agency or person.However, when developers, researchers or end users face problems related to codereusing, compatibility and implementation, they are encouraged to post their issues in official project hosting page at CodePlex (http://imageenhancer.codeplex.com/discussions) or to contact the developer directly (Abhisek Hazra, opensource@abhisek-hazra.in) for urgent support.

Fig. 4 :
Fig. 4: Example of parameter customization, on the extreme left, the original image is shown, while the right ones reflect 25%, 50%, 75% increment in saturation respectively.© Playboy.All Rights Reserved.

Fig. 5 :
Fig. 5: Jittering parameter customization, on the extreme left, the original image is shown, while the right ones represent the images with 3, 6, 9 and 12 as their jittering radius in which pixels can move.© Playboy.All Rights Reserved.
The user interface was built in Windows Form which provides access to native MS Windows interface elements by wrapping the Windows API in managed code as a replacement of old and complex Microsoft Foundation Class (MFC) library in C++.The code was written in Visual C# and Image Enhancer was tested and hosted by several popular software archives like SoftPedia, CNET, Freeware Files, ZDNet, Soft Tango and others.A stable Release Candidate (RC) version has been made available in which some major modifications were done which were not present in the earlier Beta version.The download link for the Image Enhancer (both Release Candidate & Beta Version) from CodePlex repository is (http://imageenhancer.codeplex.com/releases).