Referência de API para recursos de imagem de IA no SDK do Aplicativo Windows
Dica
Forneça comentários sobre essas APIs e sua funcionalidade criando um novo Problema no repositório GitHub SDK do Aplicativo Windows. (Certifique-se de incluir Imaging no título!)
Saiba mais sobre as APIs SDK do Aplicativo Windows, apoiadas por IA (inteligência artificial), que podem dimensionar e aprimorar imagens (Super Resolução de Imagem), bem como identificar objetos em uma imagem (Segmentação de Imagem).
Para obter mais detalhes, consulte Introdução à imagem de IA no SDK do Aplicativo Windows.
Importante
Esse recurso ainda não está disponível. Espera-se que ele seja enviado em uma próxima versão de canal experimental do SDK do Aplicativo Windows.
O canal experimental do SDK do Aplicativo Windows inclui APIs e recursos em estágios iniciais de desenvolvimento. Todas as APIs no canal experimental estão sujeitas a extensas revisões e alterações interruptivas, podendo ser removidas de versões subsequentes a qualquer momento. Elas não são compatíveis com o uso em ambientes de produção e os aplicativos que usam os recursos experimentais não podem ser publicados na Microsoft Store.
Namespace Microsoft.Graphics.Imaging
Fornece APIs para modelos de aprendizado de máquina que dimensionam e aprimoram imagens.
Classe Microsoft.Graphics.Imaging.ImageBuffer
public sealed class ImageBuffer : System.IDisposable
Propriedade Microsoft.Graphics.Imaging.ImageBuffer.Buffer
public Windows.Storage.Streams.IBuffer Buffer { get; }
-valor da propriedade
Propriedade Microsoft.Graphics.Imaging.ImageBuffer.BufferLength
public uint BufferLength { get; }
-valor da propriedade
Método Microsoft.Graphics.Imaging.ImageBuffer.Close
// This member is not implemented in C#
Método Microsoft.Graphics.Imaging.ImageBuffer.CopyToBuffer(System.Byte[])
public void CopyToBuffer (byte[] values);
-Parâmetros
-valores de parâmetro
Método Microsoft.Graphics.Imaging.ImageBuffer.CreateBufferAttachedToBitmap(Windows.Graphics.Imaging.SoftwareBitmap)
public static Microsoft.Graphics.Imaging.ImageBuffer CreateBufferAttachedToBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap);
-Parâmetros
-param softwareBitmap
-returns
Método Microsoft.Graphics.Imaging.ImageBuffer.CreateCopyFromBitmap(Windows.Graphics.Imaging.SoftwareBitmap)
public static Microsoft.Graphics.Imaging.ImageBuffer CreateCopyFromBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap);
-Parâmetros
-param softwareBitmap
-returns
Método Microsoft.Graphics.Imaging.ImageBuffer.CreateFromBuffer(Windows.Storage.Streams.IBuffer,Microsoft.Graphics.Imaging.PixelFormat,System.UInt32,System.UInt32)
public static Microsoft.Graphics.Imaging.ImageBuffer CreateFromBuffer (Windows.Storage.Streams.IBuffer buffer, Microsoft.Graphics.Imaging.PixelFormat pixelFormat, uint width, uint height);
-Parâmetros
-buffer de parâmetro
-param pixelFormat
-largura do parâmetro
-altura do parâmetro
-returns
Microsoft.Graphics.Imaging.ImageBuffer.CreateFromBufferWithStride(Windows.Storage.Streams.IBuffer,Microsoft.Graphics.Imaging.PixelFormat,System.UInt32,System.UInt32,System.UInt32) método
public static Microsoft.Graphics.Imaging.ImageBuffer CreateFromBufferWithStride (Windows.Storage.Streams.IBuffer buffer, Microsoft.Graphics.Imaging.PixelFormat pixelFormat, uint width, uint height, uint stride);
-Parâmetros
-buffer de parâmetro
-param pixelFormat
-largura do parâmetro
-altura do parâmetro
-passo de param
-returns
Método Microsoft.Graphics.Imaging.ImageBuffer.CreateSoftwareBitmap
public Windows.Graphics.Imaging.SoftwareBitmap CreateSoftwareBitmap ();
-returns
Propriedade Microsoft.Graphics.Imaging.ImageBuffer.Height
public uint Height { get; }
-valor da propriedade
Construtor Microsoft.Graphics.Imaging.ImageBuffer.#ctor(Windows.Storage.Streams.IBuffer,Microsoft.Graphics.Imaging.PixelFormat,System.UInt32,System.UInt32)
public ImageBuffer (Windows.Storage.Streams.IBuffer buffer, Microsoft.Graphics.Imaging.PixelFormat pixelFormat, uint width, uint height);
-Parâmetros
-buffer de parâmetro
-param pixelFormat
-largura do parâmetro
-altura do parâmetro
Propriedade Microsoft.Graphics.Imaging.ImageBuffer.PixelFormat
public Microsoft.Graphics.Imaging.PixelFormat PixelFormat { get; }
-valor da propriedade
Propriedade Microsoft.Graphics.Imaging.ImageBuffer.Width
public uint Width { get; }
-valor da propriedade
Classe Microsoft.Graphics.Imaging.ImageObjectExtractor
public sealed class ImageObjectExtractor : System.IDisposable
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.Close
// This member is not implemented in C#
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.CreateWithImageBufferAsync(Microsoft.Graphics.Imaging.ImageBuffer)
public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageObjectExtractor> CreateWithImageBufferAsync (Microsoft.Graphics.Imaging.ImageBuffer imageBuffer);
-Parâmetros
-param imageBuffer
-returns
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.CreateWithSoftwareBitmapAsync(Windows.Graphics.Imaging.SoftwareBitmap)
public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageObjectExtractor> CreateWithSoftwareBitmapAsync (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap);
-Parâmetros
-param softwareBitmap
-returns
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.GetImageBufferObjectMask(Microsoft.Graphics.Imaging.ImageObjectExtractorHint)
public Microsoft.Graphics.Imaging.ImageBuffer GetImageBufferObjectMask (Microsoft.Graphics.Imaging.ImageObjectExtractorHint hint);
-Parâmetros
-dica de parâmetro
-returns
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.GetSoftwareBitmapObjectMask(Microsoft.Graphics.Imaging.ImageObjectExtractorHint)
public Windows.Graphics.Imaging.SoftwareBitmap GetSoftwareBitmapObjectMask (Microsoft.Graphics.Imaging.ImageObjectExtractorHint hint);
-Parâmetros
-dica de parâmetro
-returns
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.IsAvailable
public static bool IsAvailable ();
-returns
Método Microsoft.Graphics.Imaging.ImageObjectExtractor.MakeAvailableAsync
public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
-returns
Classe Microsoft.Graphics.Imaging.ImageObjectExtractorHint
public sealed class ImageObjectExtractorHint
Propriedade Microsoft.Graphics.Imaging.ImageObjectExtractorHint.ExcludePoints
public System.Collections.Generic.IReadOnlyList<Windows.Graphics.PointInt32> ExcludePoints { get; }
-valor da propriedade
Microsoft.Graphics.Imaging.ImageObjectExtractorHint.#ctor(Windows.Foundation.Collections.IVector{Windows.Graphics.RectInt32},Windows.Foundation.Collections.IVector{Windows.Graphics.PointInt32},Windows.Foundation.Collections.IVector{Windows.Graphics.PointInt32}) construtor
public ImageObjectExtractorHint (System.Collections.Generic.IList<Windows.Graphics.RectInt32> includeRects, System.Collections.Generic.IList<Windows.Graphics.PointInt32> includePoints, System.Collections.Generic.IList<Windows.Graphics.PointInt32> excludePoints);
-Parâmetros
-param includeRects
-param includePoints
-param excludePoints
Propriedade Microsoft.Graphics.Imaging.ImageObjectExtractorHint.IncludePoints
public System.Collections.Generic.IReadOnlyList<Windows.Graphics.PointInt32> IncludePoints { get; }
-valor da propriedade
Propriedade Microsoft.Graphics.Imaging.ImageObjectExtractorHint.IncludeRects
public System.Collections.Generic.IReadOnlyList<Windows.Graphics.RectInt32> IncludeRects { get; }
-valor da propriedade
Classe Microsoft.Graphics.Imaging.ImageObjectRemover
public sealed class ImageObjectRemover : System.IDisposable
Método Microsoft.Graphics.Imaging.ImageObjectRemover.Close
// This member is not implemented in C#
Método Microsoft.Graphics.Imaging.ImageObjectRemover.CreateAsync
public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageObjectRemover> CreateAsync ();
-returns
Método Microsoft.Graphics.Imaging.ImageObjectRemover.IsAvailable
public static bool IsAvailable ();
-returns
Método Microsoft.Graphics.Imaging.ImageObjectRemover.MakeAvailableAsync
public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
-returns
Método Microsoft.Graphics.Imaging.ImageObjectRemover.RemoveFromImageBuffer(Microsoft.Graphics.Imaging.ImageBuffer,Microsoft.Graphics.Imaging.ImageBuffer)
public Microsoft.Graphics.Imaging.ImageBuffer RemoveFromImageBuffer (Microsoft.Graphics.Imaging.ImageBuffer imageBuffer, Microsoft.Graphics.Imaging.ImageBuffer imageBufferMask);
-Parâmetros
-param imageBuffer
-param imageBufferMask
-returns
Método Microsoft.Graphics.Imaging.ImageObjectRemover.RemoveFromSoftwareBitmap(Windows.Graphics.Imaging.SoftwareBitmap,Windows.Graphics.Imaging.SoftwareBitmap)
public Windows.Graphics.Imaging.SoftwareBitmap RemoveFromSoftwareBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap, Windows.Graphics.Imaging.SoftwareBitmap softwareBitmapMask);
-Parâmetros
-param softwareBitmap
-param softwareBitmapMask
-returns
Classe Microsoft.Graphics.Imaging.ImageScaler
public sealed class ImageScaler : System.IDisposable
Método Microsoft.Graphics.Imaging.ImageScaler.Close
// This member is not implemented in C#
Método Microsoft.Graphics.Imaging.ImageScaler.CreateAsync
public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageScaler> CreateAsync ();
-returns
Método Microsoft.Graphics.Imaging.ImageScaler.IsAvailable
public static bool IsAvailable ();
-returns
Método Microsoft.Graphics.Imaging.ImageScaler.MakeAvailableAsync
public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
-returns
Propriedade Microsoft.Graphics.Imaging.ImageScaler.MaxSupportedScaleFactor
public int MaxSupportedScaleFactor { get; }
-valor da propriedade
Método Microsoft.Graphics.Imaging.ImageScaler.ScaleImageBuffer(Microsoft.Graphics.Imaging.ImageBuffer,System.Int32,System.Int32)
public Microsoft.Graphics.Imaging.ImageBuffer ScaleImageBuffer (Microsoft.Graphics.Imaging.ImageBuffer imageBuffer, int width, int height);
-Parâmetros
-param imageBuffer
-largura do parâmetro
-altura do parâmetro
-returns
Método Microsoft.Graphics.Imaging.ImageScaler.ScaleSoftwareBitmap(Windows.Graphics.Imaging.SoftwareBitmap,System.Int32,System.Int32)
public Windows.Graphics.Imaging.SoftwareBitmap ScaleSoftwareBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap, int width, int height);
-Parâmetros
-param softwareBitmap
-largura do parâmetro
-altura do parâmetro
-returns
Microsoft.Graphics.Imaging.PixelFormat enumeração
public enum PixelFormat
-campos-de-enumeração
-campo Indefinido: 0
- campo Rgb24: 1
-campo Argb32: 2
-campo Rgba32: 3
-campo Bgra32: 4
-campo Cinza8: 5
Struct Microsoft.Graphics.Imaging.SegmentationPoint
public struct SegmentationPoint
-struct-campos
-tipo de campo
-campo x
-campo y
Microsoft.Graphics.Imaging.SegmentationPointType enumeração
public enum SegmentationPointType