It was a bit tricky to work with Halide. The Halide code itself is beautiful, but it depends on LLVM which takes forever to build and link, and I ran into some snags with Windows support. I originally wanted to write the whole algorithm in Halide and run it on the GPU, but it turned out that the Halide language isn't expressive enough to implement a Hough transform. I had to write that bit in C and I'm currently only using Halide to do some more straightforward image processing tasks like edge detection filters, blurring, and resampling. It works really well for that though, and performance-wise it runs rings around the naive nested C for loops that I would otherwise have to write.
Re:Homebrew Oculus Rift Eye Tracker
by vanderZwan on Wednesday June 11, 2014 @05:25AM
(#7877090)
Thanks, been interested in the language from a distance for a while now.
Can't claim to know what a Hough transform is, but do you think the lack of expressiveness can be fixed without interfering with the tricks that make it work? It's still a language under development after all.
I think the language could be made expressive enough, and the developers thought so too when I asked them about it. I think they're focusing on other things for now though.
A Hough transform is kind of a weird beast; not really your typical image processing problem. For anything that looks like a series of convolutions or other simple image operations, Halide is going to be the fastest thing around; even faster than a series of calls to the Intel IPP library (because of the ability to tune memory access patterns across multiple stages at once).
How hard/easy was it to get that image processing working in Halide?