Object-Oriented Approach for Remote Sensing Image Processing Using Java Advanced Imaging

来源 :Journal of Earth Science and Engineering | 被引量 : 0次 | 上传用户:neo1997
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
  Abstract: The research works in remote sensing image processing often require the researchers to develop software programs to implement and test the algorithms developed. It has been observed that almost every researcher has their own way to write software program to implement the algorithms, due to the lack of programming standards. Subsequently, the future development of existing software programs by others becomes difficult. Moreover, the developed programs are often difficult to use for real applications. These phenomena are especially common in an academic environment, such as at universities. Although many standards for software development exist, they are normally too comprehensive for a none-computer-science researcher or graduate student. This paper proposes a simplified OOP (object-oriented programming) methodology for writing software programs in remote sensing image processing, which uses JAI (java advanced imaging) as a support. The methodology facilitates a researcher to decompose complex image processing algorithms into small, manageable modular components. This ensures the reusability and scalability of the developed programs. The programming language, JAI, provides a simple and high level programming interface for image processing. It reduces both time and effort of the programming considerably because it includes many inbuilt functions required for the image processing. A simple image processing software example has been developed using the same methodology to demonstrate the effectiveness of the methodology. The design approach of this software ensures reusability of each module. New algorithms can easily be added without going into detail about the prior implementation.
  Key words: Image processing, software, programming, algorithm, object-oriented approach, JAI.
  1. Introduction
  While doing research in the area of RS (remote sensing) image processing, programming (coding) is generally required to test and implement the algorithms developed at some point of time. It has been observed that especially in the academic environment such as at universities, there is no common standard for programming. At these places, the main focus of researchers is to write programs to implement the developed algorithms. Due to the lack of any common programming standard in research groups, researchers follow their own way of programming. This becomes more problematic when the researcher is not from a computer science or software engineering background. Writing programs without using programming standard creates many difficulties for researchers. It becomes difficult to manage program as it grows larger. Normally process-oriented approach is used by researchers while implementing the developed algorithms. This approach characterizes a program as a series of linear steps. This approach is good for small programs. However, problem with this approach appears as programs grow larger and complex. In spite of all these problems, researchers are able to produce results and publish journal papers. However, it becomes difficult to use programs developed by the researchers for any real application. In addition, it is difficult to understand programs by others for further development. These problems can be solved by including programming standard and object-oriented programming approach in programming. The object-oriented programming approach is intended to solve problems that appear with process-oriented programming approach. Object-oriented programming with programming standard can make programming easy for researchers and can save a lot of time and effort in programming. Furthermore, the developed program will be more readable for further development and can be used for real application. At present, there are many programming standards [1-5] and object-oriented programming approaches [6, 7] are available. However, they are more general and difficult to follow for the researchers having no computer science or software engineering background.   In this paper a simplified object-oriented programming approach and a programming standard has been developed for programming in the area of RS image processing. The paper discusses about the modular decomposition of the RS image processing algorithms into objects and a programming standard which leads to reusability and scalability of the developed software program. JAI (java advanced imaging) as a programming tool has been discussed which has various inbuilt functions for image processing and supports objects-oriented programming. Use of JAI makes programming easy and saves huge amount of programming time. A simple image processing software has been developed to demonstrate the effectiveness of the developed methodology. JAI has been used as programming language. A template for efficient input-output for large size Geo-Tiff images (up to 4 GB) has been developed in the software. This software acts as a template and new algorithms or functions can easily be added. This software includes basic functions like display, colour composition, edge-detection and histogram display.
  Fig. 1 Program and real objects.
  2. Object-Oriented Programming
  Object-oriented programming has become the predominant approach used in newly developed software. OOP represents an attempt to make programs more close to people think about and deal with the real world [8]. An object in OOP is a bundle of variables and related methods. Each object has a defined state and behaviour where state represents data (variables) and behaviour represents methods(functions). An example of program object and real world object is shown in Fig. 1. The object-oriented development is a set of tools and methods that enable programmers to build reliable, user friendly, maintainable, well documented, and reusable software programs.
  Object-oriented design is a design strategy where system designers think in terms of “things” instead of operations or functions as in the case of process-oriented approach. The executing system is made up of interacting objects that maintain their own local state and provide operations on that state information (Fig. 2). They hide information about the representation of the state and hence limit access to it. An object-oriented design process involves designing the object classes and the relationships between these classes. When the design is realised as an executing program, the required objects are created dynamically using the class definitions [6].   Object-oriented design is part of object-oriented development where an object-oriented strategy is used throughout the development process [6]:
  Object-oriented analysis is concerned with developing an object-oriented model of the application domain. The identified objects reflect entities and operations that are associated with the problem to be solved;
  Object-oriented design is concerned with developing an object-oriented model of a software system to implement the identified requirements. The objects in an object-oriented design are related to the solution to the problem that is being solved;
  Object-oriented programming is concerned with realising a software design using an object-oriented programming language. An object-oriented programming language, such as C++ and Java, supports the direct implementation of objects and provides facilities to define object classes.
  The above process involves refining the previous stage by adding detail to existing object classes and creating new classes to provide additional functionality. As information is concealed within objects, detailed design decisions about the representation of data can be delayed until the system is implemented. Object-oriented systems are maintainable as the objects are independent. They may be understood and modified as stand-alone entities. Changing the implementation of an object or adding services should not affect other system objects. Because objects are associated with things, there is often a clear mapping between real-world entities and their controlling objects in the system. This improves the readability and hence the maintainability of the design.
  Objects are potentially reusable components because they are independent encapsulations of state and operations. Designs can be developed using objects that have been created in previous designs. This reduces design, programming and validation costs. It may also lead to the use of standard objects(hence improving design readability) and reduce the risks involved in software development.
  Object-oriented programming implementation: As discussed in object-oriented programming, the problem or algorithm should be decomposed into small, reusable, and interacting objects. Each object should be independent and self-complete for its operation. Only a limited interaction among objects should be allowed. An example of the simplified object-oriented approach for developing edge-detection software is shown in Fig. 3. In this example, the whole task is divided into self-complete and reusable objects. The objects defined in this example are: TIFF image reader, image convolution, image magnitude, and TIFF image writer. The TIFF image reader object is responsible to read TIFF image and convert into matrix (2-D) format for processing.   Therefore, TIFF image reader object has defined input, output, and operation. This object also ensures reusability as it can be used in other software program. Similarly other objects (Image convolution, image magnitude, and TIFF image writer) are designed to ensure self-completeness and reusability. As shown in Fig. 3, interaction of these objects makes an edge detection software system. Similar object-oriented approach can be applied to implement the algorithms developed for RS image processing.
  Fig. 2 Interacting objects.
  Fig. 3 Simplified object-oriented approach.
  3. Programming Standard
  Programming (coding) standard is important because it leads to greater consistency in the code, increases productivity, reduces time and cost of programming, reduces errors in the program etc.. This leads to programs that are easier to understand, develop, and maintain by the researcher and the research group. Use of a common programming standard in a RS image processing research group is important because of following reasons: First, make researcher easy to write and manage large programs. Second, write efficient and readable programs. Third, make programs understandable and reusable to the research group for collaboration and further development. Fourth, develop a software product or system for real applications. A well written program saves a lot of time and effort of a researcher. Therefore, use of a common programming standard in a RS image processing research group will increase the productivity of the researchers and research groups not only in terms of journal papers but also in terms of software product development and reusability of previous research works. There are many programming standards available [1-5], however, they are more comprehensive in nature and hence difficult to follow these programming standards by a RS image processing researcher. Therefore, a programming standard has been developed specially for researchers in the area of RS image processing.
  Developing programs and methods: Once object-oriented model for algorithms or tasks has been designed, the next step is to implement the developed model by programming using suitable object-oriented language (C++, JAVA etc.). Each object is a combination of variables and related methods(functions). The task of an object should be further sub-divided into methods. There should be separate methods for each basic task to ensure reusability of methods and to make methods simple. For example, in TIFF image reader object (Fig. 3) has different functions to read TIFF tags and image data respectively. Following points should be considered while programming:   (1) The length of programs and methods should be kept short and manageable. Recommended size limit for a program is 200 lines and for a method is 25 lines;
  (2) Task of each object should be further divided into unique subtasks and each subtask should be implemented as a separate method (function);
  (3) A straightforward logic and flow-of-control should be used while programming to keep program simple and readable. Four spaces should be used as the unit of indentation;
  (4) Proper comments should be written while programming to make program understandable. Comments should be written at the beginning of each program and function. Comments are used to explain a program and help the reader to understand how and why the program works. Various types of comments are discussed in Ref. [9];
  (5) Proper naming conventions for classes (objects), functions, and variables should be used in the program. This makes programs more understandable by making them easier to read. Guidelines for naming classes, functions and variables are shown in Table 1. Meaningful names that convey the purpose of the classes, functions, or variable should be used. Choose names that are easy to pronounce, and avoid abbreviations. For example, use variable name imageLength instead of imL.
  A good documentation should be written while programming. This includes the algorithms details of the program. This helps in understanding the program by others for further development.
  4. JAI (Java Advanced Imaging)
  The JAI (Java Advanced Imaging API) provides a set of object-oriented interfaces that supports a simple, high-level programming model for image processing. JAI is a high-performance, platform-independent, extensible image processing framework [10]. JAI implements a set of core image processing capabilities including image tiling, regions of interest, and deferred execution. Furthermore, JAI offers a set of core image processing operators including many common points, area, and frequency-domain operators. JAI is intended to meet the needs of all imaging applications [11]. JAI operators are easy to implement which considerably reduces the programming work.
  An example program for Sobel edge detection is shown in Fig. 4. This program clearly shows that the use of JAI reduces the programming work up to a large extent as compared to other programming languages like C, C++, and JAVA.
  An imaging operation within JAI is summarized in the following four steps:   Read image from file or from some other sources;
  Define the image operation;
  Execute the image operation;
  Save the output image in file.
  Table 1 Naming conventions.
  Fig. 4 JAI program for Sobel edge detection.
  5. JAI Features
  JAI is intended to meet the needs of image processing, and more. JAI offers several advantages for application development for RS image processing as compared to other programming languages. JAI has been used by many well know organisations including NASA, Oracle, German Federal Ministry of Education and Research. A few of JAI advantages are listed as follows [11].
  (1) Cross-platform imaging and device independent: Implementations of JAI applications will run on any computer where there is a Java Virtual Machine. In addition, the processing of images can be specified in device-independent coordinates;
  (2) Distributing imaging: JAI is well suited for client-server imaging by way of the Java platform’s networking architecture and remote execution technologies;
  (3) Object-oriented API: JAI is totally object-oriented as in JAI, images and image processing operations are defined as objects;
  (4) Powerful and high performance: A variety of implementations are possible, including highly-optimized implementations that can take advantage of hardware acceleration and the media capabilities of the platform;
  (5) Multiple file format support: The JAI codec architecture consists of encoders and decoders capable of writing and reading several different raster image file formats such as BMP,FPX, GIF, JPEG, PNG, PNM, and TIFF;
  (6) Support core image processing operations: JAI provides a core set of the operators required to support the basic image processing operations. For specialized applications, JAI provides an extensible framework that allows customized solutions to be added to the core API.
  6. Software Implementation
  A simple image processing software example has been developed to demonstrate the effectiveness of the developed methodology. The simplified object-oriented approach and programming standard with JAI (Java advanced imaging) have been used in the software development. A high level software design diagram is shown in Fig. 5. As shown in Fig. 5, the software has been divided into several independent objects. Each object has a defined input, output, and operation. Integration of these objects makes the complete software. Thus, the design approach of this software ensures reusability of each object. Furthermore, new algorithms or process can easily be added to the software using the existing objects. For example, the image reader and image writer objects(Fig. 5) can be used while implementing algorithm for image classification.   GUI (graphical user interface) of the developed software is shown in Fig. 6. The simplified object-oriented design shown in Fig. 5 has been used in the implementation of the software. Each object(Fig. 5) is further divided into basic tasks and then each basic task has been implemented by programming as methods. Aforementioned programming standard has been used while programming to increase readability of programs. JAI programming language has been used in programming which has considerably reduced the programming work. The design strategy of this software facilitates that the new functions can easily be added without going into details of the prior implementations. Also, the existing objects like image reader (Fig. 5) can directly be used in new function.
  Furthermore, the image reader and image writer objects have been implemented using JAI and LibTiff library [12] which are capable to read and write large size GeoTiff images (up to 4 GB) efficiently. Algorithms details of these objects are out of scope of this paper.
  Fig. 5 High level software design.
  Fig. 6 GUI of the software.
  7. Conclusions
  In this research work a simplified object-oriented approach and a programming standard for software programming has been developed for researchers working in RS image processing area. A simple image processing software has been developed using same approach which demonstrates that the developed approach is effective for implementing algorithms in RS image processing area. It has been shown that the use of JAI (Java advanced imaging) in programming can considerably reduce programming work and hence can save a lot of programming time of researchers. The programming standard has been discussed to make program more readable and manageable. The developed approach will make programming easy and effective for researchers and at the end a researchers will be able to develop a software product out of their research work. In addition, the work which is done by a researcher can easily extend further.
  Acknowledgments
  This research was funded by the Canada Research Chairs Program.
  References
  [1] D. Lea, Draft Java Coding Standard [Online], 1996, http://g.oswego.edu/dl/html/javaCodingStd.html.
  [2] Java Code Conventions 1997, Sun Microsystems [Online], http://java.sun.com/docs/codeconv/CodeConventions.pdf.
  [3] T. Holf, C++ Coding Standard [Online], 2008, http://www.possibility.com/Cpp/c++_coding_standards.p df.   [4] S.W. Amber, Writing Robust Java Code [online], 2000, http://www.ambysoft.com/downloads/javaCodingStandar ds.pdf.
  [5] S. McConnell, Code Complete—A Practical Handbook of Software Construction, Microsoft Press, Redmond, WA, 1993.
  [6] Ian Sommerville, Object-oriented design [Online], 2000, http://www.comp.lancs.ac.uk/computing/resources/IanS/ SE6/PDF/Object-oriented-design.pdf.
  [7] The Java Tutorial, Sun Microsystems [Online], http://download.oracle.com/javase/tutorial/java/concepts.
  [8] J. Eck David, Object-Oriented Programming Using Java, Technical report for object-oriented programming using Java, School of Computer Science, University of KwaZulu-Natal, KwaZulu-Natal, 2006.
  [9] R. Sedgewick, K. Wayne, Writing Clear Code [Online], 2000, http://introcs.cs.princeton.edu/java/11style/.
  [10] Java Advanced Imaging, Oracle-Sun Developer Network(SDN) [Online], http://java.sun.com/javase/technologies/desktop/media/jai/.
  [11] Programming in Java Advanced Imaging, Sun Microsystems [Online], 1999, http://java.sun.com/products/java-media/jai/forDeveloper s/jai1_0_1guide-unc/JAITOC.fm.html.
  [12] LibTIFF—TIFF Library and Utilities [Online], http://www.libtiff.org.
其他文献
Restoration, Strengthening and Planning in Italian and German Reconstruction after World War lI: Essay in Three Steps
期刊
Venetian Buildings Are“of”and Not“on”the Lagoon
期刊
Measuring the Floor Area of Buildings: Problems of Consistency and a Solution
期刊
The Italian Construction Sector Scenario between Economic Crisis and the Need for More Energy Efficiency
期刊
Abstract: The aim of this paper is to apply techniques for PDE (partial differential equations) and mathematical morphology for the extraction of cartographic features in digital images of remote sens
期刊
Abstract: Physicochemical analysis of 15 samples (five well water, five soils and five stream sediments) was carried out to determine the distribution of heavy metals namely: Pb, Zn, Cd, Cu, Fe, As, M
期刊
Abstract: In this paper, it described the architecture of a tool called DiagData. This tool aims to use a large amount of data and information in the field of plant disease diagnostic to generate a di
期刊
Abstract: The objective of this study was to find highly nutritious native plants to feed cattle in northern Veracruz (Mexico) as an alternative to avoid deforestation for pasture establishment. Six f
期刊
Abstract: One of ways of intensification of process of manufacture of heterogeneous tinned products of fruits and vegetables is the use of sated water steam (Patent of USSR No. 500792). This process a
期刊
Abstract: This paper will review three broad types of political implications of emergency management, since historically emergency management was considered only a function of law enforcement and fire
期刊