print_quality op• 数据种类:image2d → table
• 调用: import fullseye as fs; fs.ledger.grade_datacode2d(image, symbology='auto', *, aperture_x=0.8, expected_text=None)(要直接调用实现,import symgrade; symgrade.grade_datacode2d(image, symbology='auto', *, aperture_x=0.8, expected_text=None);从台账取用则 opssymbol.get("grade_datacode2d"))
• GPU:无(仅 CPU 参考实现)
返回图像中二维符号(QR / Data Matrix)的印刷质量等级(table)。
> 以下的详细说明为原文 —— 摘要与标题已翻译。
Grade a QR Code or Data Matrix in a reflectance image. The symbol is read (qrsym.qr_read / dmsym.dm_read), the image is filtered with a circular measuring aperture of aperture_x · X (default 0.8 X) and sampled at every module centre through the reader's homography, plus a one-module ring of quiet zone.
• symbol_contrast SC = Rmax − Rmin over those samples; GT = Rmin + SC / 2.
• module modulation 2·|R − GT| / SC; a module on the wrong side of GT (compared with the *ideal* module rebuilt from the decoded data) is graded 0. A codeword's grade is its worst module; the modulation grade is the highest level L such that the codewords graded below L, counted as errors, still leave unused error correction of grade ≥ L in every block (the error-correction rule of the 2-D method, as publicly described).
• fixed_pattern_damage: the worst module grade over the fixed patterns (QR: finders, separators, timing, alignment; Data Matrix: the L finder, the clock track and alignment patterns) and the quiet-zone ring. ★Simplified: one dull module of a finder limits it (the published method grades finder segments separately).
• the grid: the reader's homography is re-fitted (normalised DLT, twice) to every module edge measured along all rows and columns (sub-sample GT crossings within 0.45 module of an ideal dark/light boundary), so that the reader's own fit error is not graded as print non-uniformity (grid_refined).
• axial_nonuniformity = |X̄ − Ȳ| / ((X̄ + Ȳ)/2) of the mean module pitch along the two grid axes in pixels (the fitted grid: a tilt about one axis shows up here).
• grid_nonuniformity = the largest distance (modules) between a timing-pattern module centre located from its own edges and the fitted projective grid.
• unused_error_correction = min over blocks of 1 − 2·e / (n_ec − p) with the decoder's corrected-codeword count e and the misdecode-protection codewords p (QR 1-L/M/Q, 2-L, 3-L; 0 for Data Matrix).
• decode: 4 if read (and equal to expected_text when given), else 0.
overall_grade = the minimum parameter grade (0..4), letter, limiting. ideal_source says how the ideal modules were obtained ("reencode": the decoded text re-encoded with the same version / level / mask / mode reproduced the read; "codewords" (Data Matrix): rebuilt from the corrected codewords; "sampled": neither was possible, the thresholded samples stand in and wrong-side modules cannot be seen — modulation is then optimistic, flagged).
限界 / limits: 反射率は画像の値のまま、開口は円。Data Matrix 144x144 の不揃いなブロックのブロック割り当ては近似。鏡像の QR は読み取り器の格子(転置)で採点する。
空の入力は ValueError。拒否(ValueError): 2-D でない、非有限、未知の symbology、aperture_x が [0, 2] の外。読めないシンボルは例外にせず overall_grade = 0、decode = False (検証器が F を付けるのと同じ。読めない理由は error)。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• poc_symbol_part_dpm — py -3.11 examples/poc_symbol_part_dpm.py
table 作为输入)render_symbol · symbol_read_trials · symbol_read_pod · ocr_classify · ocr_read_line · ocr_read_trials
print_quality)grade_barcode_profile · grade_barcode1d
*Provenance: symgrade.py — SYMBOL 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.