fullseye

dm_decode_modules — SYMBOL datacode2d op

使い方

Data Matrix のモジュール格子(L 字とクロック込み、0/1)を復号し、訂正語数を返す(table)。

Decode an (R, C) 0/1 module matrix that includes the finder L and the clock track. The grid may be given in any of the 4 rotations, optionally mirrored; the orientation is found from the function pattern (solid L + clock) and, when the pattern alone is ambiguous (a square symbol and its anti-diagonal mirror share it), from which orientation passes Reed-Solomon.

Returns

dict text, rows, cols, n_corrected, block_corrected [int], block_ec [EC 語数], block_capacity [floor(n_ec/2)], finder_errors (機能 module の不一致数), codeword_index(正規化後の向き)、rotation (度、0/90/180/270)と mirrored: 正規化 = np.rot90(np.fliplr(g) if mirrored else g, rotation // 90)、modules(正規化後)、 codewords_raw / codewords(訂正前後、送出順)、encodations、 fixed_errors(右下固定 2x2 の不一致数、無ければ 0)。

Raises

ValueError 2-D でない・0/1 以外・NaN。 DMDecodeError どの向きでも対応する大きさにならない、機能パターンが崩れすぎ、RS 訂正不能、符号化の矛盾。

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(table を入力に取れる)

render_symbol · symbol_read_trials · symbol_read_pod · ocr_classify · ocr_read_line · ocr_read_trials

同カテゴリ(datacode2d)

qr_encode · qr_decode_modules · qr_locate · qr_sample · qr_read · dm_encode · dm_locate · dm_sample


Provenance: dmsym.py — SYMBOL operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.