Source-linked AI summary

Information-Flow Matting

Yağız Aksoy, Tunç Ozan Aydın, Marc Pollefeys

arXiv:1707.05055v2cs.CV

TL;DR

Natural image matting is ill-posed because foreground, background, and opacity are unknown, while accurate compositing also requires underconstrained layer colors. The paper proposes a purely affinity-based formulation with multiple information flows, including color-mixture flow, and solves the resulting system in closed form. It reports improved alpha matting and layer color quality, applicability to matte regularization and green-screen keying, and limitations with partial transparency and sparse trimaps.

  • Problem

    Natural matting must estimate unknown opacity and layer colors from mixed pixels, while existing affinity methods struggle with large gradients and holes.

  • Method

    The method combines multiple pixel-affinity information flows, including LLE-based color-mixture flow, to propagate information into and within unknown regions.

  • Results

    The closed-form formulation outperforms the state of the art in alpha matting and improves layer color quality across the reported extensions.

  • Takeaways & Limitations

    The affinity formulation supports standalone matting, regularization of sampling-based mattes, layer color estimation, and green-screen keying.

  • Takeaways & Limitations

    The method assumes dense trimaps and does not fully resolve cases where foreground images contain partially transparent regions.

Abstract

from arXiv · show

We present a novel, purely affinity-based natural image matting algorithm. Our method relies on carefully defined pixel-to-pixel connections that enable effective use of information available in the image. We control the information flow from the known-opacity regions into the unknown region, as well as within the unknown region itself, by utilizing multiple definitions of pixel affinities. Among other forms of information flow, we introduce color-mixture flow, which builds upon local linear embedding and effectively encapsulates the relation between different pixel opacities. Our resulting novel linear system formulation can be solved in closed-form and is robust against several fundamental challenges of natural matting such as holes and remote intricate structures. While our method is primarily designed as a standalone matting tool, we show that it can also be used for regularizing mattes obtained by sampling-based methods. The formulation is also extended to layer color estimation and we show that the use of multiple channels of flow increases the layer color quality. We also demonstrate our performance in green-screen keying and analyze the characteristics of the utilized affinities.

1 ETH Z¨urich 2 Disney Research Z¨urich

The paper is an extended version of the 2017 CVPR publication, titled “Designing effective inter-pixel information flow for natural image matting.”

  • This document extends the 2017 CVPR publication on designing effective inter-pixel information flow for natural image matting.

1. Introduction

Natural image matting estimates unknown foreground opacity from an image and trimap, but existing affinity methods struggle with broad gradients and holes. The paper addresses these limitations with multiple affinity-defined information flows and extends the formulation to additional applications.

  • Natural image matting estimates foreground opacity, or alpha, by expressing transition-region colors as mixtures of unknown foreground and background colors.A trimap marks foreground, background, and unknown-opacity regions to reduce the problem’s ill-posedness.
  • Accurate matte estimation supports compositing, but realistic composites also require unmixed foreground and background layer colors.Layer colors remain underconstrained even when a matte is given, making their estimation a critical compositing component.
  • Existing affinity methods propagate alpha from known-opacity regions but fail on large alpha gradients and spatially disconnected holes.The paper attributes these shortcomings to pixel-to-pixel affinities that inadequately represent complex real-world structures.
  • The proposed strategy designs multiple affinity-defined information flows, including color-mixture flow based on local linear embedding, to distribute opacity information through unknown regions.The final linear system is solved in closed form and is reported to improve matte quality over the state of the art.
  • The extended version adds foreground color estimation, green-screen keying results, spectral analysis of information flows, and discussion of sampling-based matting.

2. Related work

Natural matting methods include sampling-based, learning-based, and affinity-based approaches. The paper develops a purely affinity-based alternative that combines tailored information flows rather than relying on sampling, learning, or simple affinity combinations.

  • Natural image matting methods are commonly categorized as sampling-based, learning-based, or affinity-based.
  • Sampling-based methods select foreground-background sample pairs for unknown pixels and perform well around remote structures, but need affinity-based regularization for spatial consistency.
  • Learning-based methods have been used for alpha estimation, trimap estimation, and combining other matting results, including deep networks trained with large image datasets.
  • Affinity-based methods propagate alpha through color or spatial similarities, using local patches or nonlocal neighbors to relate pixel opacities.Closed-form, KNN, and manifold-preserving approaches exemplify these local and nonlocal formulations.
  • Prior hybrid methods combine affinity formulations or feed multiple matting outputs into a neural network, whereas this work introduces a tailored color-mixture flow and three additional information flows.
  • The proposed formulation is purely affinity-based, avoids sampling and learning steps, and has a closed-form solution requiring less memory than the compared strategy.
  • Layer Color Estimation: For layer color estimation, prior smoothness-only or color-similarity approaches have limitations, motivating four combined information flows for improved remote foreground color quality.
  • Green-Screen Keying: Green-screen keying is a more constrained matting setting with homogeneous backgrounds but demands very high output quality for professional production.

3. Method

The method designs multiple affinity-based information flows so opacity information reaches unknown pixels effectively, including remote and intricate regions. It combines color-mixture, direct K-to-U, confidence-weighted, and intra-U flows in a closed-form linear-system formulation, with known limitations for highly transparent foregrounds.

  • Trimaps divide pixels into known foreground F, known background B, and unknown-opacity U regions, with information propagated from K = F ∪ B into U.
  • Color-mixture information flow: Color-mixture flow represents each unknown pixel as a mixture of similarly colored pixels, using combination weights to encode opacity relationships.The weights are computed from nearby, similar-colored neighbors selected across the image using RGB values and normalized coordinates.
  • K-to-U information flow: Direct K-to-U connections link every unknown pixel to similar pixels in both F and B, enabling information flow to remote transition regions and improving performance around holes.The method separately searches for foreground and background neighbors, then uses their weights to define K-to-U energy terms.
  • K-to-U information flow: Confidence values further improve matting quality where foreground and background colors are similar, while K-to-U flow is unreliable for highly transparent foregrounds.The limitation is attributed to insufficiently representative foreground neighbors in large highly transparent regions.
  • Intra-U information flow: Intra-U information sharing improves matte quality around intricate structures, complementing direct propagation from known-opacity regions.Using only local color-based flow can produce flat regions or underrepresented transitions, so the method combines multiple flow types.
  • Linear system and energy minimization: The combined formulation uses sparse affinity matrices and an energy term that keeps known opacity values constant, yielding a linear system solvable in closed form.The method’s color-mixture formulation is based on local linear embedding but does not fully adopt the original LLE method.

4. Matte regularization for sampling-based matting methods

The multiple-flow formulation is also used to regularize mattes produced by sampling-based methods. This non-local regularization preserves challenging remote details and holes while retaining the initial alpha estimates through a confidence-weighted energy.

  • Sampling-based methods often combine independently estimated alpha values with a smoothness measure to obtain spatially coherent mattes.
  • The proposed multiple-flow approach regularizes initial alpha values and their confidences in a manner similar to prior matte post-processing.
  • The regularization energy controls loyalty to the initial values with σR = 0.05 and is solved as a linear system.
  • Layer color estimation: Layer color estimation improves as additional information-flow types are added, using color-mixture and intra-U flows together with spatial smoothness measures.The color estimation evaluation uses the ground-truth matte and reports per-pixel absolute differences against ground truth.
  • The proposed non-local regularization is especially effective around long leaves and holes, preserving details that the sampling-based method captures.Compared with the referenced regularization method, the proposed method avoids losing remote details or filling holes.

5. Foreground color estimation

The layer color formulation estimates foreground and background colors from an image and alpha matte using multiple information flows plus compositing consistency. It combines local, non-local, and intra-unknown propagation, solving the resulting system independently per color channel.

  • Problem and formulation: Layer color estimation remains underconstrained even with a given matte, so the formulation estimates foreground and background colors jointly.The input consists of the original image and an alpha matte; foreground and background colors are undefined in fully opposite-opacity regions.
  • Local information flows: Transition flow propagates color information near alpha gradients, while no-transition flow adds spatial smoothness in flat-alpha regions and near sharp color edges.No-transition flow targets regions with small color and alpha gradients, addressing transition flow's lack of propagation there.
  • Non-local information flows: Color-mixture flow uses alpha, color, and spatial features to compute separate foreground and background neighborhoods and weights.Separate flows avoid propagating foreground colors from fully transparent regions or background colors from fully opaque regions.
  • Intra-unknown flow: Intra-unknown flow distributes information between similar-colored pixels inside the unknown region, making estimated foreground colors more coherent across the image.The formulation adapts this flow to use the available alpha values.
  • Design boundary: The color-estimation formulation excludes K-to-U flow because its adaptation did not improve final color quality.
  • Linear system and energy minimization: The final energy combines four information-flow types with a compositing constraint and is minimized independently for red, green, and blue channels.It is rewritten as a 2N × 2N linear system and solved for foreground and background colors using preconditioned conjugate gradients.

6. Results and discussion

The method is evaluated for matting, regularization, layer color estimation, and green-screen keying against state-of-the-art methods. It ranks first on the submitted alpha-matting benchmark, handles challenging structures, and performs competitively in green-screen keying.

  • Matte estimation: The method ranks first on the public alpha matting benchmark according to SAD and MSE.A proof-of-concept Matlab implementation processes a benchmark image in 50 seconds on average.
  • Matte estimation: On the DIM test set, the method outperforms competing methods except DIM, reaching 76.5 (SAD) and 0.021 (MSE) after assumption-violating images are removed.Affinity-based and sampling-based methods assume both known-opacity regions are present when modeling affinity color models.
  • Matte estimation: Qualitative comparisons show that the proposed information-flow strategy handles wide unknown regions, holes, remote details, and similar foreground-background colors.The comparison attributes performance in challenging scenarios mostly to intra-unknown and unknown-to-known flows.
  • Matte regularization: The proposed matte regularization distributes sampling-derived alpha values and confidences more effectively while preserving fine structures and holes.It is compared with Gastal and Oliveira's method across three sampling-based algorithms using SAD and MSE.
  • Layer color estimation: Layer color comparisons show that closed-form colors create artifacts around holes and KNN colors produce flat-colored regions with errors around hair and fur.These behaviors are reported on the DIM test set using ground-truth alphas as input.
  • Green-screen keying: In green-screen keying, the method successfully extracts foreground mattes and colors in challenging cases, with minimal sensitivity to narrow versus wide trimaps.It avoids the green halo and reddish hair hue seen in competing matting methods and is described as robust against color spill.
  • Green-screen keying: At 1080p, matte estimation takes around 20 seconds on average, with runtime depending mainly on the number of unknown pixels rather than image resolution.The authors connect this behavior to narrower unknown-opacity regions in professional production settings.

7. Spectral analysis

The spectral analysis shows that each information-flow affinity produces distinct clustering behavior, while their combination captures color similarity, spatial structure, and intricate transitions more effectively.

  • Spectral matting uses eigenvectors and a sparsity prior to form soft alpha components representing compact eigenvector clusters.
  • Intra-U flow creates color-based components with near-binary or flat alpha values because it emphasizes color similarity over spatial distance.
  • Local flow produces locally connected components with soft transitions, complementing the harder color-based segmentation of intra-U flow.
  • Color-mixture affinities capture color similarity and soft transitions but can bleed into unrelated pixels because their graphs are densely connected.
  • Combining color-mixture and local flows improves clustering, while adding all three flows captures intricate transitions missed without local flow.
  • The full Laplacian blends nonlocal color information with spatial smoothness, and K-to-U flow addresses remote regions and holes.

8. Sampling-based methods and K-to-U flow

The paper compares K-to-U flow with sampling-based matting and finds strong performance across most tested cases, while identifying transparent mattes and sample selection as important boundaries.

  • K-to-U flow selects neighbors individually for each unknown pixel using k-nearest-neighbor search, unlike sampling methods that select from predetermined known-region samples.
  • The experiment post-processes K-to-U weights and confidence values with the regularization used by top-performing sampling-based methods.
  • K-to-U flow fails for highly transparent mattes because k-nearest-neighbor search cannot find representative neighbors.
  • The comparison suggests that selecting many samples per unknown pixel and using more robust weight estimation could improve sampling-based matting.

9. Limitations

The method has two stated limitations: weak performance on highly transparent regions and reduced performance with sparse trimaps, especially when known regions are limited.

  • K-to-U flow performs poorly on highly transparent mattes, and a simple classifier does not resolve images containing only partially transparent regions.
  • The algorithm assumes dense trimaps; sparse scribble inputs can reduce performance because K-to-U flow lacks good neighbors in limited known regions.
  • Figure 13 reports that the method fails gracefully when trimaps are sparse.
  • Intra-U flow can propagate alpha information by color to spatially distant pixels inside the unknown region, contributing to sparse-trimap performance loss.

10. Conclusion

The conclusion presents a purely affinity-based matting framework whose multiple information flows support natural matting, layer color estimation, matte regularization, and green-screen keying.

  • The proposed linear system outperforms the state-of-the-art on the alpha matting benchmark.
  • The method introduces color-mixture flow and carefully controls information from known regions to unknown regions and within unknown regions.
  • The formulation extends to matte regularization and layer color estimation, with reported improvements over the state-of-the-art.
  • The proposed matting and color estimation methods achieve state-of-the-art performance in green-screen keying.
  • Spectral analysis characterizes the contributions of individual information-flow forms and supports comparisons with sampling-based methods.
Loading 1707.05055v2…