1 | initial version |
main difference between addWeighted() and blendLinear() is, that the latter has weights per pixel for each image. do you have such a thing ?
2 | No.2 Revision |
main difference between addWeighted() and blendLinear() is, that the former has a single blending factor for the whole image, and the latter has a weights per pixel Mat for each image.
do you have such a thing ??
as an example:
Mat_<uchar> m1(2,2);
m1 << 1,1,
1,1;
Mat_<uchar> m2(2,2);
m2 << 3,3,
3,3;
Mat_<float> w1(2,2);
w1 << .2, .4,
.4, .2;
Mat w2 = 1.0f - w1;
Mat result;
blendLinear(m1, m2, w1, w2, result);
cout << result << endl;
[ 3, 2;
2, 3]
3 | No.3 Revision |
main difference between addWeighted() and blendLinear() is, that the former has a single blending factor for the whole image, and the latter has a weights per pixel Mat for each image.
do you have such a thing ?
as an example:
Mat_<uchar> m1(2,2);
m1 << 1,1,
1,1;
Mat_<uchar> m2(2,2);
m2 << 3,3,
3,3;
Mat_<float> w1(2,2);
w1 << .2, .4,
.4, // 0.2 * 1st_pixel, 0.4 * 2nd_pixel, etc.
.4, .2;
Mat w2 = 1.0f - w1;
Mat result;
blendLinear(m1, m2, w1, w2, result);
cout << result << endl;
[ 3, 2;
2, 3]
4 | No.4 Revision |
main difference between addWeighted() and blendLinear() is, that the former has a single blending factor for the whole image, and the latter has a weights per pixel Mat for each image.
do you have such a thing ?
as an example:
Mat_<uchar> m1(2,2); // 1st "demo" image
m1 << 1,1,
1,1;
Mat_<uchar> m2(2,2); // 2nd image
m2 << 3,3,
3,3;
Mat_<float> w1(2,2);
w1(2,2); // weights
w1 << .2, .4, // 0.2 * 1st_pixel, 0.4 * 2nd_pixel, etc.
.4, .2;
Mat w2 = 1.0f - w1;
Mat result;
blendLinear(m1, m2, w1, w2, result);
cout << result << endl;
[ 3, 2;
2, 3]