Navigation
API > API/Plugins > API/Plugins/GoogleARCoreBase > API/Plugins/GoogleARCoreBase/UGoogleARCoreSessionFunctionLibr-
References
| Module | GoogleARCoreBase |
| 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&40;BlueprintCallable, Category&61;"AR AugmentedReality&124;Session",
Meta&61;&40;Keywords&61;"ar augmentedreality augmented reality candidate image"&41;&41;
static UARCandidateImage &42; AddRuntimeCandidateImageFromRawbytes
&40;
UARSessionConfig &42; SessionConfig,
const TArray< uint8 > & ImageGrayscalePixels,
int ImageWidth,
int ImageHeight,
FString FriendlyName,
float PhysicalWidth,
UTexture2D &42; CandidateTexture
&41;
Remarks
Create an ARCandidateImage object from the raw pixel data and add it to the ARCandidateImageList of the given `UARSessionConfig_ object.
Note 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.