Baby steps with Pancito: a simple color filter
I was thrilled to find out about Pancito today, a simple-to-use Haskell library for functional image manipulation. In Pancito, images are functions from a Point datatype to a Colour type. Slow, but fun.
As a quick showcase, this is a simple color filter in Pancito:
For convenience, I also wrote a quick shell script that handles conversion from JPEG to PNM and back with NetPBM, and opens original and altered image on OS X’s Preview.
This is all a horrible hack, but I’ve only worked in this for half an hour and I’m excited enough to want to share immediately. Here’s a picture of my hand:
Sure, from a Haskell viewpoint this isn’t really *that* exciting — it’s all rather simple — but I’m very fond of image manipulation, and wrote 30% of a Pancito-type library before dropping it. I might just be excited that someone went through the end of it. It’s at the very least a good framework for image processing research.
Filed under: Uncategorized | Leave a Comment