# What's the Underlying Algorithm for Detail Preserving Upsampling in Photoshop CC?

The detail-preserving upsampling algorithm in Photoshop CC is truly amazing. It can upscale any image while preserving details in almost real-time. And I truly wonder how it is implemented.

I've started by searching papers with keywords single image super resolution. And seems the current state-of-art algorithms require an trained external database to guess the missing high frequency information. And I believe it is really hard to train & distribute a complete dictionary, right? Also, I don't think it's possible to train a dictionary with image pyramid in real-time.

After that I've turned to the area of image upsampling, which seems fast enough comparing with super resolution algorithms, but there are so many algorithms, I'm totally lost.

So, does anyone have any guesses or hints on how can that tool is implemented? Thanks!

• I think this question is about Preserve Details (1.0) which I have read was shipped with the first version of Photoshop CC. Preserve Details 2.0 shipped with Photoshop CC 2018 has a scripting identifier "deepUpscale", and they advertise it as AI, so it seems deep learning based. – Olli Niemitalo Mar 18 '19 at 22:14
• For a more current algorithm there is Enhanced Super-Resolution Generative Adversarial Networks (ESRGAN). – Olli Niemitalo Mar 19 '19 at 6:55

It's really nothing beyond Bi Cubic Interpolation with "Sharpening".

http://www.lynda.com/Photoshop-tutorials/interpolation-settings/124096/140573-4.html

They haven't updated their interpolation algorithms for ages.

• The image is sharp at higher resolution so it is certainly not achieved by modified cubic spline. – Libor Jul 26 '14 at 20:49
• Look for the Adobe CC Interpolation. You'll see they did nothing new in CC besides choosing automatically between Bi Cubic Smoother and Bi Cubic Sharper. Which both are just post processing of Bi Cubic. – Royi Jul 26 '14 at 21:49
• The question's linked video shows the Resample option: Preserve Details. I don't think it's bicubic. Photoshop CC 2018 has also Preserve Details 2.0. – Olli Niemitalo Mar 18 '19 at 20:19
• @OlliNiemitalo, Have you looked at the video I linked? Detail Preservation 2.0 is something else. The question was written with old Photoshop versions in mind and in the video I linked you can see the operation is Bi Cubic + Some Sharpening (Probably with Edge Awareness). – Royi Mar 18 '19 at 21:46
• @Royi I watched your linked video. It has less options for Resampling (does not include Preserve Details) than the question's linked video, so I think what you say in the answer is outdated for the question's Photoshop version. – Olli Niemitalo Mar 18 '19 at 21:50

There are many algorithms for "edge-aware" upsampling. Not sure what Photoshop itself uses, but for example Alien Skin Blow Up plugin gives similar results and they use vectorization using triangulation. The triangles are carefully smoothed while keeping the upsampled image sharp enough.

You can also take a look on NEDI (New Edge-Directed Interpolation), or "Upsampling via Imposed Edges Statistics" from Raanan Fattal.

Yet another approach is to convert image to vector field (vectors go along edges), enlarge this field and then recompute spatial domain using some PDE solver (fast Poisson solvers are a popular option).

Genuine Fractals from OnOne Software shows yet another approach, using fractal geometry, particulary IFS (iterated function systems), exploiting self-similarity and allowing to recreate natural-looking texture data, not only edges. The fractal-approximated image is by definition resolution independent. I once wrote similar software, but computing fractal representation is costly, the rendering is very fast on the other hand.

• Thanks for your answer! That's quite a list, and I'll start researching it! – Void Main Jul 28 '14 at 9:11