Did you know there are complicated Algorithms and Methods involved in Photo Restoration?
Although the algorithms are never seen, from the proposed equations you can tell how complex it was to get where we are today in terms of photo restoration.
Alexei A. Efros and Thomas K. Leung (Computer Science Division – University of California, Berkeley) developed a method and algorithm that, although initially intended for texture synthesis, has proven most effective for photo restoration problems.
The algorithm allows the image gap to be filled-in recursively, inwards from the gap boundary.
Output(P) = V alue(Q), P ∈ Ω, Q /∈ Ω, Q = arg min d(Ψ(P), Ψ(Q))
where d(Ψ(P), Ψ(Q)) is the Sum of Squared Differences (SSD) among the patches Ψ(P) and Ψ(Q) (considering only available pixels):
d(Ψ1, Ψ2) = X i X j |Ψ1(i, j) − Ψ2(i, j)| 2
Once a pixel is filled-in, the algorithm marchs on to the next pixel at the boundary of the gap, never going back to the completed Pixel (whose value is, therefore, not altered again). The results are really impressive for a wide range of images. The main shortcomings of this algorithm are its computational cost, the selection of the neighborhood size