Shadow Removal

黄伟俊    13307130251

Result

Detection

Goal:

    Ms:which specifies an area that is entirely inside the shadow, with all of its pixels belonging to a single surface (a region with roughly uniform color and texture).

    Ml:which specifies an area entirely outside the shadow, with all of its pixels belonging to the same surface as the previous mask.

Floodfill

Before  GaussianBlur

After  GaussianBlur

M_s
MsM_s
M_l = {surface} - M_s
Ml=surfaceMsM_l = {surface} - M_s

surface

Illumination Recovery

I(x,\lambda)=L(x,\lambda)R(x,\lambda)\quad (1)
I(x,λ)=L(x,λ)R(x,λ)(1)I(x,\lambda)=L(x,\lambda)R(x,\lambda)\quad (1)
L(x,\lambda)=L^d(x,\lambda)+L^a(x,\lambda)\quad (2)
L(x,λ)=Ld(x,λ)+La(x,λ)(2)L(x,\lambda)=L^d(x,\lambda)+L^a(x,\lambda)\quad (2)
I^{lit}(x,\lambda)=L^d(x,\lambda)R(x,\lambda)+L^a(x,\lambda)R(x,\lambda)\quad (3)
Ilit(x,λ)=Ld(x,λ)R(x,λ)+La(x,λ)R(x,λ)(3)I^{lit}(x,\lambda)=L^d(x,\lambda)R(x,\lambda)+L^a(x,\lambda)R(x,\lambda)\quad (3)
I^{lit}(x,\lambda)=L^d(x,\lambda)R(x,\lambda)+\frac{1}{a(x)}I^{shadow}(x,\lambda)\quad (5)
Ilit(x,λ)=Ld(x,λ)R(x,λ)+1a(x)Ishadow(x,λ)(5)I^{lit}(x,\lambda)=L^d(x,\lambda)R(x,\lambda)+\frac{1}{a(x)}I^{shadow}(x,\lambda)\quad (5)

Use method in "The Shadow Meets the Mask: Pyramid-Based Shadow Removal"

I^{shadow}(x,\lambda)=a(x)L^a(x,\lambda)R(x,\lambda) \quad (4)
Ishadow(x,λ)=a(x)La(x,λ)R(x,λ)(4)I^{shadow}(x,\lambda)=a(x)L^a(x,\lambda)R(x,\lambda) \quad (4)

Illumination Recovery

I^{lit}_{k}(p)=\alpha_k(p)+\gamma(p)I_k^{shadow}(p) \alpha_{k},k\in \{R,G,B\}
Iklit(p)=αk(p)+γ(p)Ikshadow(p)αk,k{R,G,B}I^{lit}_{k}(p)=\alpha_k(p)+\gamma(p)I_k^{shadow}(p) \alpha_{k},k\in \{R,G,B\}
\alpha_k=\mu_k(L)-\gamma\mu_k(S),k\in \{R,G,B\}
αk=μk(L)γμk(S),k{R,G,B}\alpha_k=\mu_k(L)-\gamma\mu_k(S),k\in \{R,G,B\}
\gamma=\frac{\sigma(L)}{\sigma(S)}
γ=σ(L)σ(S)\gamma=\frac{\sigma(L)}{\sigma(S)}

More results

references

Text

  1. Shor Y, Lischinski D. The Shadow Meets the Mask: Pyramid‐Based Shadow Removal[C]//Computer Graphics Forum. Blackwell Publishing Ltd, 2008, 27(2): 577-586.

  2. https://en.wikipedia.org/wiki/Flood_fill

  3. https://en.wikipedia.org/wiki/Gaussian_blur

Made with Slides.com