Replies: 1 comment 1 reply
-
Hello @4lch, I'm glad it's useful! There's https://www.libvips.org/API/current/libvips-morphology.html#vips-fill-nearest It replaces all zero pixels with the nearest non-zero pixel. It's pretty slow though, and needs loads of memory. I think it probably fails for some shapes too, though it works OK for the simple cases I needed. You're right, a large-radius rank filter could work too. A PR with something better would be very welcome, if you have time. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all !
I am using Libvips which is proving to be fantastic for fast image processing in an image editor I am working on, and a feature that I have been looking for is some sort of image inpainting to fill zones based on local content according to a mask. For now, I use OpenCV but it is a little cumbersome to exchange back and forth with Vips, and OpenCV's inpainting options are pretty painfully slow as there is no optimization for parallel processing of inpainted areas. In my use-case, "classic" algorithms like fluid-dynamics-based ones are more than adequate as the defects to correct are small and thin, so it does not warrant heavier solutions like patch-match. With that said, I guess that a simple median filter might also work, which should be feasible with existing Vips tools, but I feel like this could still be a fantastic feature to support natively !
Thanks for the fantastic work and have a nice day,
Adrien
Beta Was this translation helpful? Give feedback.
All reactions