Skip to content

About

Implementation of the NEDI (New Edge-Directed Interpolation) by Xin Li & Michael Orchard

Resources

Stars

14 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

UnityURP-NewEdgeDirectedInterpolation

Implementation of the NEDI (New Edge-Directed Interpolation) from Xin Li & Michael Orchard Paper
Special thanks for Parashar Krishnamachari for his Post which helped me a lot to understand the algorithm.

I tried to optimize the computation as much as possible to experiment with the possibility of implementing NEDI in realtime.
The project contrains multiple examples of the implementation, you can use your own images just make sure, after importing them, to disable the compression Unity applies by default.

Comparaison Bilinear vs NEDI (x4 upscale in each axis)

Image Sequence_007_0005 Image Sequence_003_0005 Image Sequence_004_0005 Image Sequence_005_0005 Image Sequence_006_0005 Image Sequence_008_0005 Image Sequence_010_0005 Image Sequence_009_0005 Image Sequence_001_0049 Image Sequence_001_0049

Notes

You can further optimize this by applying the effect only for the edges of the image (which you can detect using multiple cheap ways) while flat surfaces can use a simple bilinear interpolation.

My main goal was to see the performance cost in realtime, it all depends on your window size.
A 480x270 frame upscaled 2 times (to became 1920x1080) with a windows size of 8 takes around 1.5ms in my RTX3060
with a windows size of 4 it takes less than 0.3ms but it introduces more noise because of the ill-conditioning of matrices.
The "Regulate" value we use to remove noise just adds a small epsilon to the diagonal of the R matrix to prevent a 0 determinant but that introduces some blur and the values gets worse with each iteration

There is an improved version of the algo iNEDI made by Nicola Asuni which produces much better results and fixes a lot of problems in the original NEDI.

References

About

Implementation of the NEDI (New Edge-Directed Interpolation) by Xin Li & Michael Orchard

Resources

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages