subtractcv
Finds differences in each element of source1 and source2.
Syntax
R = subtractcv(source1, source2...)
R = subtractcv(source1, source2, mask, depth)
Inputs
- source1
- Handle of an image, scalar or a 2D real matrix. If source1 and source2 are image handles, their size and number of channels must match.
- source2
- Handle of an image, scalar or a 2D real matrix. If source1 and source2 are image handles, their size and number of channels must match.
- mask
- Optional handle of an 8-bit single channel image or a 2D matrix of natural numbers representing the elements in R that need to be changed.
- depth
- Optional parameter specifying the depth of R. If negative, the same depth as source1 and source2 will be used.
Outputs
- R
- Handle of the output image.
Example
source1 = imreadcv('image1.jpg');
source2 = imreadcv('image2.jpg');
R = subtractcv(source1, source2);