Răsfoiți Sursa

Merge branch 'ZIM-DEV' into DEV-旧版UI

ZIM 11 luni în urmă
părinte
comite
e7f1782433

+ 2 - 0
Assets/InfraredProject/WebCamera/Script/ZIM/InfraredLocate/ScreenIdentification.cs

@@ -1008,6 +1008,8 @@ namespace o0.Project
             float estimateGradient(LineIdentified line, float distanceRatio)
             {
                 var gM = ScreenGrad(line);
+                if (line.Batch > 0)       // 其他batch的图,梯度权重小
+                    gM /= 3;
                 float e = (float)Math.Sqrt(Math.Ceiling(line.Line.Length / minLength));       // 长度系数,筛选时梯度更大、长度更长的线段更优
                 float d = (10f - distanceRatio * distanceRatio) / 10f;             // 距离系数,距离越近,系数越大
                 line.ZIMGradient = e * gM + d;      // 记录一下综合梯度,新增的识别黑边功能会二次使用