AugmentedImageDatabase


public final class AugmentedImageDatabase


Database of target images used by the tracker via Config.augmentedImageDatabase.

Summary

Public constructors

Public methods

final int
addAugmentedImageDatabaseEntry(
    @NonNull AugmentedImageDatabaseEntryMode mode,
    @NonNull Bitmap bitmap,
    float widthInMeters
)

Adds a bitmap to the database as a tracking target.

final @NonNull AugmentedImageDatabase

Creates a copy of this AugmentedImageDatabase

boolean
equals(Object other)
final @NonNull List<@NonNull AugmentedImageDatabaseEntry>

the list of AugmentedImageDatabaseEntry objects currently in the database

int
@NonNull String

Returns a string representation of AugmentedImageDatabase for debugging.

Public constructors

AugmentedImageDatabase

Added in 1.0.0-beta02
public AugmentedImageDatabase()

Public methods

addAugmentedImageDatabaseEntry

Added in 1.0.0-beta02
public final int addAugmentedImageDatabaseEntry(
    @NonNull AugmentedImageDatabaseEntryMode mode,
    @NonNull Bitmap bitmap,
    float widthInMeters
)

Adds a bitmap to the database as a tracking target.

Parameters
@NonNull AugmentedImageDatabaseEntryMode mode

the mode used to detect the image

@NonNull Bitmap bitmap

the bitmap of the image in android.graphics.Bitmap.Config.ARGB_8888 format

float widthInMeters

the physical width of the image in meters. If zero, the physical width will be estimated if the device supports it. If physical size estimation is not supported, configuring the Session adding an entry with widthInMeters being 0f or lower will throw an IllegalArgumentException

Returns
int

the zero-based positional index of the image within the database

Throws
IllegalArgumentException

if the bitmap format is different from ARGB_8888

copy

Added in 1.0.0-beta02
public final @NonNull AugmentedImageDatabase copy()

Creates a copy of this AugmentedImageDatabase

Returns
@NonNull AugmentedImageDatabase

a new AugmentedImageDatabase instance with the same entries

equals

public boolean equals(Object other)

getEntries

Added in 1.0.0-beta02
public final @NonNull List<@NonNull AugmentedImageDatabaseEntrygetEntries()

the list of AugmentedImageDatabaseEntry objects currently in the database

hashCode

public int hashCode()

toString

public @NonNull String toString()

Returns a string representation of AugmentedImageDatabase for debugging.

Note: Not intended for production use.