match_histograms¶
- match_histograms(image_a, image_b, kernel_size=7)[source]¶
Image normalization function.
This function performs histogram equalization to unify the appearance of an image pair.
- Parameters:
image_a (
numpy.ndarray
) – A grayscale image.image_b (
numpy.ndarray
) – A grayscale image.kernel_size (int) – The size of the ellipse-shaped footprint.
- Returns:
A normalized pair of images for performing registration.
numpy.ndarray
- A normalized grayscale image.numpy.ndarray
- A normalized grayscale image.
- Return type:
Examples
>>> from tiatoolbox.tools.registration.wsi_registration import match_histograms >>> norm_image_a, norm_image_b = match_histograms(gray_image_a, gray_image_b)