Initial OpenCV implementation