Skip to main content
. 2019 Apr 3;10(5):2227–2243. doi: 10.1364/BOE.10.002227

Algorithm 2.

Modified Guided Filter(xI, xG, w, , α, β), go(.) represents performing operation ‘o’ on the arguments

Input: xIInput Image to be filtered (xLTO or xTV)
xGIGuidance Image (xLBP)
wRadius of the Window (patch size)
, α, βRegularization Parameters
Output xFOutput Image
meanxGI = gmean(xGI); meanxI = gmean(xI)
corrxGI = gmean(xGI. * xGI); corrxGII = gmean(xGI. * xI)
varxGI = corrxGImeanxGI. * meanxGI; covxGII = corrxGIImeanxGI. * meanxI
a = (covxGII./(varxGI + ))α; b = meanxIβ * a. * meanxGI
meanb = gmean(b); meana = gmean(a)
xF = meana. * xGI + meanb