Alternative Mosaicking Method for Images with Fuzzy Edges

Liz Sanderson
Liz Sanderson
  • Updated


When mosaicking images with non-rectangular shapes, the usual process is to convert the color of the outside area (usually black or white), to NoData, then convert that in turn into a 0 Alpha value, which will allow the overlapping image to show through during the mosaic. If you are not working with images with fuzzy edges, please refer to Basic Raster Mosaicking, Setting NoData and Adding Alpha Bands to Remove Black Borders, or Raster Mosaicking Scenario. This article will describe an alternative mosaicking method for working with images with fuzzy edges.


Mosaicking Images with Fuzzy Edges

If the source image was stored using a lossy compression (ie. JPEG, JPEG2000, ECW), the outside area is often not a pure black or white, especially near the edge of the image.



The almost black areas will not be replaced with NoData, which makes a mess of the boundaries between the mosaics:



An alternative method for this dataset is to use the RasterExpressionEvaluator to calculate an Alpha value from the brightness of the pixels:



The darker areas will not be completely transparent, but they will be mostly transparent, and the resulting pixel color will be taken primarily from the adjoining image.



This technique works best for scanned maps like the one in this example, where there is a good contrast between the desired image and the empty area. It may not be as successful for aerial or satellite photos.


Was this article helpful?



Please sign in to leave a comment.