|
Didger 3: Removing the Black Border After Warping an Image
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.
Warping an image creates a black border around it.
This border is undesirable when mosaicking two or more adjacent images.
There are two ways to remove the black border.
- During the warping step, specify a smaller range of Output Map Extents to
prevent creation of the border.
- Let the border be created, but specify the black border color to be transparent when
combining the images in the vector project.
This article provides detailed instructions on both methods. You can choose which is best suited to your needs.
Method 1: Setting the Output Map Extents
By default, the warp operation expands the extents of the map slightly, to provide room in case the image needs to be rotated.
However, it is possible to reduce the extents so that the black border is not created. Perform the following steps:
- After the image is calibrated in a raster project, go to Image | Warp Image.
- In the Warp Image dialog, leave the Output Map Extents at the default values for
now. Select the desired Warp Parameters and X and Y Output Bitmap Extents as appropriate, or leave them
as defaulted, and click OK.
- You may get a message that says "The current bitmap is very large. Do you wish
to add it to the undo list?" If so, click Yes. We will be undoing this warp operation in order to
re-warp with different settings.
- After the warping calculations are completed, click OK in the Bitmap Import Options
dialog. The warped image will appear with the black border around it.
- Make sure your display units are set to meters if the image is projected, lat/long if
the image projection is set to Unprojected Lat/Long, or whatever calibration units were used if the image is in
Cartesian coordinates. If you need to change the display units, go to Image | Calibrate Image, check or change the
Display Units in the Initial Calibration Settings dialog (Step One), and then click Next, Next, Next, and Finish.
- Move the cursor to the X and Y minimum and maximum extents of the actual image (not including the
black border), and write down the X and Y coordinates shown in the status bar.
After warping the image, move the cursor to the extents of the image and
write down the coordinates shown in the status bar.
- If you had to change the display units in step 5, go to Edit | Undo Calibration.
- Go to Edit | Undo New Bitmap to undo the warping.
- Go back to Image | Warp Image.
- This time, enter the X and Y min/max values that you recorded in step 6
in the Output Map Extents area. Make any desired changes to the Warp Parameters and X and
Y Output Bitmap Extents and click OK.
- When the image is warped, the black border will be gone because of the reduced extents
specified.
After specifying the Output Map Extents in the Warp Image
dialog box, warping the image does not create a black border.
- Export the image as a GeoTIFF. It will be ready to combine later with other images
in a Didger vector project.
Method 2: Setting the Black Color to be Transparent
Once all the bitmaps have been georeferenced and warped in a raster project, export each of them to a GeoTIFF file.
The GeoTIFF files will have the black borders around them. To mosaic them together and remove the black border, follow
these steps:
- Go to File | New | Blank to create a blank Didger project.
- Go to File | Import Bitmap | Into Vector.
- 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.
- Repeat steps 2 and 3 for each of the GeoTIFF files so they are all imported into one project.
The images are aligned according to their calibration. Each image has the unwanted black border.
- To remove the black border, select one of the bitmaps and go to
Image | Select Transparent Colors.
- The Select Transparent Colors dialog opens, and the cursor changes to a fat cross.
- Click anywhere on the black border of the image. Then click OK in the
Select Transparent Colors dialog box. The black border becomes invisible.
- Repeat steps 5 through 7 for each of the images, making all the black borders transparent.
- If the images contain other black pixels, besides the ones in the border, they will also become
transparent. To rectify this, draw a large polygon covering the interior of all images. Fill the polygon with solid black
and use the Edit | Arrange | Move to Back command to move the polygon to the back of all the images. This will fill
the areas that were unintentionalally made transparent.
- Now you can export the combined images as a single GeoTIFF file, digitize on top of it, or
import other vector or data files.
Set the black border to be transparent for each image and then draw a
black polygon covering all the images and move it to the back.
If you have any questions about Didger or this article, please contact us at
didgersupport@goldensoftware.com.
Back to
Newsletter Index
|