Langue

MLImage.CreateFromPixels Méthode

Définition

Crée un objet MLImage à partir de l’étendue de données de pixels.

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

Paramètres

width
Int32

La largeur de l’image est en pixels.

height
Int32

La hauteur de l’image est en pixels.

pixelFormat
MLPixelFormat

Format de pixel à utiliser pour créer l’image.

imagePixelData
ReadOnlySpan<Byte>

Données de pixels à partir duquel créer l’image.

Retours

Objet MLImage.

S’applique à