Skip to main content
Solved

Normalizing greyscale images

  • January 19, 2021
  • 2 replies
  • 77 views

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]

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

tomf
Supporter
Forum|alt.badge.img+20
  • Supporter
  • 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
Supporter
Forum|alt.badge.img+20
  • Supporter
  • January 20, 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]

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