Photometric Ambient Occlusion

by Daniel Hauagge, Scott Wehrwein, Kavita Bala, and Noah Snavely

These notes include the mathematical derivations presented in our CVPR 2013 paper. The derivation bellow follows closely the notation on the paper.

Ia[la_,ρ_,α_]=Integrate[Integrate[ρ la Cos[θ]Sin[θ],{θ,0,α}],{ψ,0,2π}];
Id[t_,ld_,ρ_]=ρ ld Cos[t];
Ic[t_,ld_,la_,α_,ρ_]=Id [t,ld,ρ]+Ia[la,ρ,α];

Functions to compute E[I] and E[(I^2)]

SphExp[f_,t_]:=FullSimplify[(1/(2π))Integrate[Integrate[f[t]Sin[t] ,{ψ,0,2π}],{t,0,α}]];

E[(Subscript[(I^2), c])]=E[((((Subscript[I, a])+(Subscript[I, d])))^2)]=E[(Subscript[(I^2), d])]+2(Subscript[I, a])E[(Subscript[I, d])]+(Subscript[(I^2), a]) and E[(Subscript[I, c])]=E[(Subscript[I, d])]+(Subscript[I, a])

EId2=SphExp[((Id[#,ld,ρ])^2)&,t]//FullSimplify (* E[(Isun^2)] *)

EId=SphExp[Id[#,ld,ρ]&,t]//FullSimplify (* E[Isun] *)

κ

κ[ld_,la_,α_]=((FullSimplify[(((EId+Ia[la,ρ,α]))^2)])/(EId2+2EId Ia[la,ρ,α]+((Ia[la,ρ,α])^2)))//FullSimplify

κ[f_,α_]=FullSimplify[κ[lsun,f lsun,α]]

Expected Image Intensity

EIm[ld_,la_,α_,ρ_]=FullSimplify[EId+Ia[la,ρ,α]]