OpenCV implementation of Focus Metrics