Introduction
In this first tutorial you are going to know the main concepts behind Marvin Framework. Marvin is a cross-platform, open-source image processing framework that aims to provide a high productive environment. The main goal of the framework is to integrate the efforts from researchers, software developers and end-users in order to improve the usage of image processing applications. Using Marvin, reasearchers can implement image processing aproaches and deliver it as plug-ins. Software developers can incorporate Marvin plug-ins in their applications to provide image processing features. Finally, end-users uses the applications and can give a feedback in order to create a development cycle. Therefore, the architecture of the solutions developed using Marvin can be separated in three layers, as shown in Figure 1. In the green layer are the features provided by the framework, developed by the Marvin team. In red are the plug-ins, developed by third-parties using the interfaces provided by the framework. Finally, in the blue layer are the final applications, developed by third-parties using the framework interfaces and plug-ins. Plug-insThe previous topic showed that the framework basically only provides features to manipulate images and develop applications instead of providing image processing algorithms. Disregarding a few exceptions, the most algorithms are implemented externally as a plug-in. In this fashion, the development of new algorithms are not necessarily dependent to the development of the framework itself. People working with very specific features can extend the framework in favor of their applications.The code below shows how simple is to load and use a MarvinPlugin in your application: MarvinImage image = MarvinImageIO.loadImage("./res/image.jpg"); MarvinImagePlugin plugin = MarvinPluginLoader.loadImagePlugin("org.marvinproject.image.edge.edgeDetector.jar"); plugin.process(image,image,null,MarvinImageMask.NULL_MASK, false); image.update(); MarvinImageIO.saveImage(image, "./res/image_output.jpg"); Image ProcessingCurrently the image is represented only in RGB color model. However, there are implementations to convert the image to other color models such as HSV (e.g. skin detection plug-in). Images are represented by the MarvinImage class in which provides methods to manipulate the pixel data. The IO operations are provided by the MarvinImageIO class. For more information about the Marvin framework classes, check out the Javadoc.Video ProcessingThe video processing is provided by Java Media Framework (JMF). Video frames are converted into MarvinImage and then can be processed by any Marvin plug-in. Since the JMF project is halted, other solutions are being considered to address this issue.Multi-threadingNowadays, multi-core architectures are in the most PC, workstations and servers, so it is important to explore all the potential of these computing architectures. Using MarvinThreading, plug-ins and applications can work on multiple images at same time or in the same image using multiple threads. Furthermore, the framework provides features to make these processes as easy as possible to plug-in and software developers.The image below ilustrates two threads processing the same image. In this example, the statiscal plug-in "Maximum" spent 632 and 369 milliseconds, respectively for one and two threads. The image resolution is 873x601 pixels and the computer used in the test was a AMD Turion 64x2. Unit TestingUnit testing is a technique used to improve the quality over a software development process. The benefits provided by it can also be used in image processing application development. Therefore Marvin provides methods for verification and validation of some of its objects. For example, there are methods to check whether or not the output of a plug-in meets the requirements. All unit testing features are provided integrated with JUnit in which brings many benefits.MarvinEditorMarvinEditor is an application that integrates Marvin plug-ins with a simple image manipulation environment. It can either be used by developers and users that are intended to use Marvin plug-ins for image manipulation purposes. Below is presented the MarvinEditor interface.Currently MarvinEditor suports the following features:
|
||