Compartir a través de


ObjectObserver Class

Declaration

struct winrt::Microsoft::Azure::ObjectAnchors::ObjectObserver

Description

An object observer detects and tracks multiple object instances simultaneously based on a list of user-provided object models.By default it looks for object within a moving sphere centered at current head location. User can explicitly specify a search area that contains one or multiple objects or provide more accurate location hint per object model to improve the performance.

Methods

DetectAsync

Detects object instances of a single model with the given query parameters.

Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<::winrt::Microsoft::Azure::ObjectAnchors::ObjectInstance>> DetectAsync(winrt::Microsoft::Azure::ObjectAnchors::ObjectQuery const& query);

Parameters

  • query - An object query.

Returns

  • Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<::winrt::Microsoft::Azure::ObjectAnchors::ObjectInstance>> - System.Threading.Tasks.Task`1.

DetectAsync

Detects object instances of multiple models with the given query parameters.

Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<::winrt::Microsoft::Azure::ObjectAnchors::ObjectInstance>> DetectAsync(winrt::array_view<winrt::Microsoft::Azure::ObjectAnchors::ObjectQuery const> queries);

Parameters

  • queries - An array of object queries.

Returns

  • Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<::winrt::Microsoft::Azure::ObjectAnchors::ObjectInstance>> - System.Threading.Tasks.Task`1.

Dispose

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

void Dispose();

IsSupported

Returns true if this feature is supported on this platform and device.

static bool IsSupported();

Returns

  • bool

LoadObjectModelAsync

Load an object model for detecting its instance.

Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::ObjectModel> LoadObjectModelAsync(winrt::array_view<unsigned char const> buffer);

Parameters

  • buffer - Byte array of an object model blob.

Returns

  • Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::ObjectModel> - System.Threading.Tasks.Task`1.

RequestAccessAsync

Requests access to this feature and returns access status.

static Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::ObjectObserverAccessStatus> RequestAccessAsync();

Parameters

Returns

  • Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::ObjectObserverAccessStatus>