The constructor `Mat(const IplImage* img, bool copyData=false)` is completely removed in the latest OpenCV API. See http://docs.opencv.org/trunk/modules/core/doc/basic_structures.html#mat-mat