Module |
|
Header |
/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreBase/Public/GoogleARCoreFunctionLibrary.h |
Include |
#include "GoogleARCoreFunctionLibrary.h" |
Source |
/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreBase/Private/GoogleARCoreFunctionLibrary.cpp |
[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="AR AugmentedReality|Session",
Meta=(Keywords="ar augmentedreality augmented reality candidate image"))
static UARCandidateImage * AddRuntimeCandidateImageFromRawbytes
(
UARSessionConfig * SessionConfig,
const TArray< uint8 > & ImageGrayscalePixels,
int ImageWidth,
int ImageHeight,
FString FriendlyName,
float PhysicalWidth,
UTexture2D * CandidateTexture
)
Create an ARCandidateImage object from the raw pixel data and add it to the ARCandidateImageList of the given `UARSessionConfig_ object.
that you need to restart the AR session with the `UARSessionConfig_ you are adding to to make the change take effect. On ARCore platform, you can leave the PhysicalWidth and PhysicalHeight to 0 if you don't know the physical size of the image or the physical size is dynamic. And this function takes time to perform non-trivial image processing (20ms - 30ms), and should be run on a background thread.
A `UARCandidateImage_ Object pointer if the underlying ARPlatform added the candidate image at runtime successfully. Return nullptr otherwise.