Overview
AFEngine C++ library provides auto focus function for different software lens controllers. AFEngine class doesn’t control lens directly. It just get lens state and gives what should lens controller do for reaching optimal focus position. The library provides various auto focus features: push focus, continuous auto focus (after changing zoom), auto focus timeout, autofocus sensitivity trigger, auto focus ROI change and auto focus ROI detection. The focus factor is computed with a noise-robust band-pass (difference-of-box) edge-energy measure, so it stays reliable on noisy (e.g. thermal) video without any separate noise filtering. The library has a simple interface for embedding in different software lens controllers. To ensure autofocus operation, the user must transfer each new video frame to the library, as well as transfer the current zoom and focus positions. The library uses C++17 standard.
Documentation
Documentation: GO TO DOCUMENTATION
Simple interface
class AFEngine
{
public:
/// Get engine version.
static std::string getVersion();
/// Add video frame for processing.
bool addVideoFrame(rapidpixel::Frame& frame);
/// Update data to get AF State Machine value.
int updateData(int zoomPos, int focusPos, int& reqPos);
/// Set the AFEngine param.
bool setParam(AFParam id, float value);
/// Get the AFEngine param.
float getParam(AFParam id);
/// Execute command.
bool executeCommand(AFCommand id);
};

