Question

ChangeDetector transformer - how it can be applied to photos of time A against time B?


Hello all,

I am trying to figure out the limitations of this transformer. From a previous post from @LauraAtSafe she has shown how it can work with text/logos and mentions that it can be expanded further to detector more complex geometry.

If anyone is familiar with this transformer/how to expand the model Laura has created/ is able to guide me how I can further this transformer to detect pixels/cells I would be very grateful!

Many thanks

RO


4 replies

Userlevel 2
Badge +17

Hi @rollington, I'm unclear what the previous @LauraAtSafe's post was. If you need to compare two raster datasets - time A and time B, the RasterExtractor might help you. You can extract each raster data as an attribute using this transformer, and then you can compare the attribute values by the ChangeDetector. The parameter settings in the ChangeDetector would be:

  • Match Geometry: NONE
  • Attribute Matching Strategy: Match Selected Attributes
  • Selected Attributes: _rasterBlob (the attribute extracted by the RasterExtractor)
Userlevel 2
Badge +17

Hi @rollington, I'm unclear what the previous @LauraAtSafe's post was. If you need to compare two raster datasets - time A and time B, the RasterExtractor might help you. You can extract each raster data as an attribute using this transformer, and then you can compare the attribute values by the ChangeDetector. The parameter settings in the ChangeDetector would be:

  • Match Geometry: NONE
  • Attribute Matching Strategy: Match Selected Attributes
  • Selected Attributes: _rasterBlob (the attribute extracted by the RasterExtractor)

oops, I perhaps misunderstood your requirement. You need to detect cells having different value between two rasters?

Userlevel 2
Badge +12

Maybe you should check out the RasterExpressionEvaluator transformer instead of the ChangeDetector:

http://docs.safe.com/fme/2016.0/html/FME_Desktop_D...

That transformer can evaluate values for cells in two rasters.

Userlevel 4
Badge +25

Yes, I'm unclear too about the article you mean. The ChangeDetector doesn't handle raster - as far as I know - so you would need to turn the raster into point features first (use the RasterCellCoercer).

But I think a better method is the RasterExpressionEvaluator. Use that on two rasters and subtract one cell value from another. If the result is zero then there is no difference.

Since you are using an image, presumably it has three bands. In that case you'd need an expression for each band or split the raster up into separate features per band (use the RasterBandSeparator)

Hope that helps

Mark

Reply