I want to convert a mXn IplImage into a (m*n) x 1 1D vector..can this be done with any function in opencv..?
any help is greatly appreciated
I want to convert a mXn IplImage into a (m*n) x 1 1D vector..can this be done with any function in opencv..?
any help is greatly appreciated
CvMat* cvReshape(const CvArr* arr, CvMat* header, int newCn, int newRows=0)
Changes shape of matrix/image without copying data.
And the next example converts a 3x3 matrix to a single 1x9 vector:
CvMat* mat = cvCreateMat(3, 3, CV_32F); CvMat row_header, *row; row = cvReshape(mat, &row_header, 0, 1);