“Exploring Color Variations for Vector Graphics” by Ghosh, Echevarria, Batra and Phogat
Conference:
Type(s):
Entry Number: 10
Title:
- Exploring Color Variations for Vector Graphics
Presenter(s)/Author(s):
Abstract:
ABSTRACT
We propose a novel and intuitive method for exploring recoloring variations of vector graphics. Compared with existing methods, ours is specifically tailored for vector graphics, where color distributions are sparser and are explicitly stored using constructs like solid colors or gradients, independent from other semantical and spatial relationships. Our method tries to infer some of them before formulating color transfer as a transport problem between the weighted color distributions of the reference and the target vector graphics. We enable creative exploration by providing fine-grain control over the resulting transfer, allowing users to modify relative color distributions in real-time.
OUR APPROACH
Color distributions in vector graphics are way sparser than in pho[1]tos, making it more challenging to assess whether a color is a variation of another one (typically a shade or a tint) or it has its own entity. Not taking this into account often leads to recolorings that may be numerically right, but do not preserve the original structures properly.
Our approach includes this process during an initial palette extraction step, producing smaller but more perceptually relevant palettes. Then, we use the Earth Mover’s Distance to map the reduced reference and target color palettes, before finally recovering the tints and shades to preserve the original color relationships.
Color Extraction
Target Vector Art. The target vector graphics can contain any number of vector paths arbitrarily stacked on top of each other. We compute a planar arrangement of paths [Asente et al. 2007] to ensure parity with visual appearance. Then, for each face in the arrangement we compute the number of pixels for its associated color, which gives us a weighted palette. To ensure real time performance, we leverage the stencil buffer in the programmable GPU pipeline to accumulate the pixel count of each face in the arrangement. The weights are then normalized for all the colors extracted. Non trivial color constructs such as gradients are discretized into their constituent color components (Figure 3b) in order to compute their weighted distribution. Finally, a reduction pass is performed on the set of colors to reduce tints and shades to a single bin (Figure 3a). Tints and shades are mixtures of a color with white and black respectively, so we put them into the same bin, and take its the weighted mean as the reduced color.
Reference colors. For reference images, we compute a weighted distribution from the source image using a K-Means clustering approach, with k being the same number of bins in the reduced palette from the previous section. However, sometimes the reference can be a manually curated color palette with uniform weights.
As mentioned previously, it is critical for designers to have control over the recoloring process and the resulting variations. We enable this by allowing them to edit the weights of the reference palette interactively (Figure 4).
Color Transfer
We use Earth Mover’s Distance [Rubner et al. 1998] to find the optimal flow between the weighted color palettes from the source image to the target vector graphics. After recoloring the reduced target palette, we propagate the edits to the full palette to recover the final tints and shades using [Nguyen et al. 2017].
References:
- Paul Asente, Mike Schuster, and Teri Pettit. 2007. Dynamic Planar Map Illustration. ACM Trans. Graph. 26, 3, Article 30 (July 2007). https://doi.org/10.1145/1276377. 1276415
- Li, M. Y. Liu, X. Li, M. H. Yang, and J. Kautz. 2018. A closed-form solution to photorealistic image stylization. European Conference on Computer Vision (ECCV) (2018).
- M.H. Nguyen, B. Price, S. Cohen, and M. S. Brown. 2017. Group-Theme Recoloring for Multi-Image Color Consistency. Computer Graphics Forum 36, 7 (2017), 83–92. https://doi.org/10.1111/cgf.13274
- Reinhard, M. Adhikhmin, B. Gooch, and P. Shirley. 2001. Color transfer between images. IEEE Computer Graphics and Applications 21, 5 (July 2001), 34–41. https: //doi.org/10.1109/38.946629
- Rubner, C. Tomasi, and L. J. Guibas. 1998. A metric for distributions with applications to image databases. In IEEE International Conference on Computer Vision (1998).