Summary
AR_MATRIX_CODE_GLOBAL_ID matrix decoding is not implemented; consequently ARMarkerInfo::global_id is never populated.
Environment
Reproduction Steps
- Configure the pipeline with
matrix_code_type = ARMatrixCodeType::GlobalID (if/when present in the enum) or any code type that upstream ARToolKit treats as global-ID.
- Run detection against a global-ID marker.
- Inspect
marker.global_id on the resulting ARMarkerInfo.
Expected Behavior
Per include/AR/ar.h:214:
globalID — If arPattDetectionMode is a matrix mode, matrixCodeType is AR_MATRIX_CODE_GLOBAL_ID, and idMatrix >= 0, will contain the globalID.
C populates this via arPattGetIDGlobal as one of the out-params at arGetMarkerInfo.c:80. ARMulti uses it explicitly at arMultiGetTransMat.c:96-98 and arMultiReadConfigFile.c:92-113 to dispatch on a 64-bit global identifier.
Actual Behavior
crates/core/src/ar/matrix.rs:529-532 explicitly punts on the variant:
_ => {
// The unhandled types include GLOBAL_ID, etc.
Ok((code_raw as i32, 0))
}
ar_get_marker_info therefore has no value to write into marker_info[j].global_id, and the field remains 0 (its Default::default() value).
Source References
Impact
Medium-Low — only affects users who would otherwise want to use AR_MATRIX_CODE_GLOBAL_ID (a 64-bit identifier scheme). Users on AR_MATRIX_CODE_3x3, 4x4_BCH_*, 5x5_BCH_* are unaffected. Blocks any future port of ARMulti's global-ID path.
Suggested Approach
This is genuinely a missing feature, not just plumbing:
- Decide whether
AR_MATRIX_CODE_GLOBAL_ID should be added as an explicit ARMatrixCodeType variant (currently swallowed by the _ => arm).
- Port the C decoding (encoding is described at
arGetMarkerInfo.c and helpers in lib/SRC/AR/arPattGetID.c).
- Plumb the resulting
u64 out of ar_matrix_code_get_id and write it into marker_info[j].global_id in ar_get_marker_info.
- Add unit tests with hand-crafted global-ID bit patterns from upstream test data, if available.
Recommend treating this as its own work item — do not bundle it with the cutoff_phase plumbing issue, the scope is qualitatively different.
Additional Context
Labels suggested: enhancement, area:matrix-code, help-wanted.
Priority: Low (no current consumer in the repo blocked).
Summary
AR_MATRIX_CODE_GLOBAL_IDmatrix decoding is not implemented; consequentlyARMarkerInfo::global_idis never populated.Environment
crates/core/src/ar/matrix.rs,crates/core/src/ar/marker.rsReproduction Steps
matrix_code_type = ARMatrixCodeType::GlobalID(if/when present in the enum) or any code type that upstream ARToolKit treats as global-ID.marker.global_idon the resultingARMarkerInfo.Expected Behavior
Per
include/AR/ar.h:214:C populates this via
arPattGetIDGlobalas one of the out-params atarGetMarkerInfo.c:80. ARMulti uses it explicitly atarMultiGetTransMat.c:96-98andarMultiReadConfigFile.c:92-113to dispatch on a 64-bit global identifier.Actual Behavior
crates/core/src/ar/matrix.rs:529-532explicitly punts on the variant:ar_get_marker_infotherefore has no value to write intomarker_info[j].global_id, and the field remains0(itsDefault::default()value).Source References
https://github.com/webarkit/WebARKitLib/blob/master/lib/SRC/AR/arGetMarkerInfo.c#L80
https://github.com/webarkit/WebARKitLib/blob/master/include/AR/ar.h#L214
crates/core/src/ar/matrix.rs:529-532Impact
Medium-Low — only affects users who would otherwise want to use
AR_MATRIX_CODE_GLOBAL_ID(a 64-bit identifier scheme). Users onAR_MATRIX_CODE_3x3,4x4_BCH_*,5x5_BCH_*are unaffected. Blocks any future port of ARMulti's global-ID path.Suggested Approach
This is genuinely a missing feature, not just plumbing:
AR_MATRIX_CODE_GLOBAL_IDshould be added as an explicitARMatrixCodeTypevariant (currently swallowed by the_ =>arm).arGetMarkerInfo.cand helpers inlib/SRC/AR/arPattGetID.c).u64out ofar_matrix_code_get_idand write it intomarker_info[j].global_idinar_get_marker_info.Recommend treating this as its own work item — do not bundle it with the
cutoff_phaseplumbing issue, the scope is qualitatively different.Additional Context
cutoff_phasefollow-up issue.marker_info2_ptrwas also unpopulated, but matches upstream behavior (C never sets it either) — that one is not a bug.Labels suggested:
enhancement,area:matrix-code,help-wanted.Priority: Low (no current consumer in the repo blocked).