opencv4.0 C ++ channel separation

#include<opencv2/opencv.hpp>
#include
using namespace cv;
using namespace std;
int main(int argc, char**argv)
{
Mat src = imread(“F:/1-Program/Test/Project3/1/img.jpg”);
Mat aChannels[3];
split(src, aChannels);
imshow(“B”, aChannels[0]);
imshow(“G”, aChannels[1]);
imshow(“R”, aChannels[2]);
waitKey(0);
destroyAllWindows;
return 0;
}

Released two original articles · won praise 0 · Views 107

Guess you like

Origin blog.csdn.net/weixin_45748354/article/details/104506576