Applying threshold before starting watershed mode