Since this transform only works on single-channel floating point matrices, it should include a check for this type at the beginning of the function.