mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2024-11-05 20:23:58 +03:00
13 lines
298 B
Python
13 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())
|