nexmo-se / video-api-effects

MIT License
4 stars 8 forks source link

Blur algorithm #22

Open olafura opened 2 years ago

olafura commented 2 years ago

The current algorithm used has really bad artifacts, like the dark fringes around edges.

Here are some references in Gimp where they solve these things: https://docs.gimp.org/2.10/en/gimp-tool-warp.html#abyss-policy https://docs.gimp.org/2.10/en/gimp-filter-gaussian-blur.html#:~:text=Abyss%20policy.-,Clip%20to%20the%20input%20extent,-Should%20the%20output

The bodypix libary that you are using has a better blur algorithm: https://blog.francium.tech/edit-live-video-background-with-webrtc-and-tensorflow-js-c67f92307ac5 https://github.com/tensorflow/tfjs-models/blob/master/body-pix/src/blur.ts

olafura commented 2 years ago

enricop89 This is also a problem in Opentok JS