IP Library Granted Patent US 8,477,149
Granted Patent B2
US 8,477,149 · App. 12/752,238 · Granted Jul 2, 2013

Real-time chromakey matting using image statistics

Inventors: Nicholas Beato (Orlando, FL); Charles E. Hughes (Maitland, FL); Mark Colbert (San Mateo, CA); Yunjun Zhang (Orlando, FL); Kazumasa Yamazawa (Nara, JP)
Assignee: University of Central Florida Research Foundation, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,477,149
App. No.
12/752,238
Granted
Jul 2, 2013
Kind
B2
Abstract

A method, system and computer readable media for real-time chromakey matting using image statistics. To identify the chroma key spectrum, the system/method executes in three stages. In an off-line training stage, the system performs semi-automatic calibration of the chroma key parameterization. In the real-time classification stage, the system estimates the alpha matte on a GPU. Finally, an optional error minimization stage improves the estimated matte, accounting for misclassifications and signal noise. Given the resulting matte, standard alpha blending composites the virtual scene with the video feed to create the illusion that both worlds coexist.

Claims (121)

1. A method for generating an alpha matte based on chromakey information in real-time, comprising:

(a) off-line training comprising calibration of chroma key parameterization by sampling chroma color and statistically analyzing invariant properties of chroma key pixels using principal component analysis (PCA) to transform the chroma color into a transformed color space;

(b) real-time classification via a processor comprising estimating an alpha matte using a classifier to classify pixels, p, in a video frame using geometric objects whose boundaries define opacity used for alpha matting;

(c) outputting a resulting alpha matte to allow for alpha blending to composite a virtual scene with a video feed.

2. The method of claim 1 further comprising the step of error minimization for improving the alpha matte comprising accounting for misclassifications and signal noise prior to outputting the resulting alpha matte.

3. The method of claim 1 wherein the off-line training comprises:

(a) randomly sampling chroma color from several viewing angles and positions of an of image I using a target camera to produce N number of triplet data points representing a data set of chroma key pixels;

(b) running principle components analysis (PCA) using the N number of triplet data points as input to find an orthonormal vector basis by calculating eigenvectors e 1 e 2 e 3 having nine values and three three-dimensional (3D) vectors, eigenvalues λ 1 , λ 2 , λ 3 having three values, and means having three values of the data set;

(c) constructing a whitening function from a mean vector (μ), column-major matrix of eigenvectors (E=[e 1 e 2 e 3 ]), and diagonal matrix of eigenvalues (Λ=diag (λ 1 , λ 2 , λ 3 )) comprising

M ( I x )=Λ −1/2 E T ( I x −μ); and

(d) outputting a triplet of a value for the chroma color, wherein the color triplet's Euclidean distance is directly related to a probability that the color exists in the chroma key; and

wherein:

M(I x ) is the whitening function applied to an input pixel I x of image I to produce a transformed pixel, I′ x ;

E is the column-major matrix of eigenvectors e 1 e 2 e 3 ;

Λ is the diagonal matrix of eigenvalues λ 1 , λ 2 , λ 3 .

4. The method of claim 3 wherein the real-time classification comprises:

(a) for all pixels, p, in the video frame:

(i) calculate z=M(p), wherein z is a triplet representing standard deviations in three independent dimensions of pixel p in chroma color distribution;

(ii) receive a selection of a classifier function, C, and compute α=C(z), where α is the alpha channel of the pixel p;

(b) outputting the alpha matte;

wherein:

M(p) is the whitening function applied to pixel p.

5. The method of claim 4 wherein the classifier comprises a geometric object selected from a sphere or a cube.

6. The method of claim 4 wherein the classifier comprises a geometric object represented by a sphere wherein data distribution is a 3D Gaussian, comprising:

(a) calculating a 3D distance to a mean in the transformed color space wherein d=magnitude(z);

(b) using the data distribution to find a lower and upper bound on single dimension z-score wherein d is used with the upper and lower bounds; and

(c) calculating the alpha by linearly interpolating d between the lower and upper bound.

7. The method of claim 6 wherein for a given transformed pixel, I′ x , using Euclidean distance from an origin with linear interpolation between an inner and outer radii, r in and r out calculating opacity, α x , as:

α

x

=

I

x

-

r

in

r

out

-

r

in

.

8. The method of claim 4 wherein the classifier comprises a geometric object represented by a cube having each dimension of the data distribution follows a Gaussian distribution, comprising:

(a) calculating each 1D distance to a mean in a transformed color space for each dimension (d i =abs(z i ));

(b) assuming the worst z score (d i ) encloses the data distribution best, reducing dimensionality by taking a maximum distance d max across the first two or all three dimensions;

(c) using the data distribution, finding a lower and upper bound on single dimension z-score; and

(d) calculating the alpha by linearly interpolating d max between the lower and upper bound.

9. The method of claim 8 wherein, for a given transformed pixel, I′ x , given an inner and outer axis-aligned bounding cube of sizes d in and d out , use a projected Euclidean distance from each plane to calculate an opacity, α x , as:

α

x

=

max

(

I

x

)

-

d

in

d

out

-

d

in

where

max(I′ x ) is a maximum of absolute values of transformed pixel I′ x ;

d in is the distance from the origin to the inner plane;

d out is the distance from the origin to the outer plane.

10. The method of claim 1 wherein the processor is a graphics processing unit (GPU) operating at high frame rates.

11. The method of claim 10 further comprising:

given four images of foreground, background, video, and matte, compositing the images using a three layer blending function.

12. A system for generating an alpha matte based on chroma key information in real-time, said system comprising: a display device; a memory; and a processor with hardware and software components for:

(a) off-line training comprising calibration of chroma key parameterization by sampling chroma color and statistically analyzing invariant properties of chroma key pixels using principal component analysis (PCA) to transform the chroma color into a transformed color space;

(b) real-time classification via a processor comprising estimating an alpha matte using a classifier to classify pixels, p, in a video frame using geometric objects whose boundaries define opacity used for alpha matting;

(c) outputting a resulting alpha matte to allow for alpha blending to composite a virtual scene with a video feed.

13. The system of claim 12 further comprising a software component for error minimization for improving the alpha matte comprising accounting for misclassifications and signal noise prior to outputting the resulting alpha matte.

14. The system of claim 12 wherein the off-line training comprises:

(a) randomly sampling chroma color from several viewing angles and positions of an of image I using a target camera to produce N number of triplet data points representing a chroma key pixel in a data set;

(b) running principle components analysis (PCA) using the N number of triplet data points as input to find an orthonormal vector basis by calculating eigenvectors e 1 e 2 e 3 having nine values and three three-dimensional (3D) vectors, eigenvalues λ 1 , λ 2 , λ 3 having three values, and means having three values of the data set;

(c) constructing a whitening function from a mean vector (μ), column-major matrix of eigenvectors (E=[e 1 e 2 e 3 ]), and diagonal matrix of eigenvalues (Λ=diag (λ 1 , λ 2 , λ 3 )) comprising

M ( I x )=Λ −1/2 E T ( I x −μ); and

(d) outputting a triplet of a non-negative value for the chroma color, wherein the color triplet's Euclidean distance is directly related to a probability that the color exists in the chroma key; and

wherein:

M(I x ) is the whitening function applied to an input pixel I x of image I to produce a transformed pixel, I′ x ;

E is the column-major matrix of eigenvectors e 1 e 2 e 3 ;

Λ is the diagonal matrix of eigenvalues λ 1 , λ 2 , λ 3 .

15. The system of claim 14 wherein the real-time classification comprises:

(a) for all pixels, p, in the video frame:

(i) calculate z=M(p), wherein z is a triplet representing standard deviations in three independent dimensions of pixel p in chroma color distribution;

(ii) receive a selection of a classifier function, C, and compute α=C(z), where α is the alpha channel of the pixel p;

(b) outputting the alpha matte

wherein:

M(p) is the whitening function applied to pixel p.

16. An article of manufacture comprising: a computer usable medium having computer readable code means embodied therein for:

(a) off-line training comprising calibration of chroma key parameterization by sampling chroma color and statistically analyzing invariant properties of chroma key pixels using principal component analysis (PCA) to transform the chroma color into a transformed color space;

(b) real-time classification via a processor comprising estimating an alpha matte using a classifier to classify pixels, p, in a video frame using geometric objects whose boundaries define opacity used for alpha matting;

(c) outputting a resulting alpha matte to allow for alpha blending to composite a virtual scene with a video feed.

17. The article of manufacture of claim 16 further comprising computer readable code means for error minimization for improving the alpha matte comprising accounting for misclassifications and signal noise prior to outputting the resulting alpha matte.

18. The article of manufacture of claim 16 wherein the computer readable code means for off-line training comprises:

(a) randomly sampling chroma color from several viewing angles and positions of an of image I using a target camera to produce N number of triplet data points representing a pixel in a data set;

(b) running principle components analysis (PCA) using the N number of triplet data points as input to find an orthonormal vector basis by calculating eigenvectors e 1 e 2 e 3 having nine values and three three-dimensional (3D) vectors, eigenvalues λ 1 , λ 2 , λ 3 having three values, and means having three values of the data set;

(c) constructing a whitening function from a mean vector (μ), column-major matrix of eigenvectors (E=[e 1 e 2 e 3 ]), and diagonal matrix of eigenvalues (Λ=diag (λ 1 , λ 2 , λ 3 )) comprising

M ( I x )=Λ −1/2 E T ( I x −μ); and

(d) outputting a triplet of a value, wherein the color triplet's Euclidean distance is directly related to a probability that the color exists in the chroma key; and

wherein:

M(I x ) is the whitening function applied to an input pixel I x of image I to produce a transformed pixel, I′ x ;

E is the column-major matrix of eigenvectors e 1 e 2 e 3 ;

Λ is the diagonal matrix of eigenvalues λ 1 , λ 2 , λ 3 .

19. The article of manufacture of claim 18 wherein the computer readable code means for real-time classification comprises:

(a) for all pixels, p, in the video frame:

(i) calculate z=M(p), wherein z is a triplet representing standard deviations in three independent dimensions of pixel p in chroma color distribution;

(ii) receive a selection of a classifier function, C, and compute α=C(z), where α is the alpha channel of the pixel p;

(b) outputting the alpha matte

wherein:

M(p) is the whitening function applied to pixel p.

20. A computer system for an alpha matte based on the chromakey information in real-time configured to cause one or more computer processors to perform the steps recited in claim 1 .

Assignments (3)
CONFIRMATORY LICENSE Recorded May 8, 2015
From: UNIVERSITY OF CENTRAL FLORIDA
To: NATIONAL SCIENCE FOUNDATION
Reel/Frame 035635/0254 →
CONFIRMATORY LICENSE Recorded Aug 8, 2013
From: UNIVERSITY OF CENTRAL FLORIDA
To: NATIONAL SCIENCE FOUNDATION
Reel/Frame 030986/0886 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 15, 2010
From: BEATO, NICHOLAS; HUGHES, CHARLES E.; COLBERT, MARK; ZHANG, YUNJUN; YAMAZAWA, KAZUMASA
To: UNIVERSITY OF CENTRAL FLORIDA RESEARCH FOUNDATION, INC.
Reel/Frame 024688/0358 →
Continuity (3)
Provisional Application 61165740 · Apr 1, 2009
Provisional Application 61318336 · Mar 28, 2010
Related Publication 20100277471A1 · Nov 4, 2010