First time here? Check out the FAQ!
I think changing the input and output matrices to CV_64 should resolve the issue and make the output more sensible.