UGoogleARCoreAugmentedImageDatabase::AddRuntimeAugmentedImage

Adds a single named image from raw byte to this AugmentedImage database.

Windows
MacOS
Linux

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

int AddRuntimeAugmentedImage
(
    const TArray< uint8 > & ImageGrayscalePixels,
    int ImageWidth,
    int ImageHeight,
    FName ImageName,
    float ImageWidthInMeter,
    UTexture2D * ImageTexture
)

Remarks

Adds a single named image from raw byte to this AugmentedImage database. This function will add a FGoogleARCoreAugmentedImageDatabaseEntry to the Entries property of this AugmentedImageDatabase. The ImageAsset property in FGoogleARCoreAugmentedImageDatabaseEntry will be null.

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