mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2025-02-22 20:23:15 +03:00
feat: histogram matching
This commit is contained in:
parent
995481f437
commit
f6e3225afd
5 changed files with 47 additions and 4 deletions
12
methods/two_to_one_methods.py
Normal file
12
methods/two_to_one_methods.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
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())
|
Loading…
Add table
Reference in a new issue