1

I am running into this problem where removing a green screen using GIMP messes up the colour balance of the elements in the image.

To recreate this simple problem I chose an image with an alpha channel (image on the left) and I added a layer below it with a #00ff00 fill (image in the middle). I then merged the layers and applied "Colour to Alpha..." using #00ff00; the result is the image on the right.

origina, green screen, and result

As you can see, the blue and red dice from the original image are quite accurate (perhaps because they have no green component on their colour composition?), but the problem arises for the two green dice: you can see that the one on the top right becomes grey...

Is there a proper way to deal with this? Thanks.

3

You have simply added green to the whole image. If you are trying to simulate chroma-key backgrounds used in photography/videography, that's not what they look like at all.

When you did a colour to alpha on the green image, you have simply converted all the greens to alpha, so that's why the green die now looks grey, you've basically removed all the greens in the image. To be honest, I'm not sure what you are actually trying to achieve here.

Also, something else to note is that chroma-key backgrounds are very rarely used in small product photography because of colour contamination/reflection problems. The method only really works with backgrounds which are well behind the subject, and evenly lit. Lighting these backgrounds but avoiding colour contamination/reflections on the subject is not trivial. Also when you use chroma-key backgrounds, it won't work properly if one of your subjects is the same colour as the background.

In product photography, white backgrounds, or using a small light tent are usually preferred.

  • I was exactly trying to simulate a chrome-key background to see how I can use GIMP to post-process these images. – Henrique Ferrolho Feb 13 '18 at 17:50
  • @HenriqueFerrolho You might like to have a look at the Bluebox filter in GIMP's GAP plugin. Don't try to simulate the green background, find a proper chroma key image to test it on. I made a tutorial for this years ago. Check it out if you want. – Billy Kerr Feb 13 '18 at 18:06
  • 1
    @HenriqueFerrolho there are other methods too, such as using the Select by Colour tool, mess around with the threshold, and then create a layer mask from the selection. – Billy Kerr Feb 13 '18 at 19:23
  • yes . color to alpha is not the tool to work with chromakey. it is best usage is for background removal and replacement preserving the texture of semi-transparent objects. Fuzzy select (magic wand) + cut is better suited for single chromakey uses. – jsbueno Feb 14 '18 at 11:04
0

Your initial image isn't correct. You removed the background, but you also removed white which isn't part of the background (for instance, the pips...). The same thing happens between images two and three, you remove green which isn't part of the background. You really have to cutout the dice, but the focus blur on the background dice makes it hard to do it properly.

The "contract" of Color-to-alpha is that when you have removed a color, putting the remaining image over a background filled with the removed color recreates the initial image. However there are many cases where there are several solutions, for instance, when removing white, a gray 50% (#808080) could become:

  • #808080 at 100% opacity
  • #000000 at 50% opacity
  • #404040 at 66.66% opacity
  • etc...

because all these combinations, over a white layer, would recreate the initial #808080.

But C2A always takes the (color,opacity) couple aims for the maximum transparency (#000000 at 50% here) which isn't always what you want, so you have to protects part that should remain opaque with a proper selection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.