ImageInpainting.jl icon indicating copy to clipboard operation
ImageInpainting.jl copied to clipboard

Consider rewriting pieces of the Crimisini algorithm for greater performance

Open juliohm opened this issue 4 years ago • 6 comments

Some parts of the algorithm could possibly be rewritten to improve performance. Specifically, I think that these two lines where we are finding the frontier of the mask could be replaced by a simple graph representation as opposed to performing dilation + subtraction:

https://github.com/JuliaImages/ImageInpainting.jl/blob/d776c4b237426c13cfb388085b16d6e86797f5be/src/criminisi.jl#L56

https://github.com/JuliaImages/ImageInpainting.jl/blob/d776c4b237426c13cfb388085b16d6e86797f5be/src/criminisi.jl#L94

The dilation + subtraction are great to make the code very clean, but I guess too expensive compared to just doing a graph search on the pixels. We would have to benchmark. Just saving this idea here as an issue in case someone wants to give a try.

juliohm avatar Jul 02 '20 16:07 juliohm