#include<opencv2\opencv.hpp>
#include
using namespace std;
using namespace cv;
int main()
{
Mat src = imread(“F:/1-Program/Test/0-picture/road_2.jpg”);//输入处理图片地址
vector output;
split(src, output);
Mat Blue = output[0];
Mat Green = output[1];
Mat Red = output[2];
imshow(“Blue”, Blue);
imshow(“Green”, Green);
imshow(“Red”, Red);
Mat bgr[] = { Blue,Green,Red };
Mat Mer;
merge(bgr, 3,Mer);
imshow(“Mer_output”, Mer);
waitKey(0);
return 0;
}
OpenCV 4.0——C++通道合并与分离merge与split应用
最新推荐文章于 2023-07-07 18:20:08 发布