Blending Two Images
Another interesting scenario is blending of two images. Imagine we have some newer imagery partially covering the area of interest. This scenario can complement my
Raster Mosaicker Scenario, which talks about making raster mosaics and inserting updated imagery.
A simple update just puts new images on top of the old ones, and the boundary between two images is very sharp. If the images are quite different (different resolution or even spectral range), this sharp transition may look not very nice.
The implementation of a smooth transition is similar to the previous scenario - multiple buffers change gradually their transparency. For the older outer infrared image we go from fully opaque area to the transparent, for the newer true color image we go from fully transparent areas to opaque. 'Compositing Using Alpha Band' option set to 'yes' mixes the pixels of two images appropriately, so we see how one image gradually transforms into another:
As a side note I wanted to mention how the RasterCheckPointer
inserted before the RasterMosaicker
improves the overall performance - the workspace needs as many seconds to complete the task as many minutes it needs without this transformer.
Note: To run this example, you will need to download both the attached template AlphaCompositingTwoImages.fmwt and the source dataset in the zip file.