Skip to main content
Solved

Normalizing greyscale images


Forum|alt.badge.img

Hi,

Can anyone please help me on how to normalize a set of greyscale images using FME ? (Transforming the scale range of radiometric values to the [0,1] interval)

 

thank you very much

Best answer by tomf

To normalise into [0,1] you can use the expression:

( x - x_min ) / (x_range)

so for your case:

  1. A RasterStatisticsCalculator to calculate min and range on Band 0
  2. Followed by a RasterExpressionEvaluator for one band, and use the expression:

(A[0]-@Value(A:band0.min))/@Value(A:band0.range)

This output from that is now normalised [0,1]

View original
Did this help you find an answer to your question?

2 replies

tomf
Contributor
Forum|alt.badge.img+14
  • Contributor
  • Best Answer
  • January 19, 2021

To normalise into [0,1] you can use the expression:

( x - x_min ) / (x_range)

so for your case:

  1. A RasterStatisticsCalculator to calculate min and range on Band 0
  2. Followed by a RasterExpressionEvaluator for one band, and use the expression:

(A[0]-@Value(A:band0.min))/@Value(A:band0.range)

This output from that is now normalised [0,1]


tomf
Contributor
Forum|alt.badge.img+14
  • Contributor
  • January 20, 2021
tomf wrote:

To normalise into [0,1] you can use the expression:

( x - x_min ) / (x_range)

so for your case:

  1. A RasterStatisticsCalculator to calculate min and range on Band 0
  2. Followed by a RasterExpressionEvaluator for one band, and use the expression:

(A[0]-@Value(A:band0.min))/@Value(A:band0.range)

This output from that is now normalised [0,1]

In detail:

Set the RasterStatisticsCalculator:

RSC_normalisingThen open the the Arithmetic Editor in the RasterExpresionEvaluator from the drop down menu on the right of the Expression column:

REE-normalisngAnd finally create the expression for raster A band 0 (single raster, greyscale):REEeditor_normalising


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings