I am using OpenCV 2.4.3 to create and reshape a matrix like this:
cv::Mat testMat = cv::Mat::zeros ( 500, 200, CV_8UC3 );
std::cout << \"size of testM
reshape returns a new Mat header
cv::Mat testMat = cv::Mat::zeros ( 500, 200, CV_8UC3 );
std::cout << "size of testMat: " << testMat.rows << " x " << testMat.cols << std::endl;
cv::Mat result = testMat.reshape ( 0, 1 );
std::cout << " size of original testMat: " << testMat.rows << " x " << testMat.cols << std::endl;
std::cout << " size of reshaped testMat: " << result.rows << " x " << result.cols << std::endl;