다음을 통해 공유


Windows 앱 SDK의 AI 이미징에 대한 API 참조

Important

Windows 앱 SDK의 최신 실험 채널 릴리스에서 사용할 수 있습니다.

Windows 앱 SDK 실험 채널에는 개발 초기 단계의 API 및 기능이 포함되어 있습니다. 실험적 채널의 모든 API는 광범위한 수정 및 호환성이 손상되는 변경이 적용되며 언제든지 후속 릴리스에서 제거될 수 있습니다. 실험적 기능은 프로덕션 환경에서 사용할 수 없으며 이를 사용하는 앱은 Microsoft Store에 게시할 수 없습니다.

  • 이미징 기능은 중국에서 사용할 수 없습니다.
  • 자체 포함 앱은 지원되지 않습니다.

다음 기능을 지원하는 AI(인공 지능)를 지원하는 Windows 앱 SDK 이미징 API에 대해 알아봅니다.

  • 이미지 슈퍼 해상도: 이미지 크기 조정 및 선명화
  • 이미지 설명: 이미지를 설명하는 텍스트 생성
  • 이미지 구분: 이미지 내의 개체 식별

자세한 내용은 Windows 앱 SDK AI 이미징 시작을 참조하세요.

Windows 앱 SDK GitHub 리포지토리에서 새 문제 만들거나(타이틀에 이미징 포함) 기존 문제응답하여 이러한 API 및 해당 기능에 대한 피드백을 제공합니다.


Microsoft.Graphics.Imaging 네임스페이스

이미지의 크기를 조정하고 선명하게 하는 기계 학습 모델에 대한 API를 제공합니다.

ImageBuffer 클래스

public sealed class ImageBuffer : System.IDisposable

효율적인 교차 프로세스 마샬링을 위한 압축되지 않은 비트맵을 나타냅니다.

비고

ImageBuffer는 이미지 데이터가 필요한 TextRecognizer와 같은 AI 모델 API와 함께 사용할 수 있습니다. 일반적인 사용에는 기존 SoftwareBitmap에서 ImageBuffer를 만드는 작업이 포함됩니다.

ImageBuffer.Buffer 속성

public Windows.Storage.Streams.IBuffer Buffer { get; }

현재 이미지 버퍼를 가져옵니다.

속성 값

현재 이미지 버퍼입니다.

ImageBuffer.BufferLength 속성

public uint BufferLength { get; }

이미지 버퍼의 길이를 가져옵니다.

속성 값

이미지 버퍼의 길이입니다.

ImageBuffer.Close 메서드

// This member is not implemented in C#

개체 및 연결된 리소스를 삭제합니다.

비고

C#에서 구현되지 않았습니다.

ImageBuffer.CopyToBuffer(System.Byte[]) 메서드

public void CopyToBuffer (byte[] values);

현재 버퍼를 제공된 대상 버퍼에 복사합니다.

매개 변수
가치

버퍼의 바이트 벡터입니다.

ImageBuffer.CreateBufferAttachedToBitmap(Windows.Graphics.Imaging.SoftwareBitmap) 메서드

public static Microsoft.Graphics.Imaging.ImageBuffer CreateBufferAttachedToBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap);

비트맵 개체에서 IMemoryBufferReference를 가져오면 기존 SotftwareBitmap에서 새 ImageBuffer를 만듭니다.

매개 변수
softwareBitmap

ImageBuffer를 만들 SotftwareBitmap입니다.

반품

지원되지 않는 형식인 경우 ImageBuffer 또는 null입니다.

비고

SoftwareBitmap은 비동기 작업이 완료되고 새 ImageBuffer가 제거될 때까지 잠깁니다.

ImageBuffer.CreateCopyFromBitmap(Windows.Graphics.Imaging.SoftwareBitmap) 메서드

public static Microsoft.Graphics.Imaging.ImageBuffer CreateCopyFromBitmap (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap);

기본 비트맵 데이터를 복사하여 기존 SotftwareBitmap에서 새 ImageBuffer를 만듭니다.

매개 변수
softwareBitmap

ImageBuffer를 만들 SotftwareBitmap입니다.

반품

지원되지 않는 형식인 경우 ImageBuffer 또는 null입니다.

비고

SoftwareBitmap은 비동기 작업이 완료되고 새 ImageBuffer가 제거될 때까지 잠깁니다.

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);
매개 변수
완충기
pixelFormat
너비
높이
반품

ImageBuffer.CreateFromBufferWithStride(Windows.Storage.Streams.IBuffer,Microsoft.Graphics.Imaging.PixelFormat,System.UInt32,System.UInt32,System.UInt32) 메서드

public static Microsoft.Graphics.Imaging.ImageBuffer CreateFromBufferWithStride (Windows.Storage.Streams.IBuffer buffer, Microsoft.Graphics.Imaging.PixelFormat pixelFormat, uint width, uint height, uint stride);
매개 변수
완충기
pixelFormat
너비
높이
큰 걸음
반품

ImageBuffer.CreateSoftwareBitmap 메서드

public Windows.Graphics.Imaging.SoftwareBitmap CreateSoftwareBitmap ();

ImageBuffer에 저장된 픽셀 데이터에서 BGRA32 픽셀 형식의 새 SoftwareBitmap을 만듭니다.

반품

픽셀 형식 BGRA32의 새 SoftwareBitmap입니다.

ImageBuffer.Height 속성

public uint Height { get; }

이미지의 높이를 픽셀 단위로 가져옵니다.

속성 값

이미지의 높이(픽셀)입니다.

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);

ImageBuffer 클래스의 새 인스턴스를 초기화합니다.

매개 변수
완충기

ImageBuffer입니다.

pixelFormat

이미지의 픽셀 형식입니다.

너비

이미지의 너비(픽셀)입니다.

높이

이미지의 높이(픽셀)입니다.

ImageBuffer.PixelFormat 속성

public Microsoft.Graphics.Imaging.PixelFormat PixelFormat { get; }

이미지의 픽셀 형식을 가져옵니다.

속성 값

이미지의 픽셀 형식입니다.

ImageBuffer.Width 속성

public uint Width { get; }

이미지의 너비를 픽셀 단위로 가져옵니다.

속성 값

이미지의 너비(픽셀)입니다.

ImageObjectExtractor 클래스

public sealed class ImageObjectExtractor : System.IDisposable

ImageObjectExtractor.Close 메서드

// This member is not implemented in C#
비고

C#에서 구현되지 않았습니다.

ImageObjectExtractor.CreateWithImageBufferAsync(Microsoft.Graphics.Imaging.ImageBuffer) 메서드

public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageObjectExtractor> CreateWithImageBufferAsync (Microsoft.Graphics.Imaging.ImageBuffer imageBuffer);
매개 변수
imageBuffer
반품

ImageObjectExtractor.CreateWithSoftwareBitmapAsync(Windows.Graphics.Imaging.SoftwareBitmap) 메서드

public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageObjectExtractor> CreateWithSoftwareBitmapAsync (Windows.Graphics.Imaging.SoftwareBitmap softwareBitmap);
매개 변수
softwareBitmap
반품

ImageObjectExtractor.GetImageBufferObjectMask(Microsoft.Graphics.Imaging.ImageObjectExtractorHint) 메서드

public Microsoft.Graphics.Imaging.ImageBuffer GetImageBufferObjectMask (Microsoft.Graphics.Imaging.ImageObjectExtractorHint hint);
매개 변수
hint
반품

ImageObjectExtractor.GetSoftwareBitmapObjectMask(Microsoft.Graphics.Imaging.ImageObjectExtractorHint) 메서드

public Windows.Graphics.Imaging.SoftwareBitmap GetSoftwareBitmapObjectMask (Microsoft.Graphics.Imaging.ImageObjectExtractorHint hint);
매개 변수
hint
반품

ImageObjectExtractor.IsAvailable 메서드

public static bool IsAvailable ();
반품

ImageObjectExtractor.MakeAvailableAsync 메서드

public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
반품

ImageObjectExtractorHint 클래스

public sealed class ImageObjectExtractorHint

ImageObjectExtractorHint.ExcludePoints 속성

public System.Collections.Generic.IReadOnlyList<Windows.Graphics.PointInt32> ExcludePoints { get; }
속성 값

ImageObjectExtractorHint.#ctor(Windows.Foundation.Collections.IVector{Windows.Graphics.RectInt32},Windows.Foundation.Collections.IVector{Windows.Graphics.PointInt32},Windows.Foundation.Collections.IVector{Windows.Graphics.PointInt32}) 생성자

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);
매개 변수
includeRects
포인트 포함
점수 제외

ImageObjectExtractorHint.IncludePoints 속성

public System.Collections.Generic.IReadOnlyList<Windows.Graphics.PointInt32> IncludePoints { get; }
속성 값

ImageObjectExtractorHint.IncludeRects 속성

public System.Collections.Generic.IReadOnlyList<Windows.Graphics.RectInt32> IncludeRects { get; }
속성 값

ImageScaler 클래스

public sealed class ImageScaler : System.IDisposable

ImageScaler.Close 메서드

// This member is not implemented in C#
비고

C#에서 구현되지 않았습니다.

ImageScaler.CreateAsync 메서드

public static Windows.Foundation.IAsyncOperation<Microsoft.Graphics.Imaging.ImageScaler> CreateAsync ();
반품

ImageScaler.IsAvailable 메서드

public static bool IsAvailable ();
반품

ImageScaler.MakeAvailableAsync 메서드

public static Windows.Foundation.IAsyncOperationWithProgress<Microsoft.Windows.Management.Deployment.PackageDeploymentResult,Microsoft.Windows.Management.Deployment.PackageDeploymentProgress> MakeAvailableAsync ();
반품

ImageScaler.MaxSupportedScaleFactor 속성

public int MaxSupportedScaleFactor { get; }
속성 값

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);
매개 변수
imageBuffer
너비
높이
반품

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);
매개 변수
softwareBitmap
너비
높이
반품

PixelFormat 열거형

public enum PixelFormat

기본 비트맵 데이터의 이진 레이아웃 유형을 지정합니다.

열거형 필드
정의되지 않음: 0

이진 형식이 정의되지 않았습니다.

Rgb24: 1

이진 형식은 픽셀당 24비트입니다. 각각 8비트가 빨간색, 녹색 및 파란색 구성 요소에 사용됩니다.

Argb32: 2

이진 형식은 픽셀당 32비트입니다. 각각 8비트가 알파, 빨강, 녹색 및 파랑 구성 요소에 사용됩니다.

Rgba32: 3

이진 형식은 픽셀당 32비트입니다. 각각 8비트가 빨간색, 녹색, 파랑 및 알파 구성 요소에 사용됩니다. 색 구성 요소는 빨강, 녹색, 파랑 및 알파 순서로 저장됩니다.

Bgra32: 4

이진 형식은 픽셀당 32비트입니다. 각각 8비트가 파란색, 녹색, 빨간색 및 알파 구성 요소에 사용됩니다. 색 구성 요소는 파란색, 녹색, 빨간색 및 알파 순서로 저장됩니다.

회색8: 5

이진 형식은 픽셀당 16비트입니다. 색 정보는 회색 65536 음영을 지정합니다.