Please replace CvTermCriteria by cv::TermCriteria as we have agreed to follow C++ style of OpenCV.