Package com.digimarc.dms.readers
Class ReaderOptions
java.lang.Object
com.digimarc.dms.readers.ReaderOptions
- Direct Known Subclasses:
ReaderOptionsExtended
ReaderOptions allows an application to set options within a reader object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
In Far Distance mode traditional barcode reading is tuned for reading codes farther away from the device.static final String
In Full_Range mode traditional barcode reading can read codes at a range of 3-48 inches from the device.static final String
In Near Distance mode traditional barcode reading is tuned for reading codes closer to the device.static final String
By default frames where a symbology was found are stored temporarily to allow the application to access and save the image if it desires.static final String
Configures anImageReader
orVideoCaptureReader
to search for Digimarc Barcodes on plastic substrates.static final String
InvertedBarcodeInterval sets how frequently an image reader (ImageReader
orVideoCaptureReader
) will attempt to read an inverted barcode.static final String
Sets the minimum barcode length for reading ITF barcodes.static final String
Traditional barcode read distance
Values:
Distance_Near
- Near distance reading (default).
Distance_Far
- Far distance reading.
Distance_FullRange
- Full range (near and far) distance reading. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getIntegerValue
(ReaderOptions options, String key, int defaultValue) Get an integer value from the options dictionary.getKeys()
Get the key set from the ReaderOptions object.static String
getStringValue
(ReaderOptions options, String key, String defaultValue) Get the value associated with a given key.static boolean
isOptionPresent
(ReaderOptions options, String optionName) Checks the provided options dictionary for the specified name.static boolean
isOptionSet
(ReaderOptions options, String optionName, String optionValue) Checks the provided options dictionary for the specified name-value pair.void
Stores a key value pair in the options dictionary.void
Stores a key value pair in the options dictionary.
-
Field Details
-
InvertedBarcodeInterval
InvertedBarcodeInterval sets how frequently an image reader (ImageReader
orVideoCaptureReader
) will attempt to read an inverted barcode.Values:
"0" - Disables inverted reading (Default)
"1" - Every frame is read as inverted
"2" - Every other frame is read as inverted
"3" - Every third frame is read as inverted
etc.- See Also:
-
EnableImageFrameStorage
By default frames where a symbology was found are stored temporarily to allow the application to access and save the image if it desires. The image frames are generally used by apps as thumbnails as associated with the read results. The EnableImageFrameStorage option allows an application to turn off this frame storage. This can save on runtime memory usage and on some lower end devices this may improve performance.Values:
"0" - Off. Frames storage disabled.
"1" - On. Frame storage enabled (default).- See Also:
-
TraditionalBarcodeReadDistance
Traditional barcode read distance
Values:
Distance_Near
- Near distance reading (default).
Distance_Far
- Far distance reading.
Distance_FullRange
- Full range (near and far) distance reading.- See Also:
-
ITF_BarcodeMinLength
Sets the minimum barcode length for reading ITF barcodes. ITF barcodes containing fewer characters than this length will not be decoded. Be aware that decreasing the minimum code length can increase the chance of a misread. The default value is 10.
Constraints:
- The length cannot be less than 8.
- The length cannot be greater than the ITF maximum length (24).
- The value must be even.- See Also:
-
EnablePlasticsReading
Configures anImageReader
orVideoCaptureReader
to search for Digimarc Barcodes on plastic substrates. Enabling this option increases processing overhead.EnablePlasticsReading does not support bitmap reading.
Values:
"0" - Off. Plastics reading disabled (default).
"1" - On. Plastics reading enabled.- See Also:
-
Distance_Near
In Near Distance mode traditional barcode reading is tuned for reading codes closer to the device. This mode works best when the code is 3-12 inches from the device.- See Also:
-
Distance_Far
In Far Distance mode traditional barcode reading is tuned for reading codes farther away from the device. This mode works best when the code is 12-48 inches from the device. This mode requires 4K camera resolution (3840x2160) for best read robustness. When the mode is enabled theManager.getRecommendedResolution(int)
method will return this resolution or a similar one appropriate for the handset.- See Also:
-
Distance_FullRange
In Full_Range mode traditional barcode reading can read codes at a range of 3-48 inches from the device. This mode requires 4K camera resolution (3840x2160) for best read robustness. When the mode is enabled theManager.getRecommendedResolution(int)
method will return this resolution or a similar one appropriate for the handset.Note that this mode uses more processing power. This mode is not recommended for most use cases.
- See Also:
-
-
Constructor Details
-
ReaderOptions
public ReaderOptions()
-
-
Method Details
-
getKeys
Get the key set from the ReaderOptions object.- Returns:
- Set of Strings containing all of the available keys.
-
getValue
Get the value associated with a given key.- Parameters:
key
- Key to search for.- Returns:
- Value associated with the key or null if the key is not present.
-
setValue
Stores a key value pair in the options dictionary.- Parameters:
key
- Keyvalue
- String value
-
setValue
Stores a key value pair in the options dictionary. Note that the integer value specified will be stored as a string internally.- Parameters:
key
- Keyvalue
- Integer value
-
isOptionPresent
Checks the provided options dictionary for the specified name.- Parameters:
options
- Options dictionary.optionName
- Options value name to lookup.- Returns:
- Was the named value present?
-
isOptionSet
public static boolean isOptionSet(@Nullable ReaderOptions options, @NonNull String optionName, @NonNull String optionValue) Checks the provided options dictionary for the specified name-value pair.- Parameters:
options
- Options dictionary.optionName
- Options value name to lookup.optionValue
- Value needed for a true result.- Returns:
- Was the named value present and did the stored value match our optionValue parameter?
-
getIntegerValue
public static int getIntegerValue(@Nullable ReaderOptions options, @NonNull String key, int defaultValue) Get an integer value from the options dictionary.- Parameters:
options
- Options dictionary.key
- Options value name to lookup.defaultValue
- Default value.- Returns:
- The stored value will be returned if present in the options dictionary. The default value will be returned if either the dictionary is null or the key is not found in the dictionary.
-
getStringValue
@NonNull public static String getStringValue(@Nullable ReaderOptions options, @NonNull String key, @NonNull String defaultValue)
-