1. A method for matting, with a processing unit, a foreground object F having an opacity α in an image having a background B, the respective opacity of selected pixels in the foreground object F and the background B being constrained by associating a characteristic with said pixels, the method comprising: (a) dividing, with the processing unit, the image into small windows, w; (b) determining, with the processing unit, weights for all edges of neighboring pixels for the image in said windows; (c) assuming, with the processing unit, within each window w, that α is a linear combination of color channels, c, α i ≈ ∑ c ⁢ a c ⁢ I i c + b , ∀ i ∈ w , (d) using, with the processing unit, a cost function J ⁡ ( α , a , b ) = ∑ j ∈ I ⁢ ( ∑ i ∈ w j ⁢ ( α i - ∑ c ⁢ a c j ⁢ I i c - b j ) 2 + ɛ ⁢ ∑ c ⁢ a j c 2 ) eliminate a, b to obtain a cost function involving only α of the form J(α)=α T Lα where L(i,j) is of the form: ∑ k ❘ ( i , j ) ∈ w k ⁢ ( δ ij - 1  w k  ⁢ ( 1 + ( I i - μ k ) ⁢ ( ∑ k ⁢ + ɛ  w k  ⁢ I 3 ) - 1 ⁢ ( I j - μ k ) ) ) where δ ij is the Kronecker delta, μ k and σ k 2 are the mean and covariance of the intensities in the window w k around k and |w k | is the number of pixels in this window; (e) solve, with the processing unit, for α where α=arg min α T Lα s.t.α i =s i , ∀iεS, S is the group of selected pixels, and s i is the value indicated by said characteristic; (f) solve, with the processing unit, for F and B in the equation I i =α i F i +(1−α i )B i with additional smoothness assumptions on F and B; (g) compositing, with the processing unit the foreground object F on a selected background B′ so as to generate an image; and (h) storing data representative of the image in memory for subsequent display.