MLImage.CreateFromPixels 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從像素資料範圍建立 MLImage 物件。
public static Microsoft.ML.Data.MLImage CreateFromPixels(int width, int height, Microsoft.ML.Data.MLPixelFormat pixelFormat, ReadOnlySpan<byte> imagePixelData);
static member CreateFromPixels : int * int * Microsoft.ML.Data.MLPixelFormat * ReadOnlySpan<byte> -> Microsoft.ML.Data.MLImage
Public Shared Function CreateFromPixels (width As Integer, height As Integer, pixelFormat As MLPixelFormat, imagePixelData As ReadOnlySpan(Of Byte)) As MLImage
參數
- width
- Int32
影像的寬度,以像素為單位。
- height
- Int32
影像的高度,以像素為單位。
- pixelFormat
- MLPixelFormat
用來製作影像的像素格式。
- imagePixelData
- ReadOnlySpan<Byte>
用來製作影像的像素資料。
傳回
MLImage 物件。