Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difficult Background
#1
I'm doing my first photo restoration, and have come across a problem. I know how to remove the background (sort of), but some of the subjects have helmets the same colour as the background, which is the problem. I've tried turning to black and white, but it wasn't much help. Here's the photo.

https://imgur.com/a/2Ms9p
Reply
#2
Use the path tool, take artististic liberty for the curvature of the helmets Wink

Maybe use the outline of the helmet the moustache guy is wearing and move it on the other guys heads.
Reply
#3
(01-10-2018, 10:26 AM)Rob1955 Wrote: I'm doing my first photo restoration, and have come across a problem. I know how to remove the background (sort of), but some of the subjects have helmets the same colour as the background, which is the problem. I've tried turning to black and white, but it wasn't much help. Here's the photo.

Same as Esper, use the path tool.

I have created a small demo in xcfgz format. This is a compressed xcf file that can be directly opened from within Gimp.

What I did:
1. Traced the hard hat with the path tool, using best guess for the parts of the helmet.
2. Converted the path to a selection
3. Created a new transparent layer above the photo.
4. On this new layer filled the selection with a very light grey.
5. Put this new layer into Multiply mode
This makes the hat standout from the white background.

I wouldn't remove the background - it gives context to the photo.


Attached Files
.xcfgz   HardHat1.xcfgz (Size: 179.42 KB / Downloads: 167)
Reply
#4
Using the threshold tool on a copy of the layer you can figure out the shape of the helmets, and apply it on the original layer.
Reply
#5
(01-10-2018, 10:26 AM)Rob1955 Wrote: I'm doing my first photo restoration, and have come across a problem. I know how to remove the background (sort of), but some of the subjects have helmets the same colour as the background, which is the problem

It is going to end up with a bit of artistic license. Removing background? Apart from the very simplest of image, I recommend using a layer mask. https://docs.gimp.org/en/gimp-layer-mask-add.html and https://www.gimp.org/tutorials/Layer_Masks/

As an example:

[Image: DvGjrLN.jpg]

I cropped the image, at this stage the border is just a distraction.

Adjust the image to get some idea of the helmet shape. The left side one is too far gone, guessed that one.

Painted in the outlines just because I wanted to use gmic interactive to get a mask (1). There are other ways, just paint one in, it is your project, worth spending some time on it.

Added the layer mask, and tidied it up. (2) Put in the copied layer (3) because the bottom of the image is dark and difficult to see, just there as a reference.

Clone in a bit of shading on the helmets, a bit of repair using resynthesizer/heal selection.

Always a good idea to add a neutral background, amazing the errors that are overlooked with transparency.

A 12 MB gimp file. just for reference http://www.mediafire.com/file/0e2arfgcn3...3-2.xcf.gz
Reply
#6
(01-10-2018, 11:53 AM)rich2005 Wrote:
(01-10-2018, 10:26 AM)Rob1955 Wrote: I'm doing my first photo restoration, and have come across a problem. I know how to remove the background (sort of), but some of the subjects have helmets the same colour as the background, which is the problem

It is going to end up with a bit of artistic license. Removing background? Apart from the very simplest of image, I recommend using a layer mask. https://docs.gimp.org/en/gimp-layer-mask-add.html and https://www.gimp.org/tutorials/Layer_Masks/

As an example:

[Image: DvGjrLN.jpg]

I cropped the image, at this stage the border is just a distraction.

Adjust the image to get some idea of the helmet shape. The left side one is too far gone, guessed that one.

Painted in the outlines just because I wanted to use gmic interactive to get a mask (1). There are other ways, just paint one in, it is your project, worth spending some time on it.

Added the layer mask, and tidied it up. (2) Put in the copied layer (3) because the bottom of the image is dark and difficult to see, just there as a reference.

Clone in a bit of shading on the helmets, a bit of repair using resynthesizer/heal selection.

Always a good idea to add a neutral background, amazing the errors that are overlooked with transparency.

A 12 MB gimp file. just for reference http://www.mediafire.com/file/0e2arfgcn3...3-2.xcf.gz

Thanks for all the help guys. I'm sure I'll get something from this. Probably trying too hard for my first attemp. The photo was actually in two halfs when I got it, so I haven't done too bad. Just a couple more questions. What is gmic interactive? I sometimes use Gimp Portable, and some scripts I downloaded, don't always appear the menu. Why should that be?
Reply
#7
gmic is a gimp plugin that provides literaly hundreds of filters. One of them is an interactive background removal. I just used it as a quick way of making a (rough) mask. https://i.imgur.com/uKL8r2u.jpg You dot around the boundary with the mouse. Keep gmic http://www.gmic.eu for later once you are more accustomed to Gimp regular tools.

Usually I would just paint in a layer mask with the brush tool, but that can take some time.

Same with resynthesizer and heal selection, they are also external plugins. Worth installing when repairing photographs see: https://www.gimp-forum.net/Thread-Resynt...or-Windows
Reply
#8
(01-10-2018, 02:24 PM)rich2005 Wrote: gmic is a gimp plugin that provides literaly hundreds of filters. One of them is an interactive background removal. I just used it as a quick way of making a (rough) mask. https://i.imgur.com/uKL8r2u.jpg You dot around the boundary with the mouse. Keep gmic http://www.gmic.eu for later once you are more accustomed to Gimp regular tools.

Usually I would just paint in a layer mask with the brush tool, but that can take some time.

Same with resynthesizer and heal selection, they are also external plugins. Worth installing when repairing photographs see: https://www.gimp-forum.net/Thread-Resynt...or-Windows

Thanks for the tips, and the download help. Sorry to be a pain, but from your example, I not clear on what you did after you outlined the helmets, to make the mask. So I can learn this, could you explain each step. Thanks.
Reply
#9
(01-11-2018, 08:55 AM)Rob1955 Wrote: Thanks for the tips, and the download help. Sorry to be a pain, but from your example, I not clear on what you did after you outlined the helmets, to make the mask. So I can learn this, could you explain each step. Thanks.

I think rich2005 was talking about using G'MIC - Extract Foreground.
Thats a filter in G'MIC, you can use to remove the background of images.
Its quite advanced, with interactive functionality.
Reply


Forum Jump: