Mobile app version of vmapp.org
Login or Join
Cody3331749

: Using GIMP to extract foreground objects using layers I want to take some portrait shots and then replace the background. I don't have a green screen or anything I can use for chroma keying,

@Cody3331749

Posted in: #BackgroundRemoval #Gimp

I want to take some portrait shots and then replace the background. I don't have a green screen or anything I can use for chroma keying, so I had this idea that I could take a picture of a background, and then take another picture with people in front of it, and then separate the people from the background by doing a "difference" on the two pictures to create the mask.

Both pictures were taken from exactly the same position (using a tripod and a remote shutter release), so that isn't a problem. The problem is that despite having identical exposures, the lighting of the background is slightly different, so when I take the difference there is a lot of values in the range of 0-15 (on a 0-255 scale) making it impossible for Threshold to determine the mask.

Is there another technique I can use, or am I barking up the wrong tree here?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody3331749

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn212

The obvious suggestion would be to reshoot with a better background. Back when I had to do something like that, I found a plain green bed sheet to work just fine.

However, if you have to work with the shots you've got, one thing you could try would be taking the difference of the two shots (preferably using the "grain extract" layer mode) and using the magic wand tool to select the background. Then add the selection as a layer mask on the original image and, if necessary, hand-edit the mask until it looks good enough.

Also, it may help to apply selective gaussian blur to the two shots before merging them in order to get rid of noise but still retain sharp edges. Remember to use the same blur parameters for both images.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme