Skip to main content

MIT scientists develop algorithm for removing reflections from photos

mit scientists develop algorithm for removing reflections from photos reflectionremoval
According to MIT, its “researchers have created a new algorithm that, in a broad range of cases, can automatically remove reflections from digital photos. On the left is the original photo taken through a window, with the photographer's reflection clearly visible. On the right, the reflection has been separated from the photo.” Credit: Massachusetts Institute of Technology
Whatever the scenario, we’ve all taken photos through windows hoping to capture that fleeting image: an arching rainbow from the car window, a person or car passing by a building window, or a priceless artifact behind museum glass. And when you go to view your photos afterward, you see that they have been marred by the reflections, which are usually of the photographer. Well, a group at the Massachusetts Institute of Technology may have found a solution to the problem after creating an algorithm that reduces the reflection in photographs.

Photos taken through windows or glass usually have two nearly identical reflections, one slightly offset from the other. Double-paned windows, as well as plain old thick windows, are often the culprits, says YiChang Shih, one of the MIT researchers who developed the algorithm. “With that kind of window, there’s one reflection coming from the inner pane and another reflection from the outer pane,” Shih says. “The inner side will give a reflection, and the outer side will give a reflection as well.”

Recommended Videos

So, the algorithm looks at the values for images inside the glass and outside of it, and attempts to correct it so that it looks the way it was intended. “You have an image from outdoor (A) and another image from indoor (B), and what you capture is the sum of these two pictures (C),” Shih says, who presents the problem as a complex mathematical challenge in then trying to recover A and B data from C.

Please enable Javascript to view this content

“But the value of A for one pixel has to be the same as the value of B for a pixel a fixed distance away in a prescribed direction. That constraint drastically reduces the range of solutions that the algorithm has to consider,” MIT News writes.

The process in really technical, but in short, the algorithm uses a technique developed at Hebrew University of Jerusalem in Israel that analyzes the colors of the images by breaking them into 8 x 8 blocks of pixels, calculating “the correlation between each pixel and each of the others.” Out of 197 images from Google and Flickr that they tested the algorithm on, 96 worked. (Check out MIT News for a more detailed explanation.)

“People have worked on methods for eliminating these reflections from photos, but there had been drawbacks in past approaches,” Yoav Schechner, a professor of electrical engineering at Israel’s Technion, told MIT News. “Some methods attempt using a single shot. This is very hard, so prior results had partial success, and there was no automated way of telling if the recovered scene is the one reflected by the window or the one behind the window. This work does a good job on several fronts.”

“The ideas here can progress into routine photography, if the algorithm is further ‘robustified’ and becomes part of toolboxes used in digital photography,” Schechner adds. “It may help robot vision in the presence of confusing glass reflection.”

The MIT researchers will present the algorithm at the Computer Vision and Pattern Recognition conference in Boston, in June. The research is still in its early stages, but over time, we could see it embedded into digital cameras and smartphones, or photo software, and do away with unwanted reflections once and for all.

Enid Burns
Former Digital Trends Contributor
Enid Burns is a freelance writer who has covered consumer electronics, online advertising, mobile, technology electronic…
This Canon mirrorless camera is $600 off today
Canon EOS R5

We all want to take the kind of photographs that you see in coffee table books and the cover of National Geographic. Fortunately, brands like Canon produce some of the most user-friendly cameras on the market. Once you’ve been using an entry-level DSLR for a while, you may want to upgrade to one of Canon’s full-frame mirrorless models.

As a matter of fact, one of Canon’s best Prime Day markdowns made its way over to Crutchfield. For a limited time, when you purchase the Canon EOS R5 L Series Zoom Kit, you’ll pay $3,900. At full price, this model sells for $4,500.

Read more
Best GoPro deals: Save on action cameras and accessories
Prime Day 2022 GoPro deals graphic.

For those who have active lifestyles and want to record it all, action cameras are your friend, and one of the most well-known brands is probably GoPro. It's one of the best action cameras on the market, and it's great if you want to record yourself snowboarding, skydiving, and really anything else in between. Of course, it can get a little bit pricey, which is why we've gone out and collected some of our favorite GoPro deals for you below to help save you a little extra.

That said, if you want a few more options, you may want to check out these drone deals, as well as some of these more traditional camera deals as well.
Best GoPro camera deals
GoPro HERO10 Black (renewed) -- $199 $240 20% off

Read more
Best drone deals: Get a cheap drone for $47 and more
The DJI Mini 3 Pro in flight with spring flowers in the background.

There is a lot to love about drones, especially if you're somebody who loves nature and photography, as it gives you a really interesting perspective on the world that wouldn't usually be accessible. That said, owning a drone is often seen as a really expensive hobby, with expensive brands like DJI easily costing thousands of dollars. Luckily, there are a lot of great budget-oriented options, including quality DJI alternatives, and a lot of them have great deals on them, bringing them down to as low as $46. We've collected a few of our favorites below — all of which make great gifts for the holidays for the person in your life who appreciates the revolutionary bird's-eye view they offer.

Of course, if you prefer a more traditional experience, you could always check out these GoPro deals and camera deals instead.
Radclo Mini Drone -- $46 $230 80% off

Read more