Compare commits

..

No commits in common. "a5244a7d4bdc40d60c8a7b7c006ca90282e0f0cc" and "995481f43737fa064de0abf1ee6a5173492037c5" have entirely different histories.

5 changed files with 4 additions and 47 deletions

View file

@ -1,12 +0,0 @@
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())

View file

@ -1,4 +1,6 @@
from methods.stack_methods import methods_funcs
from methods.stack_methods import (
methods_funcs,
)
import os
from processing.utils import generate_name

View file

@ -1,10 +0,0 @@
from methods.two_to_one_methods import methods_funcs
from processing.utils import generate_name
def two_to_one(img1, img2, method):
img = methods_funcs[method](img1, img2)
out_path = generate_name(subfolder="two_to_one")
img.save(out_path)
return [out_path]

View file

@ -1,17 +0,0 @@
import gradio as gr
from processing.two_to_one import two_to_one
from methods.two_to_one_methods import methods
with gr.Blocks() as app:
gr.Markdown("Get one image from two.")
with gr.Row():
with gr.Column():
img1 = gr.Image()
img2 = gr.Image()
method = gr.Dropdown(choices=methods, value=methods[0], label="Method")
submit = gr.Button("Submit")
with gr.Column():
output = gr.Gallery()
submit.click(two_to_one, inputs=[img1, img2, method], outputs=[output])

View file

@ -1,7 +1 @@
tabs = [
"Stacking",
"Bulk processing",
"Two images to one",
"Images to video",
"Video to images",
]
tabs = ["Stacking", "Bulk processing", "Images to video", "Video to images"]