unreal.GoogleARCoreSessionFunctionLibrary¶
- class unreal.GoogleARCoreSessionFunctionLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryA function library that provides static/Blueprint functions associated with GoogleARCore session.
C++ Source:
Plugin: GoogleARCore
Module: GoogleARCoreBase
File: GoogleARCoreFunctionLibrary.h
- classmethod add_runtime_candidate_image_from_rawbytes(session_config, image_grayscale_pixels, image_width, image_height, friendly_name, physical_width, candidate_texture=None) ARCandidateImage¶
Create an ARCandidateImage object from the raw pixel data and add it to the ARCandidateImageList of the given c UARSessionConfig object.
Note that you need to restart the AR session with the c 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.
- Parameters:
session_config (ARSessionConfig)
image_grayscale_pixels (Array[uint8])
image_width (int32)
image_height (int32)
friendly_name (str)
physical_width (float)
candidate_texture (Texture2D)
- Returns:
A c UARCandidateImage Object pointer if the underlying ARPlatform added the candidate image at runtime successfully. Return nullptr otherwise.
- Return type: