Applique threshold in band math


I am doing some calculation on some images, and I use band math option in SNAP.

in fact I am doing ration of an image on other one
New_img = images1 / images2

to visualize the output image there is some extreme pixel values.

so I need to make a condition or threshold for example 10.

if images1 /images2 > 10 the result of this pixel = 10
else New_img = images1 /images2

IF (img1 / img2) > 10 THEN 10 ELSE (img1 / img2)

1 Like