skimage2.util.compare_images#
- skimage2.util.compare_images(image0, image1, *, method='diff', n_tiles=(8, 8))[source]#
Return an image showing the differences between two images.
Added in version 0.16.
- Parameters:
- image0, image1ndarray, shape (M, N)
Images to process, must be of the same shape.
Changed in version 0.24:
image1andimage2were renamed intoimage0andimage1respectively.- method{‘diff’, ‘blend’, ‘checkerboard’}, optional
Method used for the comparison. Details are provided in the note section.
Changed in version 0.24: This parameter and following ones are keyword-only.
- n_tilestuple, optional
Used only for the
checkerboardmethod. Specifies the number of tiles (row, column) to divide the image.
- Returns:
- comparisonndarray, shape (M, N)
Image showing the differences.
Notes
'diff'computes the absolute difference between the two images.'blend'computes the mean value.'checkerboard'makes tiles of dimensionn_tilesthat display alternatively the first and the second image. Note that images must be 2-dimensional to be compared with the checkerboard method.