Changing dot location function to ignore large/small contours