Range estimation accuracy using depth-from-focus methods: theory and experiment