/// <summary> /// Changes the shape and/or the number of channels of a 2D matrix without copying the data. /// </summary> /// <param name="cn">New number of channels. If the parameter is 0, the number of channels remains the same.</param> /// <param name="rows">New number of rows. If the parameter is 0, the number of rows remains the same.</param> /// <returns>A new mat header that has different shape</returns> public Mat Reshape(int cn, int rows = 0) { return(new Mat(MatInvoke.cveMatReshape(Ptr, cn, rows), true, false)); }