新增 ROI 对齐基础能力并打通到算子与 UI。
统一补齐对齐核心工具类、RoiAlignment 算子、模板匹配对齐扩展和多语言资源,便于在检测前稳定完成示教 ROI 到运行图的变换。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,4 +24,19 @@ public static class TemplateMatchAlignmentExtensions
|
||||
result.LbX,
|
||||
result.LbY,
|
||||
tolerancePixels);
|
||||
|
||||
/// <summary>从 RotatedTemplateMatching 的 OutputData 读取测量位姿。</summary>
|
||||
public static bool TryReadMeasuredPose(
|
||||
IReadOnlyDictionary<string, object>? outputData,
|
||||
out Pose2D measuredPose,
|
||||
out string? errorMessage,
|
||||
int matchIndex = 0)
|
||||
=> TemplateMatchOutputReader.TryReadMeasuredPose(outputData, out measuredPose, out errorMessage, matchIndex);
|
||||
|
||||
/// <summary>用匹配结果 + 示教配方一步得到对齐后的 ROI。</summary>
|
||||
public static RoiAlignmentResult AlignRecipe(
|
||||
AlignmentRecipe recipe,
|
||||
IReadOnlyDictionary<string, object>? templateMatchOutput,
|
||||
int matchIndex = 0)
|
||||
=> RoiAlignmentApplier.ApplyFromTemplateMatchOutput(recipe, templateMatchOutput, matchIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user