Stretch Image    _______________________  From Spatial Transformation  
Sold through www.spatial-online.com. 
Stretch and register an image in ArcView.

Table of Contents

Overview

Stretch Image enables the user to stretch a tiff image in ArcView. The transformation is a first order polynomial transformation, which will provide for rotation and other varieties of transformations. A new tiff image is produced and the World File is defined or set to place the image as precisely as possible in ArcView.

If registration without altering the image is required, Spatial Transformation provides Register Image. For higher order image transformations, Spatial Transformation provides Warp Image.

A transformation is defined by a set of control points, matching positions on the image to the desired position on the map. From these points, a best first order polynomial is determined using a least squares fit.

Stretch Image provides interactive functionality to establish the control points. When the control points have been established, a button will open a dialog box which calculates the transformation. This transformation is applied to each input point and the distance between the transformed point and the desired position for that point (residual error) is calculated. Details for each point are shown.

In case a point has a very high residual error, and is likely to be in error, that point can be excluded from the transformation process. At least three points are required to define the transformation. However, using a larger number of points minimizes the effects of small errors in defining the points.

When satisfied with the residual errors, the new image is created. The World File parameters are set and the image is redrawn. The control points now reflect the new image.

Return to Table of Contents

Installation Instructions

Stretch Image can be downloaded from www.spatial-online.com.. The file will be called StretchImage.exe.

In order to install Stretch Image, save StretchImage.exe to temporary space on your disk. Double click it to run the install. An install wizard will appear to guide you through the installation process.

To find Stretch Image in ArcView, activate the project window and from the file menu, choose Extensions. In the Extensions dialog, click the box beside Stretch Image. When a view is open, a Stretch Image menu item will appear to evoke Stretch Image. It will contain a link to this help.

Return to Table of Contents

Stretching an Image

The Stretch Image menu will provide four choices:

The last item will evoke this help in your default browser.

To stretch an image, open a view and add the shape files that are in the vacinity of the image. Make the files active by clicking them in the View Table of Contents and click the Zoom to Active Themes button. Then add the image with View > Add Theme. In the bottom left corner of the dialog, set the Data Source Types to Image Data Source. Choose your image and click OK. Note that Stretch Image only works with tiff files. Other files need to be converted to tiff prior to stretching. In case you choose another variety of image, you will be able to register it, but not stretch it. Make the image visible by clicking the box beside its name in the ArcView Table of Contents.

Quite possibly, your image will not appear in the view. To make it centered in the current view:

  • Make it the active theme by clicking on it in the View Table of Contents.
  • Click Image > Move Image to View.
Prior to evoking Stretch Image, control points need to be defined. The process is started by clicking Stretch Image > Initialize Control Points. If you have previously built some control points for this image, you will be asked if you wish to use the previous points. You can either choose Yes to utilize them, or No to start anew. In case you do not have any control points, the system will start with four points at the four corners of the image, labeled TL, TR, BL and BR. The image points are in aqua and the map points in yellow such as seen in the screen below.

The Stretch Image menu label is changed to Stretch name.tiff identifying the name of the image your are stretching. In addition to the control points, there will be two new buttons and two new tools. There purposes are as follows:

LabelPositionPurpose
SButtonCauses the image to be stretched to the current control points
QButtonQuits the registration process and clears the control points
AToolAdds a new control point
ZToolZooms to closest control point

The labels on the screen must be dragged to appropriate positions for the control points. The precise position of the point is the bottom left corner of the box that is being dragged. The aqua label must be dragged to a position on the image while the corresponding yellow label is dragged to the corresponding position on the map. For more accurate positioning, you may wish to zoom in on each point. Click the Z tool, then click near the control point of interest and the view will zoom into the point.

Points can be deleted in the usual manner or added using the tool labeled A. This transformation needs only three points. However, specifying more than three points avoids problems caused by slight inaccuracies in the point input process.

In the example, there are no easily identifiable points in the corners, so each control point has been dragged to a position that can be identified in both the image and the map.

Either click the S button or choose Stretch Image > Stretch Image to stretch the file.

When the product is running in trial mode, the following registration screen will appear.

Clicking the purchase button will evoke your browser with www.spatial-online.com to enable you to purchase the product on-line, through the Fax or via Purchase Order. When you purchase the product, you will be required to supply your site code (just below the Purchase button - in the picture above it is 93613. It will be different on your machine). In return, you will get a product key. Insert that key into the Text Box next to Product Key and click OK to Stretch the product. Once you have done this, this registration box will no longer appear.

To run the product in trial mode, click the Run in Demo Mode button. Below the button, the remaining trial period is shown.

Clicking the Cancel button will stop the process.

The dialog below will appear.

The list box contains the labels for each point followed by the image column and row, the map control position, the position that the image control was translated to, and the residual error. The residual error is the distance between the desired position (the map control position) and the translated position (where the image control position is moved to).

In case a point has a very high residual error, and is likely to be in error, that point can be excluded from the transformation process by selecting it and then clicking the Remove Point button. At least three points are required to define the transformation. However, using a larger number of points minimizes the effects of small errors in defining the points. If insufficient points are provided an error message will appear.

The buttons on the next line are the following:

  • Restore: This button will restore all control points, in case you have previously removed one or more, and recalculate the transformation and the residual errors.
  • Remove Point: This button will remove the selected point and recalculate the transformation and the residual errors. In case one point has a very large residual error, you may decide it is incorrect and remove it to avoid an inappropriate influence over the transformation calculations.
  • Cancel: This button will cancel the process, returning to ArcView without moving the image.
  • Accept: This button will accept the transformation, and begin the process of producing the transformed image. The progress will be reported in a progress bar at the bottom of the dialog.
  • Help: This button will cause this help to be evoked in your default browser.
There is a choice of two types of transformations. The default is Stretch. In case the image is to be shifted and scaled independently in the X and Y directions, and a new image is not to be produced, the second option of Linear should be chosen.

In case the image is rotated, the corners of the resulting image will not overlap the original image. There are three ways these can be assigned values:

  • All can be assigned the value for White
  • All can be assigned the value for Black
  • Each pixel can be assigned the same value as the Nearest pixel in the image.
In addition, if the image can support transparency, you have the option to Set transparent either of the white or black value that you chose. The default is to assign these pixels to be white, and, if the image can support transparency, to make them transparent. You may also choose to color them black. The third choice, giving each the value of the nearest pixel in the image, works well for slight modifications. However, for significant rotations, it produces a streaky effect at the edges of the new image.

The input image file and control point file are shown. Beneath them is the name of the image file that will be produced. This can be altered to any tiff file name that can be written.

If the Accept button has been clicked, once the new image is produced, it will be positioned in the view using a World File. The transformed image control points for the new image will be added to the view. The initial image will made invisible and the new image will be the one that is currently active for further modification.

Return to Table of Contents

Frequently Asked Questions

  • How many control points do I need?
    • This transformation needs only three points. However, at least four are recommended, and specifying more points is likely to avoid problems caused by slight inaccuracies in the point input process.
  • Where should the control points be?
    • The control points should be as regularly spaced throughout the data as possible. The four corners of the image make a good choice.
  • Why is the edge of my transformed image streaky?
    • In case the image is rotated, the corners of the transformed image will not overlap the original image. The default value for these pixels is the closest pixel in the image. However, for significant rotations, this produces a streaky effect at the edges of the new image. To avoid that effect, specify a Default Pixel value to fill the undefined areas. Usually, 0 will result in a black fill and 255 in a white fill.
Return to Table of Contents

Other Spatial Transformation Products

Spatial Transformation offers other products for transforming data.

  • nOrderTransform applies an arbitrary n order polygonal transformation to any shape file. Click here for more information about nOrderTransform or here to download a free evaluation of this product.
  • Register Image applies a shift and indepedend scale in the X and Y direction without producing a new image file. Click here for more information about Register Image or here to download a free evaluation of this product.
  • Warp Image applies an arbitrary n order polygonal transformation to an image producing a new image file and Stretching it in ArcView. Click here for more information about Warp Image or here to download a free evaluation of this product.

Return to Table of Contents

About Stretch Image

    Stretch Image Copyright ©2000 is a product of Spatial Solutions Inc, dba Spatial Transformation. All rights reserved.

    Warning: This computer program is protected by copyright law and international treaties. Unauthorized reproduction of it, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.

    The software comes "as is". Neither Spatial Solutions Inc nor www.spatial-online.com make any warranty, representation, promise or guarantee of any kind, either expressed or implied, statutory or otherwise, including, but not limited to the implied warranties of quality, performance, non-infringement, merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with the user. We do not warrant that the functions contained in the software will meet your requirements or that the operation of the software will be uninterrupted or error free.

    Return to Table of Contents