addweightedcv
Adds weighted inputs.
Syntax
R = addweightedcv(source1, w1, source2, w2, w3...)
R = addweightedcv(source1, w1, source2, w2, w3, depth)
Inputs
- source1
- Handle of an image. The number of rows and columns of source1 and source2 must match.
- w1
- Weight of the elements of source1.
- source2
- Handle of an image. The number of rows and columns of source1 and source2 must match.
- w2
- Weight of the elements of source2.
- w3
- Weight of the elements of the output R.
- depth
- Optional parameter specifying the depth of R. Default value is -1, indicating that output R will have the same depth as input source1.
Outputs
- R
- Handle of the output image.
Example
src1 = imreadcv('addweightedcv_fig1.jpg');
img2 = imreadcv('addweightedcv_fig2.jpg');
size1 = imsizecv(src1);
src2 = resizecv(img2, [size1(1) size1(2)]);
w1 = 0.1;
w2 = 1;
w3 = 0;
R = addweightedcv(src1, w1, src2, w2, w3);