sky detector based on contrast