[IMDIFF, GRAYERROR] = iat_error2gray(IM1, IM2, SUPPORT)

iat_error2gray returns the difference IM1-IM2 in IMDIFF and its translation to a grayscale image in GRAYERROR. Both take into account the mask SUPPORT when provided, i.e. error is computed in the area marked by binary image SUPPORT. Color images are converted to grayscale before the subtraction

Input arguments

IM1 The first image
IM2 The second image. Both IM1 and IM2 are scaled so that the intensities are in range [0,255] before the subtraction
SUPPORT The support area for which the error is computed (default: all-one mask of size(IM1))

Output arguments

IMDIFF The image difference
GRAYERROR The image difference as UINT8 (grascale) image. Note that this image has been prefiltered by a median filter to reject sparse outliers


Back to Index