Microsoft Office 2010 Engineering

The official blog of the Microsoft Office product development group

The Magic of Background Removal

The Magic of Background Removal

  • Comments 29
  • Likes

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 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.



  • This is pretty awesome feature. Even I wonder what code the Office 2010 is using. But I'm eagerly waiting for it to be released

  • what I'd really like to see is being able to flow text around the new foreground, not the original rectangular image - in this example to follow the flower petals. will that work?

  • You can wrap text in Word and edge effects like Glow follow the edges of the image.  Reflection and Shadows only show the foreground portion, as well.  

    However, borders or bevels follow the rectangular bounds.

    Tucker Hatfield, Program Manager, Microsoft

  • This is a wonderful feature. Now I won't need to buy an expensive Masking tool any more. Thousand thanks to all the developers.

  • this is pretty awesome! Just tried it - it's great!!!! I was always dreaming of it!

  • That's a great feature. I already use Excel to do a lot of design work and this was something that I always wished Microsoft would include. Thanks

  • Background Removal looks like a great new feature that I am sure it will come in handy.  It will be nice when the public beta of Office 2010 comes out, hopefully in November so I can test this new feature out.  I know this feature would have come in handy on some of the PowerPoint presentations/Posters I had to prepare in the past.

  • I wish to use this feature ASAP... its awesome... keep going people...

  • What an extremely cool feature! And in all programs, will make my work a lot more colorful :-)

  • This will be a huge time saver for work and home use! I just tried it and am blown away with the result!

    Way to impact our products and add user-value!!

  • Nifty!

    These are those small little additions that'll come in handy once every now and then, but when they do - boy, will you like it :)

  • Wow. That's quite impressive. Well done!

  • Great feature!!! and works awesome..I remember how difficult it was to extract a picture with removing the background..

    Kudos to office team!!!

  • Wow. Great job. I wonder if this "technology" will be ported over to the Mac version of office 2010. Can't wait for VBA again! Finally my mac can be useful (other than running Windows on it)

  • Great new feature and I'm looking forward to the next post.

    I've done a quick post on how to use this in Visio over here:



Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment