Initial autofocus in hole detection