and a funtion to change threshold for canny