Color Transfer Between Images, Histogram Based Style Transfer
color transfer
image manipulation
histogram-based style transfer
video effects
picture enhancement
Python code
image color matching
This text explains a method for color transfer between images, specifically using histogram-based style transfer to create vibrant effects in videos or pictures. It provides installation instructions and example Python code for image color matching using histogram matching.
图像调色风格转换 可以创建蹦迪特效 让视频或者图片五彩斑斓
pip install color_transfer
official scikit-learn histogram matching
import matplotlib.pyplot as plt
from skimage import data
from skimage import exposure
from skimage.exposure import match_histograms
= data.coffee()
reference = data.chelsea()
image = match_histograms(image, reference, channel_axis=-1)
matched = plt.subplots(nrows=1, ncols=3, figsize=(8, 3),
fig, (ax1, ax2, ax3) =True, sharey=True)
sharexfor aa in (ax1, ax2, ax3):
aa.set_axis_off()
ax1.imshow(image)'Source')
ax1.set_title(
ax2.imshow(reference)'Reference')
ax2.set_title(
ax3.imshow(matched)'Matched')
ax3.set_title(
plt.tight_layout() plt.show()