as OpenCv documentation mentioned , Mat::copyTo() is using an input of type Mat. http://docs.opencv.org/modules/core/doc/basic_structures.html?highlight=copyto#mat-copyto
I need an equivalent function that takes an input of type CvMat* .