Didger 3: Removing the Black Border After Warping an Image (Continued)

Introduction

A common use of Didger is to combine multiple image files by calibrating and warping them, exporting them as georeferenced TIFF files (GeoTIFFs), and mosaicking the GeoTIFFs together in a Didger vector project. The warping step expands the extents of the image slightly, which creates a black border. This border is usually undesirable when mosaicking the images, as it can obscure portions of any adjacent images.


 
Images with black borders

Warping an image creates a black border around it.
This border is undesirable when mosaicking two or more adjacent images.

There are several ways to remove the black border:

  1. During the warping step, specify a smaller range of Output Map Extents to prevent creation of the border.
  2. Let the border be created, but specify the black border color to be transparent when combining the images in the vector project.
  3. Import each image into a separate layer in a vector project and then clip the image to a polygon.
  4. If you have just a single image, you can change the Project Limits in a vector project to limit the extents of the image to exclude the black border.

Methods 1 and 2 are described in detail in Issue 49 . This article provides detailed instructions on methods 3 and 4. You can choose which best suits your needs.

Method 3: Clipping the Image to a Polygon

You can use this method if you have only a single image you'd like to remove the black border from. Once the bitmap has been georeferenced and warped in a raster project, export it to a GeoTIFF file. The GeoTIFF file will have the black border around it. To change the project limits, follow these steps:

  1. Go to File | New | Blank to create a blank Didger project.
  2. Go to File | Import Bitmap | Into Vector.
  3. Select one of the GeoTIFF files and click Open. In the Bitmap Import Options dialog, choose the Spatial Reference to use and click OK. The file is imported into Layer-1.
  4. Go to Digitize | Rectangle.
  5. Click OK in the Digitize Rectangle dialog box.
  6. Draw a rectangle all the way around the image (not including the black border).
  7. Select the rectangle and go to Image | Clip Bitmap | Current Polygon. This will clip the black border.
  8. Hit the Delete key on the keyboard to delete the polygon.
  9. If you only have a single image you want to clip, then you are done. If you have other images you want to mosaic and clip, right click in the Layer Manager and choose Add Layer. This will create Layer-2.
  10. Double click on Layer-2 in the Layer Manager so it becomes the active layer.
  11. Repeat steps 2-8 to import the next GeoTIFF file into Layer-2 and clip the black border.
  12. Export the mosaicked image as a GeoTIFF. It will be ready to combine later with other images in a Didger vector project.

 
Clipped images

Import each image into a separate layer and then clip each image to a
polygon to remove the black border

Method 4: Change the Project Limits to Exclude the Black Border for a Single Image

You can use this method if you have only a single image you'd like to remove the black border from. Once the bitmap has been georeferenced and warped in a raster project, export it to a GeoTIFF file. The GeoTIFF file will have the black border around it. To change the project limits, follow these steps:

  1. Go to File | New | Blank to create a blank Didger project.
  2. Go to File | Import Bitmap | Into Vector.
  3. Select one of the GeoTIFF files and click Open. In the Bitmap Import Options dialog, choose the Spatial Reference to use and click OK. The file is imported into Layer-1.
  4. Look at the coordinates displayed in the Status Bar. If they are not in Meters, go to View | Projection Settings, change the Display Units to Meters, and click OK.
  5. Move the cursor to the limits of the image (not including the black border) and write down the X and Y minimum and maximum values.
  6. Go to View | Project Limits, enter these values in the Specify Project Limits section, and click OK.

 
Limited image

Specify the new project limits, excluding the black border, and click OK.
The new image will be cropped to the limits you specified.


Back to Newsletter Index

 

Home * Products * Gallery * Support * About Us * Register * Order * Demos * Sitemap

Privacy Policy