|
|
@@ -662,10 +662,14 @@ namespace o0.Project
|
|
|
|
|
|
//var (edge, edgeDir) = ScreenLocateTexLightedMat.IdentifyEdge();
|
|
|
int conSize = (int)Math.Ceiling(0.007f * Size.y) * 2 + 1;
|
|
|
- Debug.Log($"[ScreenIdentification] Size: ({Size.x},{Size.y}), 卷积核Size: " + conSize);
|
|
|
+ float minLength = conSize * 1.2f;
|
|
|
+ conSize = Math.Max(conSize, 7); // 设置最小为7
|
|
|
+ minLength = Math.Max(conSize, 10); // 设置最小为10
|
|
|
+
|
|
|
+ minLength = locateIndex == -1 ? minLength : minLength * areaPercent; // minLength需要按比例缩小
|
|
|
+ Debug.Log($"[ScreenIdentification] Size: ({Size.x},{Size.y}), 卷积核Size: {conSize}, 最小线段长度: {minLength}");
|
|
|
var (edge, edgeDir) = ScreenLocateTexLightedMat.zimIdentifyEdgeGradientAny(conSize);
|
|
|
|
|
|
- var minLength = locateIndex == -1 ? 25 : 25 * areaPercent;
|
|
|
var quadLines = ScreenLocateTexLightedMat.ZIMIdentifyQuadLSD(edge, edgeDir, out Line[] oldLines, out List<Line> lightLines, Screen, conSize, conSize, minLength);
|
|
|
|
|
|
// 将识别到的边画出来,并判断能否拼成屏幕,能拼成则设置ScreenMap
|