Closed aminiz closed 4 years ago
Version 1.1.1 fixes it.
Thanks for the prompt response! Your change fixes the bug but I am seeing some quality difference between GPUImage2 and BBMetalImage.
I had a green-screen background and put the airpod case, key, and finger on top of it. Then I chromakeyed that image with both GPUImage2 (first image) and BBMetalImage (second image). The MacBook is just part of a different image.
I did not spend time fixing the orientation for the BBMetalImage so please ignore the orientation and aspect ratio issue.
Hi, I have a few questions for the bug.
Do you use this code ?
BBMetalChromaKeyFilter(thresholdSensitivity: 0.4, smoothing: 1.0, colorToReplace: .green)
smoothing
is too high. Try to use default parameters.
BBMetalChromaKeyFilter()
How do you blend two images (Macbook image and chroma key image) ?
If the bug is not fixed, could you please show me the original image (green-screen background image)? I will use it to test.
Q1: I get the same result with both.
Q2: I don't actually blend the images. I have an ImageView that shows the MacBook image. On top of that, I have another ImageView that shows the chromakey image.
Q3: Green screen image is attached.
I test the green-screen background image in the demo project with iPhone 7 (iOS 13.3). Here are the results.
The original image.
The chroma key image. I use the code BBMetalChromaKeyFilter()
The chroma key image with sunflower image at the bottom.
Are the expected results?
Yes! I was able to get this result as well now. I had made a coding error where I was setting smoothness. Thanks for the help!
The following code returns a faded image, not one that has its green removed.
BBMetalChromaKeyFilter(thresholdSensitivity: 0.4, smoothing: 1.0, colorToReplace: .green).filteredImage(with: image)