Channels

Services

Halide: a new programming language for image processing

Halide versions of common image-processing algorithms are faster and required fewer lines of code
Source: MIT
Researchers from the Computer Science and Artificial Intelligence Laboratory (CSAIL) at MIT have presented a new programming language called Halide. The language is designed to simplify the development of image processing applications on modern computer systems. The embedded domain-specific language (DSL) aims to enhance the efficiency of algorithms such as those for camera raw pipelines, bilateral grids, Laplacian filtering and image segmentation.

"Not only are Halide programs easier to read, write and revise than image-processing programs written in a conventional language, but because Halide automates code-optimisation procedures that would ordinarily take hours to perform by hand, they’re also significantly faster," said the researchers. The team used Halide to rewrite various common image-processing algorithms and found that their versions were about a third shorter and offered up to six times faster processing speeds. They note that one of the main contributing factors is the highly optimised process parallelisation.

Embedded in C++, Halide runs on platforms such as x86-64/SSE, ARM v7/NEON and CUDA. It supports SIMD units, multiple cores and complex memory hierarchies. The compiler is currently supported on Mac OS X systems (the research team themselves used 10.6 to 10.8) and mainstream Linux distributions such as Ubuntu (12.04). The researchers say that, while Windows builds are technically feasible, they have been neither attempted nor tested within the project. Source code and binaries of Halide are released under the MIT licence. The code for the compiler and for Halide itself are available to download from the project's GitHub page.