variation op• 数据种类:image2d × table → table
• 调用: import fullseye as fs; fs.ledger.varmodel_score(image, model, mask=None, align='check')(要直接调用实现,import varmodel; varmodel.varmodel_score(image, model, mask=None, align='check');从台账取用则 opsspc.get("varmodel_score"))
将一张图像与 varmodel_fit 的模型比较:以 σ 计的 z 图、带外图与逐区域说明(table)。
> 以下的详细说明为原文 —— 摘要与标题已翻译。
z = (image - center) / spread on valid pixels (0 elsewhere); a pixel is out of band when |z| > k. Out-of-band pixels are grouped into 8-connected regions; each region reports area, peak_z (signed, the largest |z|), mean_abs_z, polarity (bright / dark / mixed), centroid (row, col), bbox (r0, c0, r1, c1, exclusive end) and peak_pos; regions are sorted by |peak_z| (rounded to 1e-9, ties by label order). Also returns z, exceed, valid (scored pixels, image grid), n_exceed, n_valid, k, far, expected_false = far * n_valid and count_pvalue = P(Binomial(n_valid, far) >= n_exceed) — that p-value assumes independent pixels and is optimistic for spatially correlated noise (reported, not used to decide).
Alignment: the image's translation against the model centre is measured as in varmodel_alignment and returned as offset. align="check" REFUSES an image displaced by more than the model's max_misalign_px; align="translate" registers it to the model by a Fourier shift, computes z in model coordinates and maps z / exceed back onto the image grid by the rounded offset (the wrapped border is invalid), so the maps line up with masks drawn on the original image. mask is on the image grid.
Raises ValueError when image is empty / not 2-D / non-finite, its shape differs from the model, model lacks the fitted keys, mask has the wrong shape, align is unknown, or the image is misaligned (check) / displaced by more than a quarter of the image (translate).
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• poc_good_sample_variation_model — py -3.11 examples/poc_good_sample_variation_model.py
• poc_patch_anomaly — py -3.11 examples/poc_patch_anomaly.py
table 作为输入)msa_anova_table · msa_gauge_rr · msa_bias_linearity · msa_attribute_agreement · gum_standard_uncertainty · gum_propagate · gum_expanded · gum_monte_carlo
variation)varmodel_alignment · varmodel_band_k · varmodel_fit · varmodel_calibrate
*Provenance: varmodel.py — SPC 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.