在学习完《Recoloring textile fabric images based on improved fuzzy clustering》后,想了解具体的重新染色代码,但是原文章好像没有公布的代码。如果没有公布的,只能联系下文章作者,了解下技术细节和问题,不过暂时还不急,所以先了解一下其他的recoloring的代码和过程,具体整理如下:
一、Based on《Palette-based photo recoloring》
原链接:https://github.com/brancuad/PaletteTransfer
Given an image, they generate a suitable palette. The user can then modify the image by modifying the colors in the palette .
Automatic Palette Selection:
4.Convert output back into RGB colors
LAB means: Luminance, a, b .
using a modified version of the K-Means Clustering algorithm
To initialize centers for optimal representative output, the algorithm will find the k largest bins and use those values as the initial centers.
Results:
图片上传一直失败,此处无图- -。
二、Based on《Translucent Image Recoloring through Homography Estimation》
原链接:https://github.com/qhanson/translucent-image-recolor/blob/master/refine_code/GUI_hm_dark_style.py
In this paper, they propose a new method to xx while preserving detailed information and color relationships of the source image. First, they propose the H-means method to extract the dominant colors of the source image based on histogram statistics and clustering. Then, they propose homography estimation to map the source colors to desired colors in the CIELAB color space.
Recolor the translucent images.
They consider the recolor problem as a location transformation problem and solve it in two steps:
1 .Automatic palette extraction
2. Homography estimation.
三、Dominant Color Extraction Dominance and Recoloring
原链接:https://github.com/srijannnd/Dominant-Color-Extraction-Dominance-and-Recoloring
Method:
A python program to extract the dominant colors of an image and to visualize their dominance using K-Means clustering algorithm and then regenerating the image with the help of K centers (dominant colors).
Result?
四.、Based on 《Image Recoloring Based on Object Color Distributions》
原链接:https://github.com/mahmoudnafifi/Image_recoloring
They present a method to perform automatic image recoloring based on the distribution of colors associated with objects present in an image.
For example, when recoloring an image containing a sky object, their method incorporates the observation that objects of class 'sky' have a color distribution with three dominant modes for blue (daytime), yellow/red (dusk/dawn), and dark (nighttime).
Given a new input image and its associated semantic segmentation (i.e., object mask), they perform color transfer to map the input image color histogram to a set of target color histograms that were constructed based on the learned color distribution of the objects in the image.
By using the images in datasets used to train deep-learning object segmentation methods, they are able to model the color distribution of each object class in the dataset.