Finished porting code to cv::Mat interface, and removed old IplImage code