/// <summary> /// Converts an array to another data type with optional scaling. /// </summary> /// <param name="m">Output matrix; if it does not have a proper size or type before the operation, it is reallocated.</param> /// <param name="rtype">Desired output matrix type or, rather, the depth since the number of channels are the same as the input has; if rtype is negative, the output matrix will have the same type as the input.</param> /// <param name="alpha">Optional scale factor.</param> /// <param name="beta">Optional delta added to the scaled values.</param> public void ConvertTo(IOutputArray m, CvEnum.DepthType rtype, double alpha = 1.0, double beta = 0.0) { using (OutputArray oaM = m.GetOutputArray()) MatInvoke.cvMatConvertTo(Ptr, oaM, rtype, alpha, beta); }