GPUImage2 icon indicating copy to clipboard operation
GPUImage2 copied to clipboard

ChromaKey with white color

Open MoxTalinder opened this issue 6 years ago • 2 comments

I'm trying to remove white background from a local video file, but it seems that the ChromaKey filter does not work with white color. Is there any solution? Thanks!

MoxTalinder avatar Dec 31 '17 12:12 MoxTalinder

I actually have tried this before. You can get it to work somewhat, but the issue is since there is a little bit of white in everything besides pure colors it keys out many things. I did it with the chromakey blend and put the settings as
chromakeyBlend.thresholdSensitivity = 0.04 chromakeyBlend.smoothing = 0.001 The reason the values are low is because you are trying to get only pure white or nearly pure white and since white is a bit of every color it usually isn't perfect, although likely the best settings without changing the framework itself. A possible solution if you change the framework is to calculate the exact colors needed to be keyed and making keying work for a group of shades that is analyzed in real time rather than a fixed setting. Also if you can calculate how many pixels exist in a given area you might be able to make it so it won't key out skin tones.

Let me know if any of this works.

EriFisher avatar Jan 07 '18 23:01 EriFisher

Hi, I am trying to filter the chrome key of a green screen for recorded video, I am able to filter the video but I want the output as URL of the filtered video. does any One help On this issue.

suneelseelam avatar Apr 05 '18 09:04 suneelseelam