add adaptive threshold exemple