Package com.digimarc.dms.readers
Class DataDictionary
java.lang.Object
com.digimarc.dms.readers.DataDictionary
DataDictionary is a map of strings to objects that is used to return arbitrary sets of data
to an application from a reader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Decode is a prefix that is added to a reader name to store a decoded payload in the dictionary.static final String
static final String
static final String
static final String
Distance from the center of the image detection region to the center of the code's ReadRegion as an exponential value.static final String
ReadRegion contains a set of points defining a bounding box around the decoded code.static final String
Rotation is a value produced by the Digimarc Barcode detector that indicates the angle of the decoded pattern relative to the camera.static final String
Scale is a value produced by the Digimarc Barcode detector that provides a general indication of how far away the image was from the camera. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Remove all entries from the dictionary.copy()
Creates a shallow copy of the dictionary.getKeys()
Get the key set from the DataDictionary object.getMap()
Get the full dictionary to operate on it as a usual Java Map object.Get the value associated with a given key.void
Stores a key value pair in the options dictionary.
-
Field Details
-
Scale
Scale is a value produced by the Digimarc Barcode detector that provides a general indication of how far away the image was from the camera. The actual meaning of the value is whether the decoded pattern was smaller or larger than expected. A scale of 1.0 means that they matched, while values < 1.0 indicate larger than expected (i.e. closer) and values > 1.0 indicate smaller (i.e. farther away.Type:
Double
- See Also:
-
Rotation
Rotation is a value produced by the Digimarc Barcode detector that indicates the angle of the decoded pattern relative to the camera. The value is in degrees.
Type:
Double
- See Also:
-
Decode
Decode is a prefix that is added to a reader name to store a decoded payload in the dictionary. Since dictionaries are used to return end of processing status as well as reads results we are storing a copy of each payload decoded along with the name of the reader it came from.
The key name will be in the form "Decode_xxx", where xxx is one of the following:
Decoder_ImageDigimarc
- Digimarc Barcode detector
Decoder_Barcode
- Traditional Barcode detector
Decoder_AudioDigimarc
- Digimarc Barcode for Audio detector
Type:
String
- See Also:
-
Decoder_ImageDigimarc
- See Also:
-
Decoder_Barcode
- See Also:
-
Decoder_AudioDigimarc
- See Also:
-
ReadRegion
ReadRegion contains a set of points defining a bounding box around the decoded code. Location information is supported for both Digimarc Barcode codes as well as traditional 1D and 2D barcodes.The region can be transformed into an Android
Path
object for display using theUtility.convertRegionPointsToPath(List)
method.Type:
List<Point>
- See Also:
-
DistanceFromCenterSquared
Distance from the center of the image detection region to the center of the code's ReadRegion as an exponential value. This value is in an undefined unit, and should only be treated as a general guide of which detects are closest to the center of the detection region. Smaller values are closer to the center of the detection region.Type:
Integer
- See Also:
-
-
Constructor Details
-
DataDictionary
public DataDictionary() -
DataDictionary
-
-
Method Details
-
getMap
Get the full dictionary to operate on it as a usual Java Map object.- Returns:
- The Java Map object backing up the dictionary.
-
getKeys
Get the key set from the DataDictionary 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
- Value
-
clear
public void clear()Remove all entries from the dictionary. -
copy
Creates a shallow copy of the dictionary.- Returns:
- New dictionary.
-