A Framework for Experimenting with Java 2D Image-Processing Filters Louisville KY

Look into the image-filtering classes of the Java 2D API.  Also learn how to write a framework program that makes it easy to use those image-filtering classes to modify the pixels in an image and to display the modified image.

Local Companies

Developware, Inc.
1.877.280.2392
Bakery Square
Louisville, KY
Epicor Software Corporation
502-412-7666
9100 Shelbyville RD
Louisville, KY
Oasis Computer Solutions
502-429-6902
9000 Wessex Pl
Louisville, KY
Epicor Software
502-339-7748
8700 Westport RD
Louisville, KY
Information Systems Solutions Inc
502-245-7003
12730 Townepark Way
Louisville, KY
National Innovative Software Solutions LLC
502-495-0548
2108 Plantside DR
Louisville, KY
Allscripts Healthcare Solutions
502-412-1102
1302 Clear Springs Trce
Louisville, KY
Bellwether Software
502-426-5463
9900 Shelbyville Rd
Louisville, KY
Halo Group, Inc.
502-657-6468
9900 Corporate Campus Drive
Louisville, KY
Kizan Technologies
(502) 327-0333
9721 Ormsby Station Rd
Louisville, KY

provided by: 
Originally published at Internet.com


Java Programming, Notes # 450 * Preface * Image-Filtering Examples * LookupOp Examples * AffineTransformOp Examples * BandCombineOp Examples * ConvolveOp Examples * RescaleOp Examples * ColorConvertOp Example * Background Information * Preview * Discussion and Sample Programs * The program named ImgMod05a * The program named ImgMod05 * Run the Programs * Summary * References * What's Next * Complete Program Listings -----------------------------------

Preface

An image-processing framework

In the lesson entitled Processing Image Pixels using Java, Getting Started, I provided a framework program named ImgMod02 that makes it easy to: * Modify the pixels in an image * Display the modified image * Compare the modified image with the original image

I upgraded that framework a couple of times in subsequent lessons. (See References below.)

That framework and the updated framework named ImgMod02a that I provided in a subsequent lesson were based on the assumption that you would get right down in the mud and learn how to implement pixel-modification algorithms by working directly with the pixels.

Sometimes there is an easier way

In some cases, writing your own pixel-modification or image-filtering program is the best and most effective way to go. However, in some cases, there is an easier way. As of the date of this writing, the Java 2D API provides the following classes that can be used to filter an image and modify the pixels in that image: * LookupOp * AffineTransformOp * BandCombineOp * ConvolveOp * RescaleOp * ColorConvertOp

For those cases where it is possible to use one of the existing classes to satisfy your image-filtering needs, it is usually easier to write a program using one or more of the above classes than it is to write your own image-filtering program.

In this lesson, I will provide a framework program named ImgMod05 that makes it easy to use the above classes to modify the pixels in an image and to display the modified image.

The Java 2D API doesn't always provide an easier way

Before going any further, however, I need to point out that despite the fact that the image-filtering classes in the above list from the Java 2D API provide a great deal of capability, there are many interesting image-filtering needs that can't be satisfied by the capabilities of those classes.

(See, for example, the section entitled Highliighting an image in the earlier lesson entitled Processing Image Pixels using Java, Getting Started. Although I haven't given it a great deal of thought, I don't believe that any of the classes in the above list could be used to create the spotlight effect shown in that lesson. I will also explain later that the ConvolveOp class is very restrictive, and that you may find that you can do a better image-processing job by writing your own classes for this purpose than by using the ConvolveOp class.)

However, for those cases where the classes from the Java 2D API will satisfy your needs, you should probably use those classes rather than to invent your own classes.

Not a lesson on JAI

If you arrived at this lesson while searching for instructions on how to use the Java Advanced Imaging (JAI) API, you are certainly welcome to be here. However, that is not yet the purpose of the lessons in this series. (Maybe I will add lessons on the JAI API later.)

The JAI API provides image-processing capabilities that this series won't address for awhile. The next several lessons in this series will be limited to either the capabilities of the Java 2D API, or the capabilities of image-filtering programs that you write yourself.

A new framework for the image-filtering classes of the Java 2D API

In this lesson, I will provide and explain a new framework program that makes it easy to: * Use the image-filtering classes of the Java 2D API to write and evaluate image-filtering programs. * Display the modified image along with the original image for easy comparison in a before and after sense.

A driver program

This program is designed to be used as a driver that controls the execution of another program that actually processes the pixels.

By using this program as a driver, you can concentrate on writing and executing image-filtering algorithms without having to worry about many of the details involving image files, image display, etc.

A simple image-filtering program

Also in this lesson, I will provide and explain the first of several image-filtering programs designed to teach you how to modify an image by using the image-filtering classes of the Java 2D API.

The image-filtering program provided in this lesson will be relatively simple with the intent being to get you started but not necessarily to produce a modified image that is especially interesting.

More interesting image-filtering programs

Figure 1 through Figure 19 show examples of the use of the image-filtering classes from the earlier list without showing the code used to produce the images.

Future lessons will show you how to write image-filtering programs that use the image-filtering classes that were presented in the earlier list.

Viewing tip

You may find it useful to open another copy of this lesson in a separate browser window. That will make it easier for you to scroll back and forth among the different figures and listings while you are reading about them.

A disclaimer

The programs that I will provide and explain in this

Author: Richard G. Baldwin

Read article at Internet.com site

Featured Local Company

Developware, Inc.

1.877.280.2392
Bakery Square
Louisville, KY
www.developware.com

Related Local Event
SUR/FIN - Annual Technical Conference and Exhibit of Surface Finishing
Dates: 6/16/2009 - 6/18/2009
Location: Kentucky International Convention Center
Louisville, KY
View Details