Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent interpolate? #185

Open
ulatekh opened this issue May 13, 2020 · 1 comment
Open

Transparent interpolate? #185

ulatekh opened this issue May 13, 2020 · 1 comment

Comments

@ulatekh
Copy link
Contributor

ulatekh commented May 13, 2020

I have images with transparent backgrounds on which I'm trying to do motion interpolation. I looked at the code, and thought I made all the necessary changes, but apparently I'm missing something.

My work can be found at https://github.com/ulatekh/slowmoVideo/tree/transparent_interpolate . (The change to src/lib/ffmpeg_writer.cpp is just a hack; once the feature is working, I'll make all the little changes necessary to allow the user to set the pixel format.)

Transparency is partially getting through the system; if a frame doesn't need to be interpolated, it ends up in the output file properly transparent. It's just that any frame subject to interpolation gets its transparency wiped out.

Do you know what I'm missing here?

@ulatekh
Copy link
Contributor Author

ulatekh commented May 22, 2020

So far, I've determined that OpenCV optical flow apparently doesn't support transparent pixels, e.g. Farneback takes greyscale images as input. Also, I'm having pretty good results using the Deformations->Morph[interactive] filter in GIMP's G'MIC plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant