Some vision algorithms in Haskell