MLImage.CreateFromPixels Methode

Definition

Erstellt mlImage -Objekt aus der Pixeldatenspanne.

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

Parameter

width
Int32

Die Breite des Bilds in Pixeln.

height
Int32

Die Höhe des Bilds in Pixeln.

pixelFormat
MLPixelFormat

Das Pixelformat, mit dem das Bild erstellt werden soll.

imagePixelData
ReadOnlySpan<Byte>

Die Pixeldaten, aus der das Bild erstellt werden soll.

Gibt zurück

MLImage-Objekt.

Gilt für: