pub fn convert_to(
src: &impl GMatTraitConst,
rdepth: i32,
alpha: f64,
beta: f64,
) -> Result<GMat>
Expand description
Converts a matrix to another data depth with optional scaling.
The method converts source pixel values to the target data depth. saturate_cast<> is applied at the end to avoid possible overflows:
Output matrix must be of the same size as input one.
Note: Function textual ID is “org.opencv.core.transform.convertTo”
§Parameters
- src: input matrix to be converted from.
- rdepth: desired output matrix depth or, rather, the depth since the number of channels are the same as the input has; if rdepth is negative, the output matrix will have the same depth as the input.
- alpha: optional scale factor.
- beta: optional delta added to the scaled values.
§C++ default parameters
- alpha: 1
- beta: 0