1 | initial version |
I think that you are looking for the more general Mat.convertTo(Mat m, int rtype, double alpha, double beta) function.
The method "converts an array to another data type with optional scaling." The result will reside in m
. Moreover "if rtype is negative, the output matrix will have the same type as the input." alpha
is the optional scale factor, while beta
is the optional delta added to the scaled values.