i am working in opencv c++ api with matrices
I have 4 single channel Mat that i will like to merge into one 4 channel matrix. It is basically the rgba channels i have in
You can use cv::merge to do what you want. One possible usage:
cv::Mat r,g,b,a; //Fill r,g,b,a with data cv::Mat result; std::vector<cv::Mat> channels; channels.push_back(r); channels.push_back(g); channels.push_back(b); channels.push_back(a); cv::merge(channels, result);