The Magic of Background Removal

z3r010

Administrator
Staff member
Local time
9:03 PM
Messages
53,524
Location
Douglas, Isle of Man
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.





aggbug.aspx

More...
 

My Computer My Computer

At a glance

Windows 11
Computer type
PC/Desktop
OS
Windows 11
Awesome. May have to try this out....
You would think they would put it in paint though...

~Lordbob
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64, Mint 9Intel i5-2500k2x 4Gb Corsair VENGEANCE DDR3-1600NVidia GeForce N260GTX Twin Frozr
Computer Manufacturer/Model Number
Hera
OS
Windows 7 Ultimate x64, Mint 9
CPU
Intel i5-2500k
Motherboard
ASUS P8P67 Pro
Memory
2x 4Gb Corsair VENGEANCE DDR3-1600
Graphics Card(s)
NVidia GeForce N260GTX Twin Frozr
Sound Card
Realtek HD OnBoard Audio
Monitor(s) Displays
ASUS 24" Monitor
Screen Resolution
1920x1080
Hard Drives
G.SKILL Phoenix Series 60GB SATA II MLC Internal Solid State Drive (SSD)
SAMSUNG Spinpoint F3R 1TB 7200 RPM 32MB Cache SATA II
PSU
Cooler Master Real Power Pro 750W
Case
Cooler Master Haf 932
Cooling
Fans
Keyboard
Razer Tarantula
Mouse
Razer Lachesis
Internet Speed
not fast enough
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. :confused:

Great find.

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

Thanks
 

My Computer My Computer

At a glance

Win7 Build 7600 x86Pentium II 300MHz32mb EDO RAMDiamond Viper
OS
Win7 Build 7600 x86
CPU
Pentium II 300MHz
Motherboard
Asus
Memory
32mb EDO RAM
Graphics Card(s)
Diamond Viper
Sound Card
Soundblaster 16
Monitor(s) Displays
14" AOC CRT 16K color
Screen Resolution
800x600
Hard Drives
300mb Quantum fireball
PSU
110 Watts
Cooling
Passive
Keyboard
Trust Ergonomic
Mouse
Generic
Internet Speed
256K u 128K d
This is rather useful. This will probably put off my Photoshop installation by a month or so..
 

My Computer My Computer

At a glance

XP / 7Core 2 Duo 2.0GhZ2GB DDR2ATI X1300 Mobility
Computer Manufacturer/Model Number
HP nc6400
OS
XP / 7
CPU
Core 2 Duo 2.0GhZ
Memory
2GB DDR2
Graphics Card(s)
ATI X1300 Mobility
Hard Drives
80 GB SATA
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 My Computer

At a glance

Windows 7 RTM x86
OS
Windows 7 RTM x86
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 My Computer

At a glance

windows 7 HP 64bitAMD Athlon 64 X2 Dual Core 5600+ 2.80GHz4GBAsus ATI Radeon EAH2600XT HTDP Silent 256MB G...
OS
windows 7 HP 64bit
CPU
AMD Athlon 64 X2 Dual Core 5600+ 2.80GHz
Motherboard
Asus M2N-SLI Deluxe
Memory
4GB
Graphics Card(s)
Asus ATI Radeon EAH2600XT HTDP Silent 256MB GDDR3 HDTV/Dual
Sound Card
M-Audio 24/96
Monitor(s) Displays
DELL 23" widescreen monitor
Screen Resolution
1920x 1080
Hard Drives
3 x Samsung F1 Spinpoint
Case
Antec Quiet Mini Tower Case
Keyboard
Latest slim Apple keyboard
Internet Speed
5MB/s (50mb/s virgin broadband)
Would be nice to have this feature in Live Gallery.
 

My Computer My Computer

At a glance

Windows 7 Professional 64-bitIntel E8400 3GHzKingston PC3-10700H 4GbXFX Radeon HD 5850 BlackEd.
Computer Manufacturer/Model Number
self built
OS
Windows 7 Professional 64-bit
CPU
Intel E8400 3GHz
Motherboard
Intel DX48BT2
Memory
Kingston PC3-10700H 4Gb
Graphics Card(s)
XFX Radeon HD 5850 BlackEd.
Sound Card
Asus Xonar DG
Monitor(s) Displays
2x Samsung SM-T220HD 22"
Screen Resolution
1680x1050 on two monitors
Hard Drives
OCZ Vertex 2 120gb 3.5" (OS)
Seagate Momentus XT 500gb
Samsung F3 1Tb (games)
2x Samsung F1 1Tb
PSU
Thermaltake ToughPower 850w
Case
Thermaltake Armor
Cooling
Scythe Mugen II
Keyboard
Microsoft Comfort Curve USB
Mouse
Razer Diamondback 3G
Internet Speed
8128/443
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.

View attachment 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 :D
 

My Computers My Computers

  • At a glance

    Windows 11 Pro x64 [Latest Release and Releas...Ryzen 9 5950X, 3.8 - 5.2 MHz64GB [2 x 32GB] DDR4 3200MHz4GB NVIDIA GEFORCE GTX 1650 Ti
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    ChillBlast - Custom to my design
    OS
    Windows 11 Pro x64 [Latest Release and Release Preview]
    CPU
    Ryzen 9 5950X, 3.8 - 5.2 MHz
    Motherboard
    Asus Prime X570-Pro
    Memory
    64GB [2 x 32GB] DDR4 3200MHz
    Graphics Card(s)
    4GB NVIDIA GEFORCE GTX 1650 Ti
    Sound Card
    On-board SPDIF to 5.1 System + HDMI [5.1 system]
    Monitor(s) Displays
    32" UHD 32 Bit HDR Monitor + 43" UHD 4K 32Bit HDR TV
    Screen Resolution
    2 x 3840 x 2160 @60Hz
    Hard Drives
    1TB M2 SSD OS, 500GB Fast Access SSD, 2 x 8TB Data + Various Externals from 1TB to 4TB, 10TB NAS
    PSU
    NZXT C750 80 PLUS Gold 750W Modular PSU
    Case
    Workstation Case [Matt Black]
    Cooling
    NZXT Kraken X63 280mm CPU Cooler +2x Quiet Case fans
    Keyboard
    Logitech Wireless MX Keys & K400 + others
    Mouse
    Logitech Wireless MX Master 3S
    Internet Speed
    920 MB Down 50 MB Up
    Antivirus
    BitDefender Total Security Pro
    Browser
    Chrome (always run latest Non-Beta)
    Other Info
    Also run ...
    Laptop - Quad 8GB - Windows 10 Pro x64
    Nexus 7 Android tablet x2
    Samsung 10.2" tablet
    Blackview TAB 8 4G Android Tablet c/w Keyboard
    Wacom Intuos Pro Medium Pen Pad
    Wacom Intuos Pro Small Pen Pad
    Wacom Expresskeys Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control
  • At a glance

    Windows 11 Pro x64 Latest RPIntel I7 10750H 5.0GHz32GB [2x16GB] DDR4 2933 MHznVidia GTX1650Ti 4 GB GDDR6
    Computer type
    Laptop
    System Manufacturer/Model Number
    Dell XPS 17 10750H
    OS
    Windows 11 Pro x64 Latest RP
    CPU
    Intel I7 10750H 5.0GHz
    Motherboard
    Dell XPS
    Memory
    32GB [2x16GB] DDR4 2933 MHz
    Graphics Card(s)
    nVidia GTX1650Ti 4 GB GDDR6
    Sound Card
    Stock [Realtek] 4 Speaker
    Monitor(s) Displays
    17" IPS UHD+ Infinity Edge Touchscreen
    Screen Resolution
    3840 x 2400
    Hard Drives
    2TB M2 NVMe, 4TB External + various 500GB & 1TB External NVMe (also have access to spinner HDD from
    PSU
    Stock
    Case
    Stock XPS Aluminium & Carbon Fibre
    Cooling
    Stock - Active Fan Control
    Keyboard
    Backlit + Various Logitech
    Mouse
    Stock Track Pad + Logitech MX Trackball
    Internet Speed
    72 MB Down 18MB Up
    Browser
    Chrome
    Other Info
    Also run ...
    Laptop - Quad 8GB - Windows 10 Pro x64
    Nexus 7 Android tablet x2
    10.2" tablet
    Sony Z3 Android Smartphone
    Wacom Intuos Pro Medium Pen Pad
    Wacom Intuos Pro Small Pen Pad
    Wacom Expresskeys Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control Pad
    10TB NAS
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.

View attachment 32300

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 :D

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

and
 

My Computer My Computer

At a glance

Win7 Build 7600 x86Pentium II 300MHz32mb EDO RAMDiamond Viper
OS
Win7 Build 7600 x86
CPU
Pentium II 300MHz
Motherboard
Asus
Memory
32mb EDO RAM
Graphics Card(s)
Diamond Viper
Sound Card
Soundblaster 16
Monitor(s) Displays
14" AOC CRT 16K color
Screen Resolution
800x600
Hard Drives
300mb Quantum fireball
PSU
110 Watts
Cooling
Passive
Keyboard
Trust Ergonomic
Mouse
Generic
Internet Speed
256K u 128K d
That is REALLY cool! I may need to get Office 2010 now. :)
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64 SP1AMD Phenom II X4, 945, Quad Core, 3.0 GHz8GB G.Skill PI Black PC2 6400 * 4-4-4-12 @1.9vNVIDIA 512MB 9600GT
Computer Manufacturer/Model Number
"WartHog Wonder"
OS
Windows 7 Ultimate x64 SP1
CPU
AMD Phenom II X4, 945, Quad Core, 3.0 GHz
Motherboard
Gigabyte MA785GM-US2H
Memory
8GB G.Skill PI Black PC2 6400 * 4-4-4-12 @1.9v
Graphics Card(s)
NVIDIA 512MB 9600GT
Sound Card
Realtek ALC889A Chipset (onboard)
Monitor(s) Displays
2 x 22" Hans-G LCD
Screen Resolution
1680x1050
Hard Drives
650GB 7200RPM WD Caviar Black
PSU
OCZ 700w GameXstream
Case
Cooler Master CM 690 Midtower
Cooling
Xigmatek Gaia SD1283 CPU Cooler, Assorted 120mm case fans
Keyboard
Dell SK-8115
Mouse
Microsoft Comfort Optical Mouse 3000
Other Info
Liteon iHAS 424-98B 24x DVD/CD Writer
I too just had a brief play with this; it is very easy to use. I would post the results but I used a pic of my brother and I can't post a pic of him without his ok and I don't have time for another go right now.
 

My Computer My Computer

At a glance

W 7 64-bit UltimateIntel Q9550 Yorkfield8GB Dominator 8500C5DATI : XFX 5870
Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
I'd like to get a shot at the Office 2010 Beta. Anyone know how I do that? Where I sign up etc. Or at least this program.
 

My Computer My Computer

At a glance

Windows 7 RC - 7100 64bitAMD Athlon(tm) 64 x2 4800+ 2.50Ghz Dual Core4 gig Kingston DDR2XFX Nvidia GeForce GTS 250
OS
Windows 7 RC - 7100 64bit
CPU
AMD Athlon(tm) 64 x2 4800+ 2.50Ghz Dual Core
Motherboard
Hewlett Packard
Memory
4 gig Kingston DDR2
Graphics Card(s)
XFX Nvidia GeForce GTS 250
Sound Card
na
Monitor(s) Displays
22" Samsung LCD Syncmaster
Screen Resolution
1680x1050
Hard Drives
300gig Western Digital
PSU
BFG Tech 550watt
Case
Crap stock Dell
Cooling
Side panel open on case, and a box fan blowing in.
Keyboard
G15
Mouse
G9
Internet Speed
Bike Messenger
I'd like to get a shot at the Office 2010 Beta. Anyone know how I do that? Where I sign up etc. Or at least this program.
MS Connect.

~Lordbob
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64, Mint 9Intel i5-2500k2x 4Gb Corsair VENGEANCE DDR3-1600NVidia GeForce N260GTX Twin Frozr
Computer Manufacturer/Model Number
Hera
OS
Windows 7 Ultimate x64, Mint 9
CPU
Intel i5-2500k
Motherboard
ASUS P8P67 Pro
Memory
2x 4Gb Corsair VENGEANCE DDR3-1600
Graphics Card(s)
NVidia GeForce N260GTX Twin Frozr
Sound Card
Realtek HD OnBoard Audio
Monitor(s) Displays
ASUS 24" Monitor
Screen Resolution
1920x1080
Hard Drives
G.SKILL Phoenix Series 60GB SATA II MLC Internal Solid State Drive (SSD)
SAMSUNG Spinpoint F3R 1TB 7200 RPM 32MB Cache SATA II
PSU
Cooler Master Real Power Pro 750W
Case
Cooler Master Haf 932
Cooling
Fans
Keyboard
Razer Tarantula
Mouse
Razer Lachesis
Internet Speed
not fast enough
Back
Top