Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Read and decode image with OpenCV. Note: return image in RGB by default, instead of OpenCV's default BGR.
/// </summary>
/// <param name="filename">Name of the image file to be loaded.</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>
Read and decode image with OpenCV. Note: return image in RGB by default, instead of OpenCV's default BGR.
Read and decode image with OpenCV . Note : return image in RGB by default instead of OpenCV ' s default BGR .
public static NDArray Cvimread(string filename,
        int flag = 1,
        bool to_rgb = true)
        {
            return new Operator("_cvimread")
            .SetParam("filename", filename)
            .SetParam("flag", flag)
            .SetParam("to_rgb", to_rgb)
            .Invoke();
        }
public static NDArray Cvimread ( string filename , int flag = 1 , bool to_rgb = true ) { return new Operator ( " " ) . SetParam ( " " , filename ) . SetParam ( " " , flag ) . SetParam ( " " , to_rgb ) . Invoke ( ) ; }
Read and decode image with OpenCV.
Read and decode image with OpenCV .
returns new symbol
returns new symbol
filename
string
Name of the image file to be loaded.
Name of the image file to be loaded .
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 ) .