1 | initial version |
I think you can split data and later merge it if necessary :
Mat picture = imread("picture.png", CV_LOAD_IMAGE_COLOR);
vector<Mat> p;
split(image, p);
vector<Mat> output(p.size());
output[0] = p[0] * 0.2;
output[1] = p[1] * 0.3;
output[2] = p[2] * 0.4;
merge(output, res);
2 | No.2 Revision |
I think you can split data and later merge it if necessary :
Mat picture = imread("picture.png", CV_LOAD_IMAGE_COLOR);
vector<Mat> p;
split(image, p);
vector<Mat> output(p.size());
output[0] = p[0] * 0.2;
output[1] = p[1] * 0.3;
output[2] = p[2] * 0.4;
merge(output, res);
PS in opencv it is not RGB but BGR
3 | No.3 Revision |
I think you can split data and later merge it if necessary :
Mat picture = imread("picture.png", CV_LOAD_IMAGE_COLOR);
vector<Mat> p;
split(image, p);
vector<Mat> output(p.size());
output[0] = p[0] * 0.2;
output[1] = p[1] * 0.3;
output[2] = p[2] * 0.4;
Mat res;
merge(output, res);
PS in opencv it is not RGB but BGR
4 | No.4 Revision |
I think you can split data and later merge it if necessary :
Mat picture = imread("picture.png", CV_LOAD_IMAGE_COLOR);
vector<Mat> p;
split(image, p);
vector<Mat> output(p.size());
output[0] = p[0] * 0.2;
0.2+ p[1] * 0.3+p[2] * 0.4;
output[1] = p[1] * 0.3;
....;
output[2] = p[2] * 0.4;
.....;
Mat res;
merge(output, res);
PS in opencv it is not RGB but BGR
5 | No.5 Revision |
I think you can split data and later merge it if necessary :
Mat picture = imread("picture.png", CV_LOAD_IMAGE_COLOR);
vector<Mat> p;
split(image, p);
vector<Mat> output(p.size());
output[0] = p[0] * 0.2+ p[1] * 0.3+p[2] * 0.4;
output[1] = ....;
p[0] * 0.4+ p[1] * 0.5+p[2] * 0.6;
output[2] = .....;
p[0] * 0.7+ p[1] * 0.8+p[2] * 0.9;
Mat res;
merge(output, res);
PS in opencv it is not RGB but BGR
6 | No.6 Revision |
I think you can split data and later merge it if necessary :
Mat picture = imread("picture.png", CV_LOAD_IMAGE_COLOR);
vector<Mat> p;
split(image, p);
vector<Mat> output(p.size());
output[0] = p[0] * 0.2+ p[1] * 0.3+p[2] * 0.4;
output[1] = p[0] * 0.4+ p[1] * 0.5+p[2] * 0.6;
output[2] = p[0] * 0.7+ p[1] * 0.8+p[2] * 0.9;
Mat res;
merge(output, res);
and see this answer
PS in opencv it is not RGB but BGR