I have an GPUImageStillCamera
layered over a UIView
(on which some realtime animation is happening) in which for GPUImagePicture
I am passing the sourceImage
with smoothlyScaleOutput:YES
for ChromaKeyBlendFilter
The code works perfectly (most humble thanks to Brad Larson!) and I get a camera feed with green pixels removed where the sourceImage
is shown.
What I want to do is to pass a sourceImage
which could name the background transparent for the feed i.e. I don't want to show the sourceImage
in background where the green pixels are removed but instead, I want that pixel to be transparent.
Here's the image from my project:
See that blurry square area in the center, I want it to be transparent so that it shows the actual background image which is absolutely clear. right now I am passing the background image separately to the filter and it is showing blurry image.
To achieve the same, I tried with passing the transparent PNG but, I got a black color background. What should I be doing to achieve the thing I am looking for? Please suggest.. Thanks!