Combining multiple cv::Mat images into single cv::Mat
I am working with the new C++ - style interface. I thought I could use the following trick to create an image based on 3 existing images, but the window stays clear of information. Anyone has an idea what I am doing wrong?
split(input_color,color_channels);
blue_channel = color_channels[0];
green_channel = color_channels[1];
red_channel = color_channels[2];
Above code show splitting into color channels which I want to represent next to eachother.
int rows = input_color.rows;
int cols = input_color.cols;
Mat result_channel(rows, cols * 3, CV_8UC1);
result_channel( Rect(0, 0, cols, rows) ) = blue_channel;
result_channel( Rect(cols, 0, cols, rows) ) = green_channel;
result_channel( Rect(cols*2, 0, cols, rows) ) = red_channel;
imshow("color channels", result_channel); cvWaitKey(10);
By using the roi parameter I wanted to assign the color channels to a region in the larger image. Result however is a blank window. Anyone has an idea what is happening?
Why it show CV_8UC1 cannot be resolved to a variable when I write imageroiB.create(block,block,CV_8UC1);
I do not understand your problem... This has quite nothing to do with this question. I think you simply need
Can I have your e-mail.I send the screenshots to you.
No, just open your own question and add them there with some explanation ...
OK ,thank you all the same! I write like this :Mat imageroiB(block,block,CV_8UC1) .it will appear a red break line under the word "Mat".And it can't run. I could not find the "CV_8UC1" in the options when I use the "Alt+/".
Like I said, own question, add your code and then I might be able to tell the problem!
Sorry for my poor English expression abilities. This is my question:
http://answers.opencv.org/question/33639/could-not-find-opencv-library-248apk/