Post Reply 

sihouette an object in an image

Dec 7, 2011, 19:25 (This post was last modified: Dec 7, 2011 20:02 by cardgunner.)
Post: #1
sihouette an object in an image
If I want to cut out the backgound of an image and leave just the object how best can that be done?

I read in one of the threads to erase it out. Is there a better way?

i'm very new to gimp.

Thanks,
CardGunner


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Dec 7, 2011, 21:38
Post: #2
RE: sihouette an object in an image
Let's start with the wet blanket:
- the picture is very complex, with lots of "holes", not speaking of the windows...
- the background is rather busy
- the technical quality at the pixel level is crap, due to over-accentuation by the camera firmware (zoom on the antenna). This precludes the use of most automated tools (magic scissors...).

The good side if that the picture is big so the cutout is likely to get scaled down for further use and this will mitigate many defects.

Now you have two basic techniques:
  • The Paths (Path) tool:
    • Draw a set of paths that approximates (half-pixel approximation...) the outline.
    • Combine them in one single path
    • Make a selection from that, feather it one pixel,
    • Invert it
    • Delete to remove all the background.
    • Bad sides:
      • Requires proficiency with the Path tool (but you can train yourself).
      • Tedious on very complex shapes (tracks)
    • Good sides:
      • Correction is easy
      • Works OK with a mouse
      • Very quick and accurate on simple lines (and you have got many on your image)
  • The layer mask:
    • Make sure the layer supports transparency (Layer/Transparency/Add alpha channel)
    • Add a layer mask (Layer/Mask/Add layer mask and initialize to white).
    • From then on, when you paint on the layer, you'll be actually painting on the mask, which is an image of the alpha-channel of the layer.
      • Painting black set the mask to 0, so the layer is transparent.
      • Painting white sets the mask to 255, which makes the layer fully opaque.
      • Intermediate values (grays) are also possible (for the windows, for instance).
      • Since the original RGB values are not modified, you can recover a stroke of black with a stroke of white.
      • This is best used with a moderately soft brush when painting around your subject (but you can use a large hard brush to remove most of the background)
    • Bad sides:
      • Much better with a tablet than with a mouse: more accurate strokes, and pressure can be used to adjust the hardness of the brush.
      • Not so easy to keep straight lines straight
    • Good sides:
      • Feels natural to most people (see it as an enhanced eraser)
      • Easier on complex shapes
      • Better control on border softness
You can Google for videos explaining both techniques. But keep in mind that the author picked up the best picture for the job, so it always looks easy Smile

For the image above you may mix both techniques: use the paths on the cabin and arm, and the layer mask on the tracks, then combine the results.

A proper extraction will take you at least a couple of hours.

One more thing: forget the antenna. Cut it. Then add one back (approximate it with a Path and stroke it).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Dec 8, 2011, 19:28
Post: #3
RE: sihouette an object in an image
Well i got it cut out. A lot of erasing. I learned how to use the "fuzzy select tool" to select to the area I want to erase and then hit delete and it will erase all in the selected area.

If you don't want some of the area selected erased then while the area is selected you can erase part of the area by selecting the eraser and eraseing in the selection.

I figured this out half way thru and could have saved me hours.

Can anyone tell me how to now create a shadow in the image???

Thanks,
CardGunner


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Dec 8, 2011, 20:53
Post: #4
RE: sihouette an object in an image
(Dec 8, 2011 19:28)cardgunner Wrote:  Well i got it cut out. A lot of erasing. I learned how to use the "fuzzy select tool" to select to the area I want to erase and then hit delete and it will erase all in the selected area.

If you don't want some of the area selected erased then while the area is selected you can erase part of the area by selecting the eraser and eraseing in the selection.

I figured this out half way thru and could have saved me hours.
I didn't mention this technique (which is what all beginners do) because it doesn't give good results. Your picture makes it even worse, because the background selection won't include the over-accentuated outline, and you now have a 5 pixels border remaining around your subject in many places. This isn't too visible as long as the background is clear, but it will come back to haunt you sooner or later. And then you will spend hours removing it.

Adding a shadow is easy if you have the subject on an otherwise transparent layer. Add a layer below it, do an ellipse selection that encompasses the tracks, feather it by some large amount (200 pixels), and bucket fill with black. Then use the opacity slider to make it partially transparent (about 70%). Then use the Move tool to move it at a position that makes it look like the shovel is resting on it, and not hovering above it.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  "Open Image" change default folder and thumbnail view? Dave001 1 57 Aug 15, 2017 19:56
Last Post: ofnuts
  How to wrap paragraph text in an image arun67 0 45 Aug 12, 2017 12:46
Last Post: arun67
  Combining gif image to static image help? littlegreendog 1 76 Jul 26, 2017 12:27
Last Post: ythgilb
  Image color vs color picker YalithKBK 1 118 Jul 7, 2017 11:45
Last Post: ythgilb
  Print Size vs Image Size ambermc85 1 125 Jun 27, 2017 05:18
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS