Description
The RasterExpressionEvaluator is a transformer that evaluates expressions on each cell in a raster, such as algebraic operations or conditional statements.
Simple Calculation Examples
Inverting Colors
This example demonstrates how to invert images with the following band interpretation list and expression:
RED8;GREEN8;BLUE8
255-A[0];255-A[1];255-A[2]
The images show Heritage Mountain Elementary School and the surrounding area in Google Earth
-
See RGBColorInverter.fmwt in the attached zip file
Brightness Correction
If an image is too dark, we can boost brightness with the following simple expression:
A[0]*1.5;A[1]*1.5;A[2]*1.5

Port Moody, Greater Vancouver
Note that this method should be used cautiously - if there are bright areas in the image, they will reach or exceed the maximum value (255 in my example), which will make them purely white (255, 255, 255 in case of RGB24), and the information in those areas will be lost.
-
See BrightnessCorrection.fmwt in the attached zip file