手动标定原理示意图.drawio 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <mxfile host="app.diagrams.net" modified="2026-08-15T00:00:00.000Z" agent="opencode" version="24.7.17" type="device">
  2. <diagram id="calib-principle" name="手动标定原理">
  3. <mxGraphModel dx="1400" dy="820" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1400" pageHeight="820" math="0" shadow="0">
  4. <root>
  5. <mxCell id="0"/>
  6. <mxCell id="1" parent="0"/>
  7. <mxCell id="10" value="手动标定原理 —— 吊钩/吊耳归一化偏移(可以起吊判定基准)" style="text;html=1;align=center;verticalAlign=middle;fontSize=20;fontStyle=1;fontColor=#1f2d3d;" vertex="1" parent="1">
  8. <mxGeometry x="330" y="12" width="740" height="34" as="geometry"/>
  9. </mxCell>
  10. <mxCell id="20" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f4f7fb;strokeColor=#8ba7c9;dashed=1;verticalAlign=top;fontColor=#8ba7c9;" vertex="1" parent="1">
  11. <mxGeometry x="40" y="140" width="500" height="500" as="geometry"/>
  12. </mxCell>
  13. <mxCell id="21" value="AI 检测画面(单侧)" style="text;html=1;align=center;verticalAlign=middle;fontSize=13;fontStyle=1;fontColor=#8ba7c9;" vertex="1" parent="1">
  14. <mxGeometry x="150" y="148" width="300" height="20" as="geometry"/>
  15. </mxCell>
  16. <mxCell id="30" value="吊耳 lug" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f7ef;strokeColor=#1e9e5a;strokeWidth=2;verticalAlign=top;spacingTop=6;align=center;fontSize=13;fontStyle=1;fontColor=#1e9e5a;" vertex="1" parent="1">
  17. <mxGeometry x="110" y="410" width="140" height="140" as="geometry"/>
  18. </mxCell>
  19. <mxCell id="31" value="吊钩 hook" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fdeeee;strokeColor=#d64541;strokeWidth=2;verticalAlign=top;spacingTop=6;align=center;fontSize=14;fontStyle=1;fontColor=#d64541;" vertex="1" parent="1">
  20. <mxGeometry x="150" y="300" width="200" height="220" as="geometry"/>
  21. </mxCell>
  22. <mxCell id="32" value="" style="ellipse;fillColor=#1e9e5a;strokeColor=#1e9e5a;" vertex="1" parent="1">
  23. <mxGeometry x="176" y="476" width="8" height="8" as="geometry"/>
  24. </mxCell>
  25. <mxCell id="33" value="耳心 (lx, ly)" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#1e9e5a;" vertex="1" parent="1">
  26. <mxGeometry x="96" y="456" width="100" height="18" as="geometry"/>
  27. </mxCell>
  28. <mxCell id="34" value="" style="ellipse;fillColor=#d64541;strokeColor=#d64541;" vertex="1" parent="1">
  29. <mxGeometry x="246" y="406" width="8" height="8" as="geometry"/>
  30. </mxCell>
  31. <mxCell id="35" value="钩心 (hx, hy)" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#d64541;" vertex="1" parent="1">
  32. <mxGeometry x="228" y="330" width="110" height="18" as="geometry"/>
  33. </mxCell>
  34. <mxCell id="40" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  35. <mxGeometry x="180" y="480" width="2" height="2" as="geometry"/>
  36. </mxCell>
  37. <mxCell id="41" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  38. <mxGeometry x="250" y="480" width="2" height="2" as="geometry"/>
  39. </mxCell>
  40. <mxCell id="42" value="" style="endArrow=classic;startArrow=classic;endFill=1;startFill=1;html=1;rounded=0;strokeColor=#2f6fd0;strokeWidth=2;" edge="1" parent="1" source="40" target="41">
  41. <mxGeometry relative="1" as="geometry"/>
  42. </mxCell>
  43. <mxCell id="43" value="ΔX = 钩心X - 耳心X" style="text;html=1;align=center;verticalAlign=middle;fontSize=12.5;fontStyle=1;fontColor=#2f6fd0;" vertex="1" parent="1">
  44. <mxGeometry x="150" y="452" width="160" height="20" as="geometry"/>
  45. </mxCell>
  46. <mxCell id="44" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  47. <mxGeometry x="350" y="520" width="2" height="2" as="geometry"/>
  48. </mxCell>
  49. <mxCell id="45" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  50. <mxGeometry x="350" y="550" width="2" height="2" as="geometry"/>
  51. </mxCell>
  52. <mxCell id="46" value="" style="endArrow=classic;startArrow=classic;endFill=1;startFill=1;html=1;rounded=0;strokeColor=#2f6fd0;strokeWidth=2;" edge="1" parent="1" source="44" target="45">
  53. <mxGeometry relative="1" as="geometry"/>
  54. </mxCell>
  55. <mxCell id="47" value="ΔY = 钩底Y - 耳底Y" style="text;html=1;align=center;verticalAlign=middle;fontSize=12.5;fontStyle=1;fontColor=#2f6fd0;" vertex="1" parent="1">
  56. <mxGeometry x="352" y="525" width="200" height="20" as="geometry"/>
  57. </mxCell>
  58. <mxCell id="48" value="" style="rounded=0;fillColor=#d64541;strokeColor=#d64541;" vertex="1" parent="1">
  59. <mxGeometry x="150" y="519" width="200" height="2" as="geometry"/>
  60. </mxCell>
  61. <mxCell id="49" value="" style="rounded=0;fillColor=#1e9e5a;strokeColor=#1e9e5a;" vertex="1" parent="1">
  62. <mxGeometry x="110" y="549" width="140" height="2" as="geometry"/>
  63. </mxCell>
  64. <mxCell id="50" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  65. <mxGeometry x="110" y="565" width="2" height="2" as="geometry"/>
  66. </mxCell>
  67. <mxCell id="51" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  68. <mxGeometry x="250" y="565" width="2" height="2" as="geometry"/>
  69. </mxCell>
  70. <mxCell id="52" value="" style="endArrow=classic;startArrow=classic;endFill=1;startFill=1;html=1;rounded=0;strokeColor=#606266;strokeWidth=1.5;" edge="1" parent="1" source="50" target="51">
  71. <mxGeometry relative="1" as="geometry"/>
  72. </mxCell>
  73. <mxCell id="53" value="耳宽 lug_w(归一化基准)" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#606266;" vertex="1" parent="1">
  74. <mxGeometry x="90" y="572" width="180" height="20" as="geometry"/>
  75. </mxCell>
  76. <mxCell id="54" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  77. <mxGeometry x="80" y="550" width="2" height="2" as="geometry"/>
  78. </mxCell>
  79. <mxCell id="55" value="" style="ellipse;fillColor=none;strokeColor=none;" vertex="1" parent="1">
  80. <mxGeometry x="80" y="410" width="2" height="2" as="geometry"/>
  81. </mxCell>
  82. <mxCell id="56" value="" style="endArrow=classic;startArrow=classic;endFill=1;startFill=1;html=1;rounded=0;strokeColor=#606266;strokeWidth=1.5;" edge="1" parent="1" source="54" target="55">
  83. <mxGeometry relative="1" as="geometry"/>
  84. </mxCell>
  85. <mxCell id="57" value="耳高 lug_h" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#606266;" vertex="1" parent="1">
  86. <mxGeometry x="16" y="452" width="58" height="20" as="geometry"/>
  87. </mxCell>
  88. <mxCell id="60" value="归一化偏移:&lt;br&gt;xr = (钩心X − 耳心X) / 耳宽&lt;br&gt;yr = (钩底Y − 耳底Y) / 耳高&lt;br&gt;&lt;br&gt;X 用中心点;Y 用框底边:&lt;br&gt;吊钩升起后顶边被画面裁切,&lt;br&gt;中心 Y 不可靠,底边不受影响" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#fdf6ec;strokeColor=#e6a23c;fontSize=12;fontColor=#1f2d3d;" vertex="1" parent="1">
  89. <mxGeometry x="560" y="170" width="360" height="260" as="geometry"/>
  90. </mxCell>
  91. <mxCell id="61" value="取最近相交配对:中心距最近 且 两框相交" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#faf3e3;strokeColor=#e6a23c;fontSize=12.5;fontStyle=1;fontColor=#8a6d3b;" vertex="1" parent="1">
  92. <mxGeometry x="560" y="460" width="360" height="50" as="geometry"/>
  93. </mxCell>
  94. <mxCell id="70" value="标定 → 运行判定流程" style="text;html=1;align=center;verticalAlign=middle;fontSize=13;fontStyle=1;fontColor=#8ba7c9;" vertex="1" parent="1">
  95. <mxGeometry x="970" y="120" width="360" height="22" as="geometry"/>
  96. </mxCell>
  97. <mxCell id="71" value="① 点击【标定】按钮&lt;br&gt;当前工位(左右侧分别标定)" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#eaf3ff;strokeColor=#2f6fd0;fontSize=12;fontStyle=1;fontColor=#1f2d3d;" vertex="1" parent="1">
  98. <mxGeometry x="970" y="150" width="360" height="56" as="geometry"/>
  99. </mxCell>
  100. <mxCell id="72" value="② 连续采样约 1 秒&lt;br&gt;逐帧计算最近相交配对的 (xr, yr)" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#eaf3ff;strokeColor=#2f6fd0;fontSize=12;fontStyle=1;fontColor=#1f2d3d;" vertex="1" parent="1">
  101. <mxGeometry x="970" y="230" width="360" height="60" as="geometry"/>
  102. </mxCell>
  103. <mxCell id="73" value="③ 全部样本取平均&lt;br&gt;写入 hook_lug_x/y_offset_ratio_{left|right}" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f3fbea;strokeColor=#1e9e5a;fontSize=12;fontStyle=1;fontColor=#1f2d3d;" vertex="1" parent="1">
  104. <mxGeometry x="970" y="315" width="360" height="60" as="geometry"/>
  105. </mxCell>
  106. <mxCell id="74" value="④ 运行中判定“可以起吊”:&lt;br&gt;框相交 且 |xr−标定x| ≤ 容差 且 |yr−标定y| ≤ 容差" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f3fbea;strokeColor=#1e9e5a;fontSize=12;fontStyle=1;fontColor=#1f2d3d;" vertex="1" parent="1">
  107. <mxGeometry x="970" y="400" width="360" height="70" as="geometry"/>
  108. </mxCell>
  109. <mxCell id="75" value="⑤ 达标 → 判定【挂包成功 / 可以起吊】" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#fdf0f0;strokeColor=#d64541;fontSize=12;fontStyle=1;fontColor=#1f2d3d;" vertex="1" parent="1">
  110. <mxGeometry x="970" y="495" width="360" height="50" as="geometry"/>
  111. </mxCell>
  112. <mxCell id="76" value="容差 offset_ratio_tolerance(默认 0.25);不同工位/侧视角不同需分别标定" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#909399;" vertex="1" parent="1">
  113. <mxGeometry x="970" y="565" width="360" height="22" as="geometry"/>
  114. </mxCell>
  115. <mxCell id="81" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;endArrow=block;endFill=1;strokeColor=#909399;strokeWidth=2;" edge="1" parent="1" source="71" target="72">
  116. <mxGeometry relative="1" as="geometry"/>
  117. </mxCell>
  118. <mxCell id="82" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;endArrow=block;endFill=1;strokeColor=#909399;strokeWidth=2;" edge="1" parent="1" source="72" target="73">
  119. <mxGeometry relative="1" as="geometry"/>
  120. </mxCell>
  121. <mxCell id="83" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;endArrow=block;endFill=1;strokeColor=#909399;strokeWidth=2;" edge="1" parent="1" source="73" target="74">
  122. <mxGeometry relative="1" as="geometry"/>
  123. </mxCell>
  124. <mxCell id="84" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;endArrow=block;endFill=1;strokeColor=#909399;strokeWidth=2;" edge="1" parent="1" source="74" target="75">
  125. <mxGeometry relative="1" as="geometry"/>
  126. </mxCell>
  127. <mxCell id="90" value="核心:AI 只能识别 hook/lug 类别,无法判断吊钩是否真正“坐实”到位;通过标定挂钩成功瞬间的归一化相对偏移,作为该工位该侧“可以起吊”的判定基准。" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f7fa;strokeColor=#c0c4cc;fontSize=12;fontColor=#1f2d3d;" vertex="1" parent="1">
  128. <mxGeometry x="300" y="690" width="900" height="56" as="geometry"/>
  129. </mxCell>
  130. </root>
  131. </mxGraphModel>
  132. </diagram>
  133. </mxfile>