Flood detection Operator - Binarization threshold as a parameter

Hello!

I ran into the FloodDetection graph and understood that the flood detection is a binarization expression.
This post is about asking why the threshold cannot be defined as a parameter in the expression (example):

!(Sigma0_VV_mst_27May2021 < 0.05 && Sigma0_VV_mst_27May2021 > 0) && (Sigma0_VV_slv1_08Jun2021 < 0.05 && Sigma0_VV_slv1_08Jun2021 > 0) && Terrain_Mask == 0

Thanks for your time!

1 Like

I’m not sure if I understood your question.

But you don’t need to apply the “Flood-Detection” operator to identify the differences in two coregistered images. You can als use logical statements (as in your example) in the Mask Manager or the Band Maths to identify pixels where backscatter intensity has decreased by a cretain degree.

Thanks @ABraun, sure but if there’s a FloodDetection operator it maybe the way to go as as it is I don’t see how it can be used for flood detection (the threshold may change according to the area or other factors).
The Operator code is here: s1tbx/FloodDetectionOp.java at master · senbox-org/s1tbx · GitHub, it’s a pity not to expose the threshold as a parameter.

I’m not sure if it is really based on a variable threshold. Maybe @jun_lu can comment here.

The operator was not maintained. But if your SNAP is built from source code, you can add threshold as a parameter with code like the following two lines:

@Parameter(description = “Threshold for flood detection”, interval = “(0, 1]”, defaultValue = “0.05”,
label = “Threshold in (0,1]”)
private double threshold = 0.05;

Thanks @jun_lu