cv.convertTo - MATLAB File Help
cv.convertTo

Converts an array to another data type with optional scaling

dst = cv.convertTo(src)
dst = cv.convertTo(src, 'OptionName', optionValue, ...)

Input

Output

Options

The method converts source pixel values to the target data type. Saturation is applied at the end to avoid possible overflows:

dst = cast(src*alpha + beta, RType);
See also