Trying to extract subject from background

Discussion in 'Introductions' started by Patricia.A, Jul 9, 2011.

  1. Patricia.A

    Patricia.A New Member

    Joined:
    Jul 9, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello. I've just joined Gimper.net. Have been using Gimp for awhile to restore old photos and improve recently taken ones. Unfortunately, I am a bad photographer!
    My current problem is trying to extract a Siberian Husky from the background. Using the path tool does not look realistic as the fine hairs and feathering of his haunches does not look correct. I tried a contrast mask but cannot get the background contrasted enough. When I whiten the background, I lose the dog also. I would appreciate any ideas.

    Attached Files:

  2. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,199
    Likes Received:
    0
    Trophy Points:
    36
    Okay so basically, rendering (extracting) a furry object or hair in general is almost impossible. There are some things you can try though:

    GML MATTING
    <a class="postlink" href="http://www.chip.de/downloads/GML-Matting_38445160.html" onclick="window.open(this.href);return false;">http://www.chip.de/downloads/GML-Matting_38445160.html</a> (German download link, just google for it to get an English one if you don't trust me ;))
    This is basically a Photoshop plugin to extract different objects from their background. Together with PSPI (a plugin for Gimp that allows you to use Photoshop plugins in Gimp, you can download it from the Gimp registry) you can try to get rid of the background.
    However, this plugin has it's limits, so you might (and probably will) fail with this.
    I once made a tutorial on youtube about rendering short hair and fur. It's basically cheating but it turns out quite good in my opinion:
    [youtube]LUMN0H5ZSK4[/youtube]


    Good luck

    Arzo
  3. Patricia.A

    Patricia.A New Member

    Joined:
    Jul 9, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your tutorial. I will probably have to use it to extract the furry pets from their existing backgrounds. I did want to try the GML matting anyway, but I have not been able to get a PSPI file to work. Nothing shows up on my GIMP menu to allow the use of the photoshop plug in. When I am loading the plug in, I get a libglib.dll file is missing. I'm not sure what that is or how to get it. Are you familiar with this?
  4. Rod

    Rod Moderator Staff Member

    Joined:
    Apr 19, 2010
    Messages:
    1,740
    Likes Received:
    0
    Trophy Points:
    36
    If you are using Windows platform the plugin has to go here..
    C:\Program Files\GIMP-2.0\lib\gimp\2.0\plugins
    The plugin will then initiate and use the libglib dynamic link file or DLL.

    Once installed and you restart Gimp - you should see another entry under Filters/Photo Shop plugin settings

    [​IMG]

    Click that link in the menu and this dialog to create a path to your PhotoShop filters will show.
    [​IMG]

    It works exactly like Gimps Preferences/Folders/Plugins path saver works. :)
  5. Rod

    Rod Moderator Staff Member

    Joined:
    Apr 19, 2010
    Messages:
    1,740
    Likes Received:
    0
    Trophy Points:
    36
    By the way that file libglib.dll is in GTK runtimes and you should have that installed with Gimp (it comes with it)

    [​IMG]
  6. Patricia.A

    Patricia.A New Member

    Joined:
    Jul 9, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Than you very much for the instructions in adding the PSPI file. My filters menu is a little different. The GML is listed separately but the PhotoShop plug in setting looks the same and the file works. I did try GML and found it somewhat confusing. There are now improved programs: Growcut. Version 1 is now freeware, but 2 and 3 are not. I downloaded version 3 for a trial period. Wish me luck! Thanks again.
  7. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    The tutorial Arzoroc posted is great, my sister uses it all the time for rendering horses, cats, and other furry animals. And I've used it for rendering people.
  8. Patricia.A

    Patricia.A New Member

    Joined:
    Jul 9, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The growcut 3 program works fairly well for extracting subjects from the background, but I still could use some rendering on the hair. Do you have a tutorial on the rendering of hair with voice over or written. I have trouble following as the labels on the program are not in English and I do not follow fast enough.
  9. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,199
    Likes Received:
    0
    Trophy Points:
    36
    :D Yeah sorry I made the tutorial and my Gimp is German.

    Basically, make a selection INSIDE the object (i.e. animal etc.), then delete everything outside that selection. This will give you a rough shape but without any furry effect. Don't forget to click on "Select > Select All" after this to get rid of the selection after you deleted the background and to rightclick the layer and choose "Add Alpha Channel" to make your layer capable of displaying transparency.
    Then, take the Smudge-Tool (the finger symbol in your toolbox) and go to the tool options (If you can't find it, you can always open it up by clicking "Windows > Dockable Dialogs > Tool Options"). Once you're there, select a brush size that is equal to the size of the hair you want to create. Also choose a rate (= how strong the smudging effect is = how long the hairs become) that matches the hair's length. You can enable the "Fade out" option as well to emphasize the effect of the hairs getting thinner in the end.

    Now comes the active part: With the smudge tool enabled, click inside your image, close to the border, and hold the left mouse button down while dragging the cursor outside the head/body. This should give you a line that looks similar to a hair. If it is too big/small/short/long, you have to adjust the settings of the smudge tool.
    The brush size and smudge rate settings as well as the fade out options are dependant on your image, so I cannot tell you the values you have to choose. Just play around with the sliders until you think it matches your hair/fur style.

    And if you're still struggling, here's a picture that explains everything :D Click on it for a larger view!




    Hope this helps

    Arzo

    Attached Files:

  10. Willy

    Willy Member

    Joined:
    Mar 26, 2011
    Messages:
    746
    Likes Received:
    0
    Trophy Points:
    16
    Occupation:
    High School, Engineering Program
    Location:
    Michigan
    Home page:
    arzoroc there is something wrong with his dog, it's all black and looks like a sheep with a spear coming out of it's back 8O
  11. Patricia.A

    Patricia.A New Member

    Joined:
    Jul 9, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    David Wood wrote that he has used the rendering program for people. How would you use that for people. I could use some instruction for people with longer
    or choppy hair when trying to extract them from a a background.
  12. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,199
    Likes Received:
    0
    Trophy Points:
    36
    - Install PSPI to make custom Photoshop plugins available for Gimp.
    - Get the GML Matting programm I linked to in my first post
    - install both, start GML Matting and roughly shape the object
    - the program will try to render the object
  13. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    I've used it for rendering people with short spiky hair, I used it on all the pictures for my friend Mike's youtube channel: <a class="postlink" href="http://www.youtube.com/schubes17" onclick="window.open(this.href);return false;">http://www.youtube.com/schubes17</a>
  14. Rod

    Rod Moderator Staff Member

    Joined:
    Apr 19, 2010
    Messages:
    1,740
    Likes Received:
    0
    Trophy Points:
    36
    Try the tutorial at Gimp Tricks YouTube channel for rendering with threshold.
    <a class="postlink" href="http://www.youtube.com/watch?v=AnbxtMCHKV0&feature=related" onclick="window.open(this.href);return false;">http://www.youtube.com/watch?v=AnbxtMCH ... re=related</a>
  15. Patricia.A

    Patricia.A New Member

    Joined:
    Jul 9, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I saw a tutorial on the Photoshop foreground extraction tool. Is there anything like that available as a plug in for Gimp or stand alone program? The extraction tool gimp has is not very refined if working with subjects with hair.

Share This Page