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

Learn how to write programs that use the AffineTransformOp 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 # 454 * Preface * General Background Information * Preview * Discussion and Sample Code * Scaling * Translation * Rotation * Mirror Image * 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, 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.

In the previous lesson entitled Using the Java 2D LookupOp Filter Class to Process Images, I taught you how to write programs that use the LookupOp image-filtering class of the Java 2D API for a variety of image-processing purposes.

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: * AffineTransformOp * BandCombineOp * ConvolveOp * RescaleOp * ColorConvertOp

In this lesson, I will keep that promise and teach you how to use the AffineTransformOp image-filtering class to perform a variety of transformations on images. 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 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. (See an example of the graphic output format in Figure 5.)

The Replot button

The ImgMod05 program GUI contains a Replot button (as shown in Figure 5). 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 processed image. * The resulting processed image is displayed along with the original image. * The processed 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 5). 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 an image-processing program named ImgMod40 that is compatible with the framework program named ImgMod05. This program provides a GUI that allows the user to perform the following transforms on an input image: * Scaling * Translation * Rotation * Mirror Image

With the exception of the Mirror Image transform, all of the transforms in the above list allow the user to input important parameters via the GUI.

The program GUI is a JTabbedPane with four pages. Let's begin by taking a look at each of those pages.

Scaling

The Scaling page of the GUI is shown in Figure 1.

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