Georeferencing with fGIS and HyperCube - Tutorial
can be used to rectify and georeference imagery. HyperCube, freeware
produced by the US Army Corps of Engineers Topographic Engineering
Center, includes functions to analyze, filter, warp, mosaic, reformat,
calibrate, and combine multi and hyper-spectral imagery and data.
It comes as a single "exe" file, which does not require
installation. Just unzip the file and use it.
technique is helpful if you have scanned hand-drawn maps, paper
maps, printed photos or any digital images that you would like
to warp or rubber-sheet to conform to a known projection.
A - Source
B - Target
C - Warped Image
There are four basic steps:
- Scan or copy and save a geographic image (A). Either a TIFF
or JPEG format will do.
- Use fGIS to create a georeferenced
target image (B) and world coordinate
file from previously rectified vector or graphic files.
- Load the source and target
images into HyperCube. The warp (C) is accomplished by designating
common control points on both the source and target images.
HyperCube will scale,
rotate, warp and crop (A) as needed so that it is the same size
and shape as (B).
using Windows Explorer, the world coordinate file from step
2 is copied from (B) to (C).
Your Photo/Scanning Software:
you scan a paper map or line drawing (such as a timber-type overlay)
on a flatbed scanner, capturing the image at 150 DPI to 200 DPI
is generally sufficient.
aerial photographs are typically 9" x 9", whereas most
consumer type scanners are limited to an 8.5" width. Inexpensive
scanners may introduce distortions or noise in addition to aberrations
caused by terrain, optics or aircraft orientation. That said,
a consumer-grade flatbed scanner can produce acceptable results
for smaller aerial photo conversion projects.
following table provides three typical aerial photo scales and
the resulting pixel resolution and image output file sizes for
various DPI scan settings for a 9" x 9" photo.
Aerial Photo Scale:
Pixel Size in Meters
Image Width in Pixels
Greyscale File Size in Megabytes
If you don't know how to set up a view with fGIS, see the Quick
Start Guide. The fGIS view can include a previously registered aerial photo and/or
any vector layers that might provide good landmarks. Save the
view with 'Map>Export View to Image' or use the
fGIS image export tool. Save the image in either a TIFF or
JPEG format (accepted by HyperCube). fGIS will write a world
coordinate file for the saved target view, which will be the key
to geo-referencing the source image.
control points in the warping process will be much easier if you
make the source and target images approximately the same dimensions
and pixel resolution. For example, let's say you scan a paper
map or photo and the resulting source image is 3,000 pixels wide.
If your screen resolution is 1024 x 768, you could increase
the output image size for the target image in fGIS by 3 (shown
in the dialog below, assuming a full-screen view) to produce a
target about 3,000 pixels wide.
Making the source
and target images about the same size also means that you are
less likely to lose pixels (details) when the source image is
Load in the "source" and "target" image. Use
"File => Open" and specify the file type you want
to open from the drop-down. If either image is in indexed
color (e.g. a standard 256 color DRG USGS topo), you'll have to
use Image=>Convert Image to change it to true color.
Choose the source and target images using the drop-down menus,
and also specify source and target (1=>2 or 2=>1). Note
that you must specifically choose the images (click on their names
from the drop down for Image 1 and Image 2) even if the
names are already visible in the drop-down menus.
When you've successfully chosen the two images, the "Instructions"
section in the Warp window will now tell you to select corresponding
points in the two images by shift-clicking on the same geographic
point in each window. The minimum number of points will depend
on the Transform you've selected, although at least three points
are needed for the Affine Transform (which is generally the most
useful). HyperCube will allow you to select any number of reference
points. When you're done, press Warp and the source image is warped
into the shape and dimensions of the target image. The title bar
of the new image includes a code (Such as "A_N" for
Affine/Nearest Neighbor) to help you keep track of which Transform
and Interpolation method was used. You can change the parameters
and experiment with the results. The control points can also be
saved for re-use.
You can save the warped image as a TIFF, JPEG, or several other
formats, and then use your original world file to georeference
it (i.e., copy and rename the world coordinate file from the target
to the warp).
the target image is a GeoTiff, you can also use Hypercube to georeference
the new image. Select the georeferenced target image, and choose
Edit=>Options=>Image to Ref Coords. This will bring
up a window with the georeferencing information; write down
all the numbers and settings here. Then select the new image
you've created by Warp, bring up the Image to Ref Coords
window for this image, and then enter the georeferencing
information and settings exactly as you copied it in the
previous step. Now when you save this image as a TIFF, it
will embed the georeferencing info directly into it.
HyperCube relies on you to type in the file extension suffix.
If you want to save the warped image as a TIFF, make sure you
append ".tif" to the name of the file.
HyperCube has excellent
documentation in PDF format. See pages 75-76 for more information
about the image warping options.
Corp of Engineers HyperCube page is down, you can also download
the program and documentation from here:
reproject an image from one coordinate system to another, also