Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Decode image with OpenCV. Note: return image in RGB by default, instead of OpenCV's default BGR.
/// </summary>
/// <param name="buf">Buffer containing binary encoded image</param>
/// <param name="flag">Convert decoded image to grayscale (0) or color (1).</param>
/// <param name="to_rgb">Whether to convert decoded image to mxnet's default RGB format (instead of opencv's default BGR).</param>
/// <returns>returns new symbol</returns>
Decode image with OpenCV. Note: return image in RGB by default, instead of OpenCV's default BGR.
Decode image with OpenCV . Note : return image in RGB by default instead of OpenCV ' s default BGR .
public static NDArray Cvimdecode(Symbol buf,
        int flag = 1,
        bool to_rgb = true)
        {
            return new Operator("_cvimdecode")
            .SetParam("buf", buf)
            .SetParam("flag", flag)
            .SetParam("to_rgb", to_rgb)
            .Invoke();
        }
public static NDArray Cvimdecode ( Symbol buf , int flag = 1 , bool to_rgb = true ) { return new Operator ( " " ) . SetParam ( " " , buf ) . SetParam ( " " , flag ) . SetParam ( " " , to_rgb ) . Invoke ( ) ; }
Decode image with OpenCV.
Decode image with OpenCV .
returns new symbol
returns new symbol
buf
Symbol
Buffer containing binary encoded image
Buffer containing binary encoded image
flag
int
Convert decoded image to grayscale (0) or color (1).
Convert decoded image to grayscale ( 0 ) or color ( 1 ) .
to_rgb
bool
Whether to convert decoded image to mxnet's default RGB format (instead of opencv's default BGR).
Whether to convert decoded image to mxnet ' s default RGB format ( instead of opencv ' s default BGR ) .