Compare two images
Compares two images, pixel by pixel, to determine if they are identical. If the images are identical, the function will complete successfully. If the images are different, the line and sample location of the first difference is reported and the function issues a fatal error message.
- IN
- Input images. The images to be compared. Window and band options are allowed. The images must be the same size and have the same number of bands.
- TOLVAL(0.0)
- Tolerance value. The absolute difference of two pixels must be greater than TOLVAL to be considered different. The default is value is 0.0, indicating that the pixels must be equal.
The images ANSWER and TEST are compared pixel by pixel. If there are any differences, the function will issue a fatal error message indicating where the first difference occurs. If the images are identical, the function will complete successfully.
The images ANSWER and TEST are compared pixel by pixel. If any of the pixel values are different by more than 1.0, the function will issue a fatal error message indicating where the first difference occurs. If all pixel values in the input images differ by 1.0 or less, the function will complete successfully.
The image ANSWER is compared to the images TEST1 and TEST2. ANSWER must contain the same number of bands as TEST1 and TEST2 combined. If there are any differences, the function will issue a fatal error message indicating where the first difference occurs. If the images are identical, the function will complete successfully.
The corresponding pixel values in the input images are compared. The function will issue a fatal error message if it encounters a difference that is greater than TOLVAL.If all of the pixel values are within TOLVAL of each other, the function will complete successfully.
IMGCMP was unable to allocate dynamic memory. If the error persists, contact the system administrator.
Both elements of IN must contain the same number of bands. Check the images specified for IN and re-run.
The first pixel found to be different in the two images was found in band <x>, on line <y>, at sample <z>.
A fatal error was encountered during processing. The error message that is displayed immediately preceding this message is the specific error encountered. Processing is terminated.
The specified images have different sizes or different size windows applied to them. Re-specify the input images so they are the same size.