The application should always return a focus value even if the data does not have an ideal range (that's what I mean by V or U shape)
The solution implemented in #12 works but I'm not fully convinced is the best solution.

Current Implementation
To obtain the best focus it uses the Brent optmization method with a bracket that has to define a V or U shape data.
Idea for Implementation
It should implement diferentiated algorithm to get the best focus, depending on the shape of the data.
The application should always return a focus value even if the data does not have an ideal range (that's what I mean by V or U shape)

The solution implemented in #12 works but I'm not fully convinced is the best solution.
Current Implementation
To obtain the best focus it uses the Brent optmization method with a bracket that has to define a V or U shape data.
Idea for Implementation
It should implement diferentiated algorithm to get the best focus, depending on the shape of the data.