image-pluser-webui/methods/two_to_one_methods.py
2023-04-30 21:01:03 +03:00

12 lines
298 B
Python

from skimage.exposure import match_histograms
import numpy as np
from PIL import Image
def histogram_matching(img1, img2):
return Image.fromarray(match_histograms(img1, img2, channel_axis=-1))
methods_funcs = {"Histogram matching": histogram_matching}
methods = list(methods_funcs.keys())