Using the Java 2D BandCombineOp Filter Class to Process Images Los Angeles CA

Learn how to write programs that extract Raster objects from an image and then use the BandCombineOp image-filtering class of the Java 2D API for a variety of image-processing purposes.

Local Companies

Moyea Software
92295612365
Hot building, ring street
LA, CA
Interneer Inc.
8005586832 x85
6101 W. Centinela Ave.
Culver City, CA
Cornerstone Concepts Inc
818-247-3909
600 W Broadway
Glendale, CA
Greene Computer Corporation
(818) 956-4961
200 S. Louise Street
Glendale, CA
Corticalx Inc Software Solutions & Technology
818-500-0881
425 E Colorado St
Glendale, CA
Alphatier Systems
818-409-8920
517 Griswold St
Glendale, CA
TimeTECH - Customizable Time and Attendance / Workforce Management Solutions
905-677-7009
7420 Airport Rd 203
Mississauga, CA
Hutchinson & Bloodgood, LLP
(818) 637-5000
101 N. Brand Blvd. #1600
Glendale, CA
Telsoft Solutions
818-545-8680
100 N Brand Blvd
Glendale, CA
Abraxas Technologies Inc
818-502-9100
450 N Brand Blvd
Glendale, CA

provided by: 
Originally published at Internet.com


Java Programming Notes # 458 * Preface * General Background Information * Preview * Discussion and Sample Code * Run the Program * Summary * What's Next? * References * Complete Program Listing -----------------------------------

Preface

Part of a series

In an earlier lesson entitled "A Framework for Experimenting with Java 2D Image-Processing Filters" (see References), I taught you how to write a framework program that makes it easy to use the image-filtering classes of the Java 2D API to process the pixels in an image and to display the processed image.

At the close of that lesson, I told you that future lessons would teach you how to use the following image-filtering classes from the Java 2D API: * LookupOp * AffineTransformOp * BandCombineOp * ConvolveOp * RescaleOp * ColorConvertOp

In several previous lessons listed in the References section, I taught you how to use the LookupOp and the AffineTransformOp image-filtering classes.

In this lesson, I will teach you how to use the BandCombineOp image-filtering class to perform a variety of filtering operations on images. I will also teach you how to extract and filter Raster objects from images. (The use of Raster objects is completely new to this lesson.)

I will teach you how to use the remaining classes from the above list in future lessons.

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 listings and figures while you are reading about them.

Supplementary material

I recommend that you also study the other lessons in my extensive collection of online Java tutorials. You will find those lessons published at Gamelan.com. However, as of the date of this writing, Gamelan doesn't maintain a consolidated index of my Java tutorial lessons, and sometimes they are difficult to locate there. You will find a consolidated index at www.DickBaldwin.com.

I also recommend that you pay particular attention to the lessons listed in the References section of this document.

General Background Information

Constructing images

Before getting into the programming details, it may be useful for you to review the concept of how images are constructed, stored, transported, and rendered in Java (and in most modern computer environments for that matter).

I provided a great deal of information on those topics in the earlier lesson entitled Processing Image Pixels using Java, Getting Started. Therefore, I wwon't repeat that information here. Rather, I will simply refer you back to the earlier lesson.

The framework program named ImgMod05

It will also be useful for you to understand the behavior of the framework program named ImgMod05. Therefore, I strongly recommend that you study the earlier lesson entitled "A Framework for Experimenting with Java 2D Image-Processing Filters" (see References).

However, if you don't have the time to do that, you should take a look at the earlier lesson entitled "Using the Java 2D LookupOp Filter Class to Process Images" (see References), in which I summarized the behavior of the framework program named ImgMod05.

Preview

In this lesson, I will present and explain an image-processing program named ImgMod41 that is compatible with the framework program named ImgMod05.

The program GUI

The program GUI is shown in Figure 1.
Figure 1

In addition to providing instructions to the user, this GUI allows the user to specify the location and dimensions of a rectangular area within the original image, from which a Raster object will be extracted. The GUI also allows the user to specify the values in a 3x4 image-processing matrix having three rows and four columns that is used to process the raster using the BandCombineOp image-filtering class.

Buffered v.s. Raster objects. I have illustrated the filtering of BufferedImage objects in several previous lessons listed in the References section. I will have more to say about Raster objects later in this lesson. For now, suffice it to say that by converting the BufferedImage object to a Raster object, it is possible to operate on smaller rectangular areas of the image that are extracted from within the body of the entire image. BufferedImage objects versus Raster objects

As I mentioned earlier, the use of Raster objects is completely new to this lesson.

Unlike some of the other image-filtering classes in the Java 2D API that can operate either on BufferedImage objects or on Raster objects, the BandCombineOp filter can operate only on Raster objects.

Image-filtering methodology

For the BandCombineOp class, the red, green, and blue values of each pixel are treated as a column matrix. A 1 is appended onto the end of each column matrix producing a set of four-element column matrices that represents all of the pixels in the input Raster object. (Each pixel is represented by a four-element column matrix.)

Each pixel in the output Raster is produced by multiplying a user-specified 3x4 image-processing matrix by the 4x1 column matrix that represents the corresponding pixel

Author: Richard G. Baldwin

Read article at Internet.com site

Featured Local Company

Moyea Software

92295612365
Hot building, ring street
LA, CA

Related Local Events
Automation Technology Expo West (ATX West)
Dates: 2/9/2010 - 2/11/2010
Location: Anaheim Convention Center
Anaheim, CA
View Details

SOLAR POWER - Exhibition and Conference
Dates: 10/12/2010 - 10/14/2010
Location: Los Angeles Convention & Exhibition Center
Los Angeles, CA
View Details

REAL-TIME & EMBEDDED COMPUTING CONFERENCE - LONG BEACH 2009
Dates: 10/1/2009 - 10/1/2009
Location: Marriott Long Beach
Long Beach, CA
View Details

2009 IEEE Petroleum and Chemical Industry Technical Conference (PCIC 2009)
Dates: 9/14/2009 - 9/16/2009
Location:
Anaheim, CA
View Details

Medical Design & Manufacturing - Trade
Dates: 6/9/2009 - 6/11/2009
Location: CANON COMMUNICATIONS LLC
Los Angeles, CA
View Details