The Magic of Background Removal

Page 1 of 2 12 LastLast

    The Magic of Background Removal


    Posted: 19 Oct 2009
    Hi, I’m Tucker Hatfield and I’m a Program Manager on the Office Graphics team.

    Pictures are great – worth 1,000 words they say – so it’s a great idea to use them to spice up a document or add some flair to a presentation. The problem is that they usually end up being self-contained rectangles in the middle of things, and they don’t really flow into the content. You can put borders or effects on them to make them look more artistic, but up until now the only way to isolate part of the picture was to go into an expensive photo editing package and learn the cumbersome process of selecting and removing portions of the image.

    Background Removal is a new feature in Word, Excel, PowerPoint and Outlook that makes this process quick and easy for any picture. Unlike similar tools, the Office Background Removal tool doesn’t just select color ranges or trim to a border you draw. Background Removal uses new capabilities and algorithms from the Microsoft Research and Development team in Cambridge, UK to achieve better results automatically with very little effort or fine tuning from the user.

    So, how does it work?

    Even though I can’t explain the deepest secrets of how the code works, I can show you how to use it effectively. Let’s start with this picture and assume that we want to remove the background and keep only the flower.



    Clicking the Remove Background button in Picture Tools will start the process. First off, Background Removal tries to figure out what portion of your picture is the foreground, the portion to keep, and which is the background, the portion to remove. The first step in this process is the marquee selection area that gets drawn when you first start Background Removal. When you first start the tool, you’ll see the marquee and portions of the image are overlaid with magenta. Everything marked with magenta is what Background Removal has marked as the background. The normally colored portions are foreground, and will be kept.



    You’ll probably notice that the marquee is inset slightly by default. Why is that? Well, it’s rare that the subject of a photo fills the picture completely, and insetting the marquee slightly makes it easier for Background removal to figure out what is the foreground and what is the background. In general, the less background included inside the marquee the more accurate Background Removal will be.

    As you can see above, if the goal is to isolate the flower, the default marquee size doesn’t really get the desired result. As it stands, the result would look like this:



    To further refine what we get, we’ll need to adjust the shape and size of the marquee. The important rule to remember is that you want the marquee to contain everything you want to keep. It’s okay if there are portions of what’s in the marquee that you don’t want to keep – the magic will do its best to figure out what to keep and what to ignore – but nothing that sticks very far outside of the marquee will be kept, so it’s important to make sure everything you want is inside. Let’s size the marquee so that it is just slightly bigger than the flower. The marquee is sized just the same as any shape or image, by grabbing the handles and resizing or dragging the whole shape to a new location.



    Background removal figures out what you wanted and isolates the flower, which results in everything but the flower being removed.



    Since the system Background Removal uses to isolate foreground objects from the background isn’t simply based on color choices or contrast values, it can extract even similarly-colored objects from the background.



    Or you can even choose to keep something other than the obvious…



    Of course, no matter how good the logic is that’s trying to figure out what the foreground of the picture is, there will always be some cases where simply adjusting the marquee can’t figure out what should be kept and what should be discarded. For those cases Background Removal has some simple tools to mark up and refine your selection. We’ll talk about how to use those tools remove the background from an image that presents a problem in a future post. For now, let me close with a couple of quick illustrations of how you might use that flower we removed in the first example.





    More...
    z3r010's Avatar Posted By: z3r010
    19 Oct 2009



  1. Posts : 6,885
    Windows 7 Ultimate x64, Mint 9
       #1

    Awesome. May have to try this out....
    You would think they would put it in paint though...

    ~Lordbob
      My Computer


  2. Posts : 2,111
    Win7 Build 7600 x86
       #2

    If it is really as good as this article suggests, it is absolutely brilliant.

    Would have saved me a couple of thousand hrs fine tuning selections in the past.

    Great find.

    I'm going to look for an Office 2010 trial right away.

    Thanks
      My Computer


  3. Posts : 5
    XP / 7
       #3

    This is rather useful. This will probably put off my Photoshop installation by a month or so..
      My Computer


  4. Posts : 136
    Windows 7 RTM x86
       #4

    This is what I have been waiting for for years. Now I won't need any expensive Masking tool to remove image backgrounds. I love Microsoft and I love Bill Gates. And of course I love seven forums too.
      My Computer


  5. Posts : 358
    windows 7 HP 64bit
       #5

    It looks great but those pics above look very easy for this sort of thing. Lets see how it works with more complicated pics.
    Hope im proved wrong but i think it wont be as fantastic as the PR makes it look.
      My Computer


  6. Posts : 4,925
    Windows 7 Professional 64-bit
       #6

    Would be nice to have this feature in Live Gallery.
      My Computer


  7. Posts : 31,242
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #7

    Have just been playing with this and it does seem quite impressive, and the actual masking is retained in files opened in Office 2007, which is nice.

    2010testPresentation1.zip

    This is a quick test PPtx presentation that shows a masked image if anyone wants to actually try a practical example.

    just open the file in office 2007 and run the slideshow (needs a click to start animation)

    the file took less time to create and upload than to write this post so is basic
      My Computers


  8. Posts : 2,111
    Win7 Build 7600 x86
       #8

    Barman58 said:
    Have just been playing with this and it does seem quite impressive, and the actual masking is retained in files opened in Office 2007, which is nice.

    2010testPresentation1.zip

    This is a quick test PPtx presentation that shows a masked image if anyone wants to actually try a practical example.

    just open the file in office 2007 and run the slideshow (needs a click to start animation)

    the file took less time to create and upload than to write this post so is basic
    Thanks Barman,

    If MS incorporates this algorithm in a new photo-editor, or sell it as a plug-in, they have a real winner.

    Extracting backgrounds is one of the most time consuming tasks,
    and especially for web graphic editors one of the most common tasks.

    Even with Photoshop CS4 it is still a lot of work getting it right.

    Adobe will be drooling over this.

    and
      My Computer


  9. Posts : 1,586
    Windows 7 Ultimate x64 SP1
       #9

    That is REALLY cool! I may need to get Office 2010 now. :)
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:27.
Find Us