2

Recently I've been trying to use JuicyPixels and hmatrix to process images. However, I don't know how to calculate the gradient of a matrix as image gradient using hmatrix. There seems to be no available API and I can only write a one myself which is too slow to work.

In hmatrix, I discover that the mapMatrix function is very useful but it only concerns one element transformations. Is there any function which is more powerful than mapMatrix that can iterate over matrix efficiently?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
xuehy
  • 23
  • 5
  • 3
    hmatrix (which is based on the [BLAS](http://en.wikipedia.org/wiki/BLAS)-oriented [GSL](https://www.gnu.org/software/gsl/)) sees matrices mostly as a representation of linear mappings, hence those are obviously not a great fit for images. Why don't you use something dedicated like [repa-DevIL](http://hackage.haskell.org/package/repa-devil)? – leftaroundabout May 14 '14 at 07:56

1 Answers1

1

hmatrix is not intended for image processing (see the mentioned repa-Devil and also easyVision), but you can try conv2.

Alberto Ruiz
  • 411
  • 2
  • 2