Question

Mark green (ish) pixels

  • 8 November 2022
  • 1 reply
  • 1 view

Hi Experts,

Which tool to use to mark green (ish) pixels in my tiffs? Is there anything available to help me to hunt pixels with the specific color range and mark it.

Thank you

j


1 reply

Userlevel 1
Badge +15

Hi @joolek.o​ thanks for your question! I think the easiest way to do this would be to use a RasterExpressionEvaluator. Depending on the range of green that you are looking to extract, you may have to have a more complicated expression, but it could also be as simple as 

if(A[1]>200,255,0)

'A' is the single tiff file, '1' being the green band, greater than the value of 200, if yes set the value to 255 and if not set the value to 0. For more information on how to make expressions with this transformer see the documentation

 

You can then use the resulting pixels that pass your if statement later on in your workspace to set their properties, clip them, or transform them in a number of ways with various transformers. Let me know if this helps or if you have any other questions!

Reply