Image subtraction.
function call:
[out_img1]=vsg('Subtract',in_img1,in_img2);
Arguments:
in_img1
input image, 3 channel RGB, 1 channel greyscale or binary image, or
DICOM image.
in_img2
input image, 3 channel RGB, 1 channel greyscale or binary image, or
DICOM image.
Description:
[out_img1]=vsg('Subtract',in_img1,in_img2) subtracts each element in
image in_img2 from the corresponding element in image in_img1
and returns the difference in the corresponding element of the output
image out_img1. The output - out_img1 has dimensions that
are the minimum size to fit both of the input images. Each of the input
images are zero padded if their dimensions do not match.
Example:
img1 = openimage('baboon.jpg');
img2 = openimage('A.jpg');
[out_img1]=vsg('Subtract',img1,img2);
figure, image(uint8(out_img1));
Notes:
Note the same padding as the “add” function.