Google is committed to advancing racial equity for Black communities. See how.

GoogleARCore.AugmentedImageDatabase

A database storing a list of images to be detected and tracked by ARCore.

Summary

An image database supports up to 1000 images. Only one image database can be in use at any given time.

Inheritance

Inherits from: ScriptableObject

Constructors and Destructors

AugmentedImageDatabase()
Constructs a new AugmentedImageDatabase.

Properties

Count
int
Gets the number of images in the database.
this[int index]
Gets or sets the image at the specified index.

Public functions

AddImage(string name, Texture2D image, float width)
int
Deprecated. Please use another 'AddImage' instead.
Adds an image to this database.
AddImage(string name, AugmentedImageSrc imageSrc, float width)
int
Adds an image to this database.

Properties

Count

int Count

Gets the number of images in the database.

this[int index]

AugmentedImageDatabaseEntry this[int index]

Gets or sets the image at the specified index.

You can only modify the database in the Unity editor.

Details
Parameters
index
The zero-based index of the image entry to get or set.
Returns
The image entry at index.

Public functions

AddImage

int AddImage(
  string name,
  Texture2D image,
  float width
)

Adds an image to this database.

This function takes time to perform non-trivial image processing (20ms - 30ms), and should be run on a background thread.

Deprecated. Please use another 'AddImage' instead.

Details
Parameters
name
The name of the image.
image
The image to be added.
width
The physical width of the image in meters, or 0 if the width is unknown.
Returns
The index of the added image in this database or -1 if there was an error.

AddImage

int AddImage(
  string name,
  AugmentedImageSrc imageSrc,
  float width
)

Adds an image to this database.

This function takes time to perform non-trivial image processing (20ms - 30ms), and should be run on a background thread.

Details
Parameters
name
The name of the image.
imageSrc
Source image to be added.
width
The physical width of the image in meters, or 0 if the width is unknown.
Returns
The index of the added image in this database or -1 if there was an error.

AugmentedImageDatabase

 AugmentedImageDatabase()

Constructs a new AugmentedImageDatabase.