修复注释乱码

This commit is contained in:
李伟
2026-04-14 17:11:31 +08:00
parent b8bcefc84b
commit cd03e30bb8
58 changed files with 761 additions and 767 deletions
@@ -1,21 +1,22 @@
// ============================================================================
// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
// 文件å? PointToLineProcessor.cs
// 文件名: PointToLineProcessor.cs
// 描述: 点到直线距离测量算子
// 功能:
// - 用户定义一条直线(两个端点)和一个测量点
// - 计算测é‡ç‚¹åˆ°ç›´çº¿çš„垂直è·ç¦?
// - 计算测量点到直线的垂直距离
// - 支持像素尺寸标定输出物理距离
// - 在图像上绘制直线、测量点、垂足和距离标注
// 算法: 点到直线距离公式
// 作è€? æŽä¼Ÿ wei.lw.li@hexagon.com
// 作者: 李伟 wei.lw.li@hexagon.com
// ============================================================================
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using XP.ImageProcessing.Core;
using Serilog;
using System.Drawing;
using XP.ImageProcessing.Core;
namespace XP.ImageProcessing.Processors;
@@ -31,7 +32,7 @@ public class PointToLineProcessor : ImageProcessorBase
protected override void InitializeParameters()
{
// 直线两端ç‚?+ 测é‡ç‚¹ï¼ˆç”±äº¤äº’控件注入)
// 直线两端点 + 测量点(由交互控件注入)
Parameters.Add("L1X", new ProcessorParameter("L1X", "L1X", typeof(int), 100, null, null, "") { IsVisible = false });
Parameters.Add("L1Y", new ProcessorParameter("L1Y", "L1Y", typeof(int), 200, null, null, "") { IsVisible = false });
Parameters.Add("L2X", new ProcessorParameter("L2X", "L2X", typeof(int), 400, null, null, "") { IsVisible = false });
@@ -79,7 +80,7 @@ public class PointToLineProcessor : ImageProcessorBase
if (abLen > 0.001)
{
// å‰ç§¯æ±‚è·ç¦?
// 叉积求距离
double cross = Math.Abs(abx * (l1y - py) - aby * (l1x - px));
pixelDistance = cross / abLen;
@@ -112,4 +113,4 @@ public class PointToLineProcessor : ImageProcessorBase
return inputImage.Clone();
}
}
}