image_output_1.png
import histomicstk as htk

import matplotlib.pyplot as plt

input_image_file = ('https://data.kitware.com/api/v1/file/'
                    '576ad39b8d777f1ecd6702f2/download')  # Easy1.png

im_input = skimage.io.imread(input_image_file)[:, :, :3]

plt.imshow(im_input)
_ = plt.title('Input Image', fontsize=16)

ref_image_file = 'https://data.kitware.com/api/v1/file/57718cc28d777f1ecd8a883c/download'
im_reference = skimage.io.imread(ref_image_file)[:, :, :3]
mean_ref, std_ref = htk.preprocessing.color_conversion.lab_mean_std(im_reference)
im_nmzd = htk.preprocessing.color_normalization.reinhard(im_input, mean_ref, std_ref)
plt.figure(figsize=(20, 10))
plt.subplot(1, 2, 1)
plt.imshow(im_reference)
_ = plt.title('Reference Image', fontsize=titlesize)
plt.subplot(1, 2, 2)
plt.imshow(im_nmzd)
_ = plt.title('Normalized Input Image', fontsize=titlesize)