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

Learn how to write programs that use the LookupOp 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 # 452 * Preface * General Background Information * Preview * Discussion and Sample Code * The Program Named ImgMod38 * The Program Named ImgMod39 * The Color Inversion Page * The Posterizing Page * The Custom Transforms Page * Run the Programs * Summary * What's Next? * References * Complete Program Listings -----------------------------------

Preface

One lesson in a series

In the earlier lesson entitled A Framework for Experimenting with Java 2D Image-Processing Filters, I taught you a little about the image-filtering classes of the Java 2D API. I also taught you 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.

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 this lesson, I will keep that promise and teach you how to use the LookupOp class for a variety of purposes. I will teach you how to use the other 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 computers for that matter).

I provided a great deal of information on those topics in the earlier lesson entitled Processing Image Pixels using Jaava, Getting Started. Therefore, I won'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.

However, if you don't have the time to do that, I can summarize that framework program as follows:

Purpose of ImgMod05

The purpose of ImgMod05 is to make it easy for you to experiment with the modification of images using the image-filtering classes of the Java 2D API and to display the modified version of the image along with the original image.

The Replot button

The ImgMod05 program GUI contains a Replot button (as shown in Figure 1). At the beginning of the run, and each time thereafter that the Replot button is clicked: * The image-processing method belonging to an object of specified image-processing class is invoked. * The original image is passed to the image-processing method, which returns a reference to a modified image. * The resulting modified image is displayed along with the original image. * The modified image is written into an output JPEG file named junk.jpg.

Display of the images

When the ImgMod05 program is started, the original image and the processed version of the image are displayed in a frame with the original image above the processed image (as shown in Figure 1). The program attempts to set the size of the display so as to accommodate both images. If both images are not totally visible, the user can manually resize the display frame.

Input and output file format

The ImgMod05 program will read gif and jpg input files and possibly some other input file types as well. The output file is always a JPEG file.

Typical usage

Enter the following at the command-line to run the ImgMod05 program: java ImgMod05 ProcessingProgramName ImageFileName

Preview

In this lesson, I will present and explain two different image-processing programs that are compatible with the framework program named ImgMod05.

The program named ImgMod38

The first program, named ImgMod38, is designed to show the essential requirements of writing a program that runs under control of the framework program named ImgMod05 and uses an image-filtering class of the Java 2D API to modify an image.

The program named ImgMod39

The second program, named ImgMod39, is designed to show how you can expand on those essential requirements to create a program that allows for user input and supports a great deal of experimentation.

Discussion and Sample Code

I will discuss the two programs in this lesson in fragments. A complete listing of ImgMod38 is provided in Listing 37 near the end of the lesson. A

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