title: Opencv: save a double matrix with imwrite
body: <p>I have a matrix (Mat) constituted by double, in the range [0,1].
  When I save it by means of command imwrite, the resulting image is totally black.
  I suppose the problem is a casting problem, but I don't know how to solve it.
  Thanks</p>