IMGS White Paper Template - Hexagon Geospatial Community

advertisement
Mapping and Geospatial Solutions
Four Band Image Manipulation Using ISRU and OrthoPro
A White Paper
Four Band Image Manipulations
May 2007
Intergraph Mapping and Geospatial Solutions
170 Graphics Drive
Madison, AL 35758 USA
www.intergraph.com/imgs
Four Band Image Manipulation
Page ii
Table of Contents
1.
Four Band Image Manipulations Using ISRU ...................................................................... 1
1.1 Four Band to Color/CIR............................................................................................................................ 1
1.1.1 8 Bit, No Compression ............................................................................................................ 1
1.1.2 12 Bit, No Compression .......................................................................................................... 1
1.1.3 Color/CIR Separation: 16 Bit, No Compression ...................................................................... 1
1.2 Color/CIR to Four Band Image ................................................................................................................. 2
1.2.1 16 Bit, No Compression .......................................................................................................... 2
1.2.2 12 Bit, No Compression .......................................................................................................... 2
1.2.3 8 Bit, No Compression ............................................................................................................ 3
2.
Color/CIR Separation Using OrthoPro’s Post Processing Capability ............................... 4
2.1 Setting Up Post-Processing ....................................................................................................................... 4
2.1.1 Defining Post-Processing Parameters ...................................................................................... 5
2.2 Example Post-processing commands ........................................................................................................ 6
2.2.1 Post-processing Color/CIR Seperation: 16 Bit, No Compression ........................................... 6
Four Band Image Manipulation
Page iii
1.
Four Band Image Manipulations Using ISRU
1.1 Four Band to Color/CIR
The following examples use ImageStation Raster Utilities (ISRU) to convert a 4 band image
into separate color and color infrared images.
1.1.1 8 Bit, No Compression
:: Separate the 4 band image into 4 separate images.
Mr_file.exe –i 1 –o 4 –H 1 –S 256 <input file> <output.red> <output.green> <output.blue>
<output.ir>
:: Combine the red, green, and blue bands into an RGB image.
Mr_file –i 3 –o 1 –H 1 –E –S 256 –K a <input.red> <input.green> <input.blue> <output.rgb>
:: Combine the infrared, red, green bands into a CIR image.
Mr_file –i 3 –o 1 –H 1 –E –S 256 –K a <input.ir> <input.red> <input.green> <output.cir>
1.1.2 12 Bit, No Compression
:: Separate the 4 band image into 4 separate images
Mr_file.exe –i 1 –o 4 –H 1 –Y 12 –m 0 –M 4095 –S 256 <input file> <output.red>
<output.green> <output.blue> <output.ir>
:: Combine the red, green, and blue bands into an RGB image.
Mr_file –i 3 –o 1 –H 1 –Y 12 –m 0 –M 4095 –E –S 256 –K a <input.red> <input.green>
<input.blue> <output.rgb>
:: Combine the infrared, red, green bands into a CIR image.
Mr_file –i 3 –o 1 –H 1 –Y 12 –m 0 –M 4095 –E –S 256 –K a <input.ir> <input.red>
<input.green> <output.cir>
1.1.3 Color/CIR Separation: 16 Bit, No Compression
:: Separate the 4 band image into 4 separate images
Mr_file.exe –i 1 –o 4 –H 1 –Y 16 –m 0 –M 65535 –S 256 <input file> <output.red>
<output.green> <output.blue> <output.ir>
Four Bad Image Manipulation
1
:: Combine the red, green, and blue bands into an RGB image.
Mr_file –i 3 –o 1 –H 1 –Y 16 –m 0 –M 65535 –E –S 256 –K a <input.red> <input.green>
<input.blue> <output.rgb>
:: Combine the infrared, red, green bands into a CIR image.
Mr_file –i 3 –o 1 –H 1 –Y 16 –m 0 –M 65535 –E –S 256 –K a <input.ir> <input.red>
<input.green> <output.cir>
1.2 Color/CIR to Four Band Image
The following command lines takes seperate color and color infrared images, separates the
bands from both images into individual files, and then merges them into a single 4 band image.
Note that the red, green, and blue bands will come from the color image and only the color
infrared band will come from the CIR image.
1.2.1 16 Bit, No Compression
:: |Separate the CIR image into 3 separate bands.
Mr_file.exe –i 1 –o 3 –H 1 –Y 16 –m 0 –M 65535 –S 256 <input cir file> <output.ir>
<output.red> <output.green>
:: Delete the red and green band files.
Delete <output.red>
Delete <output.green>
:: Separate the RGB image into 3 separate bands.
Mr_file.exe –i 1 –o 3 –H 1 –Y 16 –m 0 –M 65535 –S 256 <input color file> <output.red>
<output.green> <output.blue>
:: Combine the red, green, blue, and infrared bands into a single 4 band image.
Mr_file –i 4 –o 1 –H 1 –Y 16 –m 0 –M 65535 –E –S 256 –K a <input.red> <input.green>
<input.blue> <input.ir> <output file>
1.2.2 12 Bit, No Compression
:: |Separate the CIR image into 3 separate bands.
Mr_file.exe –i 1 –o 3 –H 1 –Y 12 –m 0 –M 4095 –S 256 <input cir file> <output.ir>
<output.red> <output.green>
:: Delete the red and green band files.
Four Bad Image Manipulation
2
Delete <output.red>
Delete <output.green>
:: Separate the RGB image into 3 separate bands.
Mr_file.exe –i 1 –o 3 –H 1 –Y 12 –m 0 –M 4095 –S 256 <input color file> <output.red>
<output.green> <output.blue>
:: Combine the red, green, blue, and infrared bands into a single 4 band image.
Mr_file –i 4 –o 1 –H 1 –Y 12 –m 0 –M 4095 –E –S 256 –K a <input.red> <input.green>
<input.blue> <input.ir> <output file>
1.2.3 8 Bit, No Compression
:: Separates the CIR image into 3 separate bands.
Mr_file.exe –i 1 –o 3 –H 1 –S 256 <input cir file> <output.ir> <output.red> <output.green>
:: Delete the red and green band files.
Delete <output.red>
Delete <output.green>
:: Separate the RGB image into 3 separate bands.
Mr_file.exe –i 1 –o 3 –H 1 –S 256 <input color file> <output.red> <output.green>
<output.blue>
:: Combine the red, green, blue, and infrared bands into a single 4 band image.
Mr_file –i 4 –o 1 –H 1 –E –S 256 –K a <input.red> <input.green> <input.blue> <input.ir>
<output file>
Four Bad Image Manipulation
3
2.
Color/CIR Separation Using OrthoPro’s Post Processing
Capability
Note the following post processing dialog can be accessed in the orthorectification, dodging,
and mosaicing properties dialogs. The following section is an excerpt from the OrthoPro
User’s Guide.
2.1 Setting Up Post-Processing
Use this tabbed page to set up one or more command, or batch file of commands, to postprocess each mosaic product that is created.
You can think of this tabbed page as an extension of the Parameters tabbed page with the
settings on both pages applying to the product or products that you have selected in the
OrthoPro Mosaic project window. As each product is created, the Status column in the project
window will indicate that "Processing" to create the product is under way, then that the
specified "Post-processing" is in progress, and, finally, that all processes are "Complete." Any
messages generated by a post-process are posted to the Log tab.
The Post Processing tabbed pages in ZIMosaic and in ZIRectify are designed to be set up in the
same way. See page 90 for information about the tabbed page options.
Four Bad Image Manipulation
4
2.1.1 Defining Post-Processing Parameters
Post-Processing Command(s)
This area lists any command lines and batch files of commands that will automatically process
a selected orthophoto once it has been created by OrthoPro Rectify.
To add a new processing entry to the list, click this button. Then, in the Command
File box, enter the path and name of the program file or batch file, or click the folder
button to choose the folder and file. Next, if you entered a program file location in the
Command File box, enter the complete command line with arguments in the Command
Line box. (You can also include the variables indicated beneath the Post-Processing
Command(s) list.) Finally, enter the folder where the program or batch file is located in the
Start In box. If dynamic link library files that are necessary for a process to run are located
in another folder, enter that location instead.
Click this button to remove a selected processing entry from the list.
Click this button to move a selected processing entry upward in the processing order.
Click this button to move a selected processing entry downward in the processing
order.
Command Line Variables: $(TargetFile) $(TargetDir) $(TargetBaseName) $(TargetExt)
$(PhotoID) $(StripID)
This information indicates variables you can use in command lines, where $(TargetFile) is the
file name of a orthophoto that you have selected in the OrthoPro Rectify project window,
$(TargetDir) is the complete path of the output folder of one or more selected orthophoto,
$(TargetBaseName) is the file name less the extension, $(TargetExt) is the file name extension,
$(PhotoID) is the photo ID, and $(StripID) is the strip ID.
Command File
Specifies the name and location of the program file or of the batch file that will be used to
post-process.
Command Line
For a program file entered in the Command File box, specifies the complete command line and
arguments to be used for post-processing. (You can include one or more of the $(TargetFile),
$(TargetDir), $(TargetBaseName), $(TargetExt), $(PhotoID), and $(StripID) command line
variables as explained above.)
Note If you do not use a batch file, it may be necessary to enter the command shells to get
some DOS commands to work. For example:
Command File: C:\WINDOWS\system32\Cmd.exe
Four Bad Image Manipulation
5
Command Line: /C move "$(TargetFile)" "C:\My GeoTiff Directory"
Start In
Sets the current working folder of the command file, that is, the folder that contains a program
or a batch file or another folder that contains related files if they are needed for a process to
run.
2.2 Example Post-processing commands
The following is an example set of post processing commands for separating a 4 band, 16 bit
mosaic into a color and color infrared images.
2.2.1 Post-processing Color/CIR Seperation: 16 Bit, No
Compression

Command 1 – Separates the bands into four separate images.
o Command File:

C:\Program Files\ISRU\bin\mr_file.exe
o Command Line:

–i 1 –o 4 –H 1 –Y 16 –m 0 –M 65535 –S 256 $(TargetFile)
$(TargetBaseName).r $(TargetBaseName).g $(TargetBaseName).b
$(TargetBaseName).c
o Start In:


$(TargetDir)
Command 2 – Merge the red, green and blue bands into a color image.
o Command File:

C:\Program Files\ISRU\bin\mr_file.exe
o Command Line:

–i 3 –o 1 –H 1 –Y 16 –m 0 –M 65535 –E –S 256 –K a
$(TargetBaseName).r $(TargetBaseName).g $(TargetBaseName).b
$(TargetBaseName).rgb
o Start In:


$(TargetDir)
Command 3 – Merge the IR, red, and green bands into a CIR image.
Four Bad Image Manipulation
6
o Command File:

C:\Program Files\ISRU\bin\mr_file.exe
o Command Line:

–i 3 –o 1 –H 1 –Y 16 –m 0 –M 65535 –E –S 256 –K
a$(TargetBaseName).c $(TargetBaseName).r $(TargetBaseName).g
$(TargetBaseName).cir
o Start In:

Four Bad Image Manipulation
$(TargetDir)
7
For more information about Intergraph
Mapping and Geospatial Solutions, visit
our Web site at http://imgs.intergraph.com
United States
Canada
Europe
Asia-Pacific
Other Areas
1-800-791-3357
1-800-661-8134
31-23-5666333
61-7-3510-8900
1-256-730-7191
Intergraph and the Intergraph logo are registered
trademarks of Intergraph Corporation. Other brands
and product names are trademarks of their respective owners. Intergraph believes that the information
in this publication is accurate as of its publication
date. Such information is subject to change without
notice. Copyright 2004 Intergraph Corporation,
Huntsville, AL 35824. Document number.
Four Bad Image Manipulation
8
Download