UGoogleARCoreAugmentedImageDatabase
#include <GoogleARCoreAugmentedImageDatabase.h>
A collection of processed images for ARCore to track.
Summary
Deprecated. Please use the ARCandidateImage list in UARSessionConfig instead.
Inheritance
Inherits from: UDataAsset
Public attributes |
|
---|---|
Entries
|
TArray< FGoogleARCoreAugmentedImageDatabaseEntry >
The individual instances of FGoogleARCoreAugmentedImageDatabaseEntry objects.
|
SerializedDatabase
|
TArray< uint8 >
The serialized database, in the ARCore augmented image database serialization format.
|
Public functions |
|
---|---|
AddRuntimeAugmentedImage(const TArray< uint8 > & ImageGrayscalePixels, int ImageWidth, int ImageHeight, FName ImageName, float ImageWidthInMeter, UTexture2D *ImageTexture)
|
int
Adds a single named image from raw byte to this AugmentedImage database.
|
AddRuntimeAugmentedImageFromTexture(UTexture2D *ImageTexture, FName ImageName, float ImageWidthInMeter)
|
int
Adds a single named image from the a UTexture2D to this AugmentedImageDatabase.
|
Serialize(FArchive & Ar) override
|
virtual void
Overridden serialization function.
|
Public attributes
Entries
TArray< FGoogleARCoreAugmentedImageDatabaseEntry > Entries
The individual instances of FGoogleARCoreAugmentedImageDatabaseEntry objects.
SerializedDatabase
TArray< uint8 > SerializedDatabase
The serialized database, in the ARCore augmented image database serialization format.
Public functions
AddRuntimeAugmentedImage
int AddRuntimeAugmentedImage( const TArray< uint8 > & ImageGrayscalePixels, int ImageWidth, int ImageHeight, FName ImageName, float ImageWidthInMeter, UTexture2D *ImageTexture )
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.
AddRuntimeAugmentedImageFromTexture
int AddRuntimeAugmentedImageFromTexture( UTexture2D *ImageTexture, FName ImageName, float ImageWidthInMeter )
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.
Serialize
virtual void Serialize( FArchive & Ar ) override
Overridden serialization function.