Skip to main content
. 2024 Jan 31;10:e1713. doi: 10.7717/peerj-cs.1713

Algorithm 3. Removing distortion from image.

input: x,U,V,τ
extractsubregionofimagexusingslidingwindowsbasedontheentropyofeach
pixelasfj,j=1,,d
foreachfj:
iffjsatisfyentropycarcumestion
  calculate Δτj using Algorithm 2
 else
  set Δτj as outlier
 end if
end for
using variance and average of all Δτj to detect outlier ones
for each fj:
 if Δτj is outlier
  calculate Δτj using Δτ matrix of neighboring windows
 end if
end for
τj=τj+Δτj
estimate MOG using τj and assign mean of MOG models to each windows
for each pixel index j in x
 L = set of all jth pixel exist in all transformed windows
 jth pixel of xτ = median(L)
end for
return xτ