First time here? Check out the FAQ!
answered 2017-02-22 21:56:51 -0600
You can use macro CV_32FC(n) :
int nbChannels=48; cv::Mat image2(cv::Size(480,640), CV_32FC(nbChannels))
PS cv::Size(480,640)= 480 column and 640 rows