UGoogleARCoreAugmentedImageDatabase::AddRuntimeAugmentedImageFromTexture

Adds a single named image from the a [UTexture2D](API\Runtime\Engine\Engine\UTexture2D) to this AugmentedImageDatabase.

Windows
MacOS
Linux

Deprecated

References

Module

GoogleARCoreBase

Header

/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreBase/Public/GoogleARCoreAugmentedImageDatabase.h

Include

#include "GoogleARCoreAugmentedImageDatabase.h"

Source

/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreBase/Private/GoogleARCoreAugmentedImageDatabase.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="google arcore augmentedimages")
int AddRuntimeAugmentedImageFromTexture
(
    UTexture2D * ImageTexture,
    FName ImageName,
    float ImageWidthInMeter
)

Remarks

Adds a single named image from the a UTexture2D to this AugmentedImageDatabase. This function will add a FGoogleARCoreAugmentedImageDatabaseEntry to the Entries property of this AugmentedImageDatabase.

You need to restart the ARCore session with the config that contains this AugmentedImageDatabase to make track those new images.

You can set the ImageWidthInMeter value if the physical size of the image is known. This will help ARCore estimate the pose of the physical image as soon as ARCore detects the physical image. Otherwise, ARCore will requiring the user to move the device to view the physical image from different viewports.

Note that this function takes time to perform non-trivial image processing (20ms - 30ms), and should be run on a background thread.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss