Added new parameter to set the discrimination threshold between
foreground and background