Text Capture Settings#

Defined in package com.scandit.datacapture.text.capture

class TextCaptureSettings

Added in version 6.1.0

Loads the text capture configuration and holds all the text recognition related settings, such as text selection area. To use the settings, use them when creating a text capture instance.

static @Nullable TextCaptureSettings fromJson(@NonNull String json)

Added in version 6.1.0

Construct a new text capture settings with the provided JSON string. The JSON contains the necessary configuration for the text capture back-end.

For details about the format of the JSON check Text Capture Settings’s JSON Structure.

@NonNull TimeInterval getDuplicateFilter()
void setDuplicateFilter(@NonNull TimeInterval value)

Added in version 6.1.0

Determines the time interval in which captured texts with the same value are filtered out as duplicates. By default, when the same text is captured in consecutive frames, it is reported again as a new recognition. Use this property to change the interval or completely turn off duplicate filtering:

  • Setting this property to value smaller than zero, means that the same text will not be reported again until the capturing session has been stopped.

  • Setting this property to a value of zero means that the same text will be reported every time it is found.

  • Setting this property to a value larger than zero indicates the time that must pass between the same text to be reported again.

@Nullable LocationSelection getLocationSelection()
void setLocationSelection(@Nullable LocationSelection value)

Added in version 6.1.0

Defines the strategy with which to select one out of many visible texts. See Scan Area Guide. By default, this property is null and text selection is disabled.

Direction getRecognitionDirection()
void setRecognitionDirection(Direction value)

Added in version 6.1.0

The recognition direction tells text capture in what direction text is expected.

setProperty(name, value)#
void setProperty(@NonNull String name,
        @NonNull Object value)

Added in version 6.3.0

Sets a property to the provided value. Use this method to set properties that are not yet part of a stable API. Properties set through this method may change in a future release.

@NonNull Object getProperty(@NonNull String name)

Added in version 6.3.0

Retrieves the value of a previously set property. In case the property does not exist, null is returned. Use this method to get properties that are not yet part of a stable API. These properties may change in a future release.

void updateFromJson(@NonNull String jsonData)

Added in version 6.3.0

Updates the settings according to a JSON serialization. See Serialization for details.