Initial Publication Date: July 19, 2011

Part 2: Scale and Crop Images3

Scaling and Cropping Images and Stacks

What if these images were too large to work with, either for you or for your students? What could you do? Two common solutions are scaling the images down and cropping them to a smaller size.

Scaling, Interpolation, and Spatial Calibration

Scaling is the process of making an image larger (scale > 1.0) or smaller (scale interpolation.

Without going into the detailed mathematics of the different interpolation methods, you do need to know that the Interpolation method (bilinear, bicubic, or none) is most important if you're scaling images up to a larger size (scale > 1), but usually won't make much difference when you're scaling down, especially at "even" scales like 25% or 50%. Bilinear interpolation is generally faster, while bicubic interpolation is more complex and takes a bit longer. This is not an issue with today's powerful computers.

To compare interpolation methods, you will crop out a small image of the crater, then scale it up by a factor of 10 using each method.

  • Stack the seven Landsat band images. If necessary, set the spatial scale of the image to 30m/pixel.
  • Activate the stack window, locate the crater, and zoom in until the crater fills most of the window.
  • Use the rectangular selection tool to select a 60 x 60 pixel square centered on the crater. The selection size appears in the image status bar as you make the selection. Since the scale is set at 30m per pixel, 60 pixels equals 60 x 30 = 1800 meters. (Tip: To select a perfect square centered on the crater, hold down Command-Shift (Mac) or Control-Shift (PC), click at the center of the crater, and drag outward.)

  • Create a new image of just the selected pixels by choosing Image > Duplicate. Since you're working on a stack, you have the option to duplicate the entire stack or just the current slice. Go ahead and duplicate the whole stack. You should now have a small window containing a 60 x 60 pixel stack.


  • Activate the small stack window. Choose Image > Scale and scale the stack by a factor of 10 but without interpolation using the following settings:

  • Activate the small stack again, choose Image > Scale and scale the stack by a factor of 10 using bilinear interpolation using the following settings:

  • Activate the small stack again, choose Image > Scale and scale the stack by a factor of 10 using bilinear interpolation using the following settings:

  • Compare the three scaled images. Which one looks like giant pixels? Which one looks smoothest?
  • How did the spatial calibration (scale) handle the scaling process? Using any of the three 10x scaled images you made, measure the east-west distance across the crater. What diameter do you get, in meters? How does this compare to the original image?
  • The moral of this story? When you scale images up or down in ImageJ, the spatial calibration is NOT preserved! However, as long as you know how you scaled the image, you can use that information to modify the spatial calibration. In this case, we scaled the image UP by a factor of 10. To get the new spatial calibration, divide the old spatial scale (30 meters/pixel) by the scaling factor you used (10.0). What is the new image scale?
  • Activate any one of the 10x images and choose Analyze / Set Scale and change the scale to 3 meters per pixel. This would be a good time to turn off the global setting.
  • Measure the diameter of the crater you just re-calibrated. It should be very close to 1080 meters. (If not, try the process again on one of the other 10x images you created.)
  • Look at the memory size of the mini-stack and the file size of the 10x stacks (Tip: The memory size of each open image window is displayed at the bottom of the Window menu. Since you scaled BOTH the height and width of the image by 10x, the area (or number of pixels, or the memory size) of the image is 10 x 10 = 100 times as large as the original. In other words, the size (memory) of the image increases by the square of the scaling factor. Doubling the scale increases the size of the image by 22 or 4 times. (Conversely, scaling by 0.5 decreases the size of the image 0.52 times, or 25% (1/4) its original size.
  • Close all of the open image and stack windows.

  • Scaling images that are too big to work with

    You just scaled up a portion of a large image, but it's more common to need to scale down large images to a size that's more workable. This is especially useful when working with large time series images that you want to stack and animate. In general, the smaller the images the more you can stack. In this section, you will scale the seven Meteor Crater Landsat bands to a size that is easier for creating true and false color images. You will also learn how to fix the dull, washed-out look of the color composite images.

    Creating true and false color Landsat images

    Using raw Landsat bands produces dark, muddy-looking RGB or composite imagesnot the crisp, vivid images you see in science and geography magazines and web pages. The color images you made lack "punch" because they don't use the full range of pixel values available in each channel. To fix this, you can enhance the contrast of the images before merging them.

    Reduce image size by cropping

    When you are interested in just a portion of a scene, a better way to make the images smaller is to crop an area out of the larger scene. You did this already when you cut out a 60x60 pixel image of the crater, which you used to compare the different scaling interpolation methods. Now you will create a set of cropped images for all seven Landsat bands, and use them to create both true and false color images.

    If you wanted to make measurements on these cropped images, what spatial calibration (scale) would you use?


    An alternate (and faster) way to produce a series of perfectly cropped imagestry it if you have enough memoryis:

    When you are finished, close all open image windows.

    Your Assignment: Locate, Create, and Calibrate a True or False Color Landsat Image.

    For this assignment, choose an area of interest anywhere in the U.S. and do the following:

    1. Go to the GloVis web site and locate a relatively cloudless Landsat 4, 5, or 7 (SLC-on only) scene of your area of interest. If the files there a too large of a download, go to the Landsat Click and Pick site to download at least three bands for one Landsat scene.
    2. Order, download, and unzip the data on your computer.
    3. Use both cropping and scaling to reduce the images to a smaller size. (You might want to crop out the black in the background).
    4. Create a contrast-enhanced true or false color RGB or composite image.
    5. Spatially calibrate the image using an appropriate scale. (Hint: cropping doesn't change the calibration, but scaling does.)
    6. Measure at least one distance and one area on the image. If possible, check your measurement using Google Earth or some other outside reference source.
    7. When you are finished, post a screen shot of your final product to the Part 2: Share and Discuss Page. Then describe as much as you can about what you analyzed.
    8. Engage in an online discussion, sharing your ideas about using remote sensed images in your teaching.

    Resources

    The following resources are free, excellent descriptions of how remote sensing images are created, transmitted, received, processed, and distributed.

    Sources

    1Adapted from Earth Exploration Toolbook chapter instructions under Creative Commons license Attribution-NonCommercial-ShareAlike 1.0.
    2Adapted from Eyes in the Sky II online course materials, Copyright 2010, TERC. All rights reserved.
    3New material developed for Earth Analysis Techniques, Copyright 2011, TERC. All rights reserved
    4From Remote Sensing Math: A Brief Mathematical Guide by Dr. Sten Odenwald, NASA 2011.

    « Previous Page      Next Page »