js-stackar is a fork of js-aruco2 that supports custom dictionary for square markers. Additionally, this library includes a custom AR marker editor for creating custom AR marker dictionary for various interaction.
100% JavaScript (see details bellow):
A square grid with an external unused black border. Internal cells contains id information.
Create a Custom.js
file in the src/dictionaries
folder and paste the code generated by the Custom Marker Creator to use in demos.
//example of custom dictionary
AR.DICTIONARIES.MyDictionary = {
nBits: 25,
tau: 1,
codeList: ['0x1084210UL', '0x1084217UL', ...]
};
nBits
must contain the bit dimension of the markers in your dictionary.
tau
can contain the hamming distance of the codes in your dictionary (optional).
codeList
must be an array of strings containing the hexadecimal representation of every marker in your dictionary. The order is important because the position in the array represents the marker id.
The defined dictionary is then available to the detector:
var detector = new AR.Detector({
dictionaryName: 'MyDictionary'
});