MIT researchers streamline coding for image processing

Researchers free the underlying program code from the order in which it can be executed

Researchers at the Massachusetts Institute of Technology have figured out a way of helping developers more easily rearrange their image processing code so that it could execute faster and use fewer computational resources.

Such a technique could prove especially beneficial for mobile phones and other portable devices where battery power is at a premium. Users are growing ever more accustomed to running advanced photo manipulation apps like Instagram on their phones, so developers of these apps are struggling to make their creations as speedy as possible.

"I was looking for some easier way to write high performance code for mobile devices, but it turned out to be great for desktops as well," said Andrew Adams, a postdoctoral student at the MIT Computer Science and Artificial Intelligence Laboratory (CSAIL).

Adams, along with other researchers from MIT, Stanford University and Adobe, have developed a DSL (Domain Specific Language), and associated compiler, that creates a layer of abstraction that allows developers to easily move around chunks of code in order to find the most computationally efficient method of processing images.

The researchers have used the DSL, called Halide, to rewrite several common image-processing functions. In many cases they were able to demonstrate two-, three-, or even six-fold increases in speed.

Typically, image processing involves multiple steps, some of which can be executed in a parallel in multicore processors. For developers, however, moving code around to find the optimal order of execution can be a complicated and error-prone process, given that with the imperative languages used today for image processing -- such as C++ -- the order in which a program executes tends to be "baked into the code," Adams said.

"Getting performance improvements on mobile platforms can be quite painful. If you've already optimized your code a certain way, If you want to try optimizing a different way you have to rearrange all your code, and you'll probably just increased the number bugs. It's just a painful experience," Adams said.

Borrowing ideas from functional programming, Halide provides developers with the ability to easily schedule when and where each routine should execute. The programmer can experiment with the order in which the program executes, without worrying about introducing bugs or breakages.

Halide can also save time in porting programs to different hardware as well. The programmer needs only to reorder the execution of code that is optimal for the new platform.

The DSL is an extension of C++, and compilers are available for both x86 and ARM mobile processors, as well as for Nvidia Cuda GPUs. The researchers may also create a version tailored for the OpenGL library. Ultimately, though, they hope that the ideas behind Halide -- rather than the DSL itself -- are embedded in commercial development tools and languages.

The researchers plan to discuss Halide at the Association for Computing Machinery's Special Interest Group on Computer Graphics and Interactive Techniques (Siggraph) conference next week in Los Angeles.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the PC World newsletter!

Error: Please check your email address.

Struggling for Christmas presents this year? Check out our Christmas Gift Guide for some top tech suggestions and more.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service

Most Popular Reviews

Follow Us

Best Deals on GoodGearGuide

Shopping.com

Latest News Articles

Resources

GGG Evaluation Team

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell

LIFEBOOK UH574

The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi

STYLISTIC Q702

The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott

STYLISTIC Q702

My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Latest Jobs

Shopping.com

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?