3 ms·
A lower level but more portable alternative: http://halide-lang.org/ http://halide-lang.org/ Takes a bit of learning but it's really fast. The tutorial series
by Veratyr 11y ago
A lower level but more portable alternative: http://halide-lang.org/ http://halide-lang.org/
Takes a bit of learning but it's really fast. The tutorial series is good http://halide-lang.org/tutorials/tutorial_introduction.html http://halide-lang.org/tutorials/tutorial_introduction.html
It'd be interesting to see a comparison between the two for something non-trivial, both in terms of code complexity and performance. My guess is that Halide takes a lot more code but ends up being 2-3x faster due to the ease of low level optimization.
- ipsum2 11y agoOff topic, do you know if Halide supports RAW image format?
- vanderZwan 11y agoWell, RAW image formats vary per camera, so it probably won't "support" any particular format out of the box since that is not really the responsibility of the language. But given a known format I'm pretty sure you can convert any RAW image format into something Halide understands without loss (at the moment most RAW image data uses at most 14 bits IIRC, so a 16 bit RGB array should be enough), after which you can implement, say, debayering algorithms yourself. In fact, that's the first example you see in the first publication (see top left) about Halide: http://people.csail.mit.edu/jrk/halide12/ http://people.csail.mit.edu/jrk/halide12/
- Veratyr 11y agoHalide doesn't operate that high level. You need to use another library to decode the image, Halide takes raw pixel values. But yes, you can use Halide for handling RAW image data. I actually used it for exactly that a couple of months ago, when I implemented a demosaic algorithm. It's damn fast too.
- JustFinishedBSG 11y agoDoes it support Metal? Because it is what GPUImage blazing fast on iOS in the first place
- Veratyr 11y agoYes, Halide supports Metal as one of its targets. The Github repo has samples for iOS apps and generic Metal: https://github.com/halide/Halide/tree/master/apps https://github.com/halide/Halide/tree/master/apps