Modified OpenCV Sample