13

I want to mosaic three images. Each image has a black back ground. The background is still there even after mosaicking the images, so it's like a gap between the image.

How can I remove this black color using ArcGIS or QGIS.

4 Answers 4

13

use gdalwarp as following code:

gdalwarp -srcnodata 0 -dstalpha input.tif output.tif

-srcnodata value [value...]: Set nodata masking values for input bands (different values can be supplied for each band). If more than one value is supplied all values should be quoted to keep them together as a single operating system argument. Masked values will not be used in interpolation. Use a value of None to ignore intrinsic nodata settings on the source dataset.

.

-dstalpha: Create an output alpha band to identify nodata (unset/transparent) pixels.

9

Removing the black collar is very easy using ArcMap 10:

  1. Select the "blue identify tab". Then select the black background to determine the pixel value (in my case the black background pixel value is set to 0).
  2. Right click on your raster layer in the table of contents, select Properties > Symbology.
  3. Choose the color display you want.
  4. Check the "Display Background Value" "YOUR_VALUE_HERE" as "No Color".

Alternatively, you can Reclassify your raster data and either exclude certain values or set the black collar pixel values to "NoData".

enter image description here

enter image description here

0
2

If you are using QGIS, you can remove the black background/edges via properties -> transparecy, there you set the No data value to 0. In any case, my answer is almost 2,5 years late, however this answer might be useful for someone facing some problems at present time.

0
2

In ArcGIS Pro:

  1. Open the ortho layer symbology by left clicking on the layer.
  2. Go to the "Mask" header
  3. Click the checkbox, "Display background value".
  4. Make sure the two color choice boxes are set to "No Data".

Please note: for some annoying annoying annoying reason, the Symbology Ribbon tab at the top of your screen has the masking options hidden under "Advanced Options" and evaded my discovering it previously.

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.