<a href="#/1">基於機器學習二維影像辨識與三維物件姿態估測之眼在手機械手臂夾取系統(連結)</a>
<a href="#/36">整合氣壓移動滑台應用於機械手臂影像物件追蹤控制(連結)</a>
---
### 基於機器學習二維影像辨識與三維物件姿態估測之眼在手機械手臂夾取系統
#### Eye-in-hand Robotic Arm Gripping System Based on Two Dimensional Object Recognition Using Machine Learning and Three Dimensional Object Posture Estimation.
---
<style>
/* 只有加了 .top-align 的投影片,才會改成從上方開始排 */
.reveal .slides>section.top-align,
.reveal .slides>section>section.top-align {
top: 0 !important;
transform: none !important;
padding-top: 0px; /* 想更貼上緣就改 0 */
}
</style>
<!-- .slide: class="top-align" -->
<p style="font-size: 3em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
Summary
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 論文摘要
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 系統架構
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 物件姿態估測(點雲匹配)
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 物件方向性邊界盒(OBB)
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 實驗結果
</p>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
論文摘要
</p>
<p style="text-align: left;font-size: 0.7em;font-weight: bold;color: brown; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
本研究主要利用眼在手多視角取像系統,以多個視角擷取物件影像並建立物件點雲,將不同視角取得之物件點雲拼接起來並進行姿態估測,藉此取得物件在空間中的位置與完整姿態,最後規劃二指機械夾爪夾取辦法並應用於機械手臂夾取系統中。
</p>
<p style="font-weight: bold;text-align: left;font-size: 0.8em; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統流程:
</p>
<p style="text-align: left;font-size: 0.7em; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 取像與辨識:</strong>利用 RealSense D435i 相機拍攝,並以 YOLOv3 辨識二維影像,精確切割出物件點雲。
<br>
<strong>2. 姿態估測:</strong>拼接多視角點雲,透過 FPFH 特徵描述以及 SAC-IA 與 ICP 兩階段匹配算法,計算物件的精確姿態。
<br>
<strong>3. 夾取規劃:</strong>運用方向性邊界盒 (OBB) 規劃最佳夾持位置與角度,並整合於 KUKA 機械手臂進行實測驗證。
</p>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統架構
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
硬體設備
</p>
<div class="r-stack">
<ul style="font-size: 0.7em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong> 機械手臂:</strong>
KUKA LBR iiwa 7 R800 (七軸自由度,高定位精度)。</li>
<li><strong> 末端夾具:</strong>ROBOTIQ 2F-85 二指機械夾爪。</li>
<li><strong> 視覺模組:</strong>Intel® RealSense D435i RGB-D 相機。</li>
<li><strong> 樣本建立:</strong>EinScan-Pro 3D 掃描器 (離線掃描建立精確模型)。</li>
</ul>
<img
class="fragment"
style="width: 90%;"
src="https://hackmd.io/_uploads/S1cDlJqbWl.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/Sy0Ol15bbl.png"
/>
<img
class="fragment"
style="width: 80%;"
src="https://hackmd.io/_uploads/S19o3dz3eg.png"
/>
<img
class="fragment"
style="width: 80%;"
src="https://hackmd.io/_uploads/SJRzbycWbl.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統架構
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
軟體設備
</p>
<div class="r-stack">
<ul style="font-size: 0.7em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong> 點雲 (Point Cloud) : </strong>
本研究使用 <strong>Point Cloud Library (PCL)</strong> 處理三維空間物件。PCL 為跨平台 (Windows, Linux, Android, macOS) 之開源函式庫,整合了豐富的點雲演算法。</li>
<li><strong> 機械手臂人機介面:</strong>實驗室自製之人機介面,透過 <strong>WPF</strong> (Windows Presentation Foundation) 傳送命令至機械手臂的 <strong>Java</strong> 控制端,實現遠端控制。
</li>
</ul>
<img
class="fragment"
style="width: 90%;"
src="https://hackmd.io/_uploads/r1sT8JcWWx.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統架構
</p>
<img
style="width: 40%;"
src="https://hackmd.io/_uploads/Sycefyqb-x.png"
/>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件姿態估測(點雲匹配)
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
從點雲前處理開始,經過特徵提取與統計,最後進行點雲粗匹配與精匹配,共包含8個項目:
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.6em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>(1) 平面分割 </strong>
</li>
<strong>(2) 點雲下採樣</strong>
</li>
<strong>(3) 移除離群點 </strong>
</li>
<strong>(4) 表面法向量估計</strong>
</li>
<strong>(5) 快速點特徵直方圖(FPFH) </strong>
</li>
<strong>(6) 多維樹(KD-Tree) </strong>
</li>
<strong>(7) 取樣一致性之初始匹配(SAC-IA) </strong>
</li>
<strong>(8) 迭代最近點(ICP) </strong>
</li>
</ul>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(1) 平面分割
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.7em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<br>
<li><strong>本研究採用Matlab中的點雲平面分割函式,可以依照所設定之<span style="color: red; ">平面法向量</span>與<span style="color: red; ">切割之高度</span>將該平面上的點雲移除,達到平面切割之效果。 </strong>
</li>
<br>
<strong>*輸入「桌子的朝向」和「桌子的高度」這兩個參數,讓程式自動把桌子的點雲資料刪掉,只保留我們真正要分析的物體。 </strong>
</li>
</li>
</ul>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(2) 點雲下採樣
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
原始取得的點雲資料點數量極為龐大,為了減少運算時間並降低系統運算量,必須減少資料點的數量 。
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.7em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>原理 (立體像素 Voxel):</strong>
<ol style="margin: 0; padding-left: 20px;font-size: 0.9em; ">
<li><strong>空間劃分:</strong> 將三維空間切割成許多微小的立體方格 (Voxel)。</li>
<li><strong>計算質心:</strong> 算出每個方格內所有點雲的質心位置。</li>
<li><strong>簡化代表:</strong> 以該質心取代方格內所有點,以此代表該區域的點雲。</li>
</ol>
</li>
<li><strong>效益:</strong>
<ul style="margin: 0; font-size: 0.9em;padding-left: 20px">
<li><strong>降低運算量:</strong> 由於原始點雲資料量龐大,減少點數可有效降低系統負擔與時間。</li>
<li><strong>保留特徵:</strong> 在大幅降低資料密度的同時,仍能保留物件的原始幾何特徵。</li>
</ul>
</li>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/B1cyEtBb-e.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(3) 移除離群點
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
處理點雲資料首先要計算物件點雲之特徵點,以去除離散點的方式將點雲資料中不必要或多餘的點移除,只留下重要的點雲資訊。
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.7em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>原理 (立體方格 Voxel):</strong>
<ol style="margin: 0; padding-left: 20px;font-size: 0.9em; ">
<li><strong>判定依據:</strong> 依判斷固定半徑範圍內之鄰近點個數為移除離群點的依據。</li>
<li><strong>判斷邏輯:</strong> 搜尋點 <i>p<sub>i</sub></i> 指定半徑範圍內之資料點個數,判斷是否達到 <i>k</i> 點。</li>
<li><strong>執行移除:</strong> 若點數不足 <i>k</i>,歸類為離群點並移除該點。</li>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/HJsew9SZ-x.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(4) 表面法向量估計
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
透過最小平方法 (Least Squares) 在設定範圍內求得局部擬合平面,進而計算出該點的法向量,作為三維特徵描述的基礎。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 尋找擬合平面 (公式 3.1):</strong>

<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
→ 找出一個平面 <i>s</i>,使得所有鄰近點 <i>p<sub>i</sub></i> 到該平面的垂直距離平方和最小。其中 <i>p<sub>c</sub></i> 為質心,<i>n̂</i> 為法向量。
</span>
</li>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/rJyk6qrWWl.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(4) 表面法向量估計
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
透過最小平方法 (Least Squares) 在設定範圍內求得局部擬合平面,進而計算出該點的法向量,作為三維特徵描述的基礎。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>2. 建立協方差矩陣 (公式 3.2):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">

<span style="color: #666; font-size: 0.9em;">
→ 將鄰近點與質心的關係轉換為矩陣 <i>M</i>,描述點雲在空間中的分佈方向。
</span>
</li>
<strong>3. 求解法向量:</strong><br>
對矩陣 <i>M</i> 進行<span style="color: red;">特徵值分解</span>,其<span style="color: red;">最小特徵值</span>所對應的特徵向量,即為我們要求的擬合平面法向量。
</li>
</ul>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(5) 快速點特徵直方圖 (FPFH)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
FPFH 是由點特徵直方圖 (PFH) 簡化而來,藉由減少點與點之間的運算量達到加快運算的目的。雖然會降低些許精確度,但保留了 PFH 大部分識別特性。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 點特徵計算範圍 (圖 3.12):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 假設 <i>P<sub>q</sub></i> 為點雲資料中的一點,以半徑 <i>r</i> 範圍內搜尋相鄰點 <i>P<sub>k</sub></i> 並互相連接。計算兩兩相連點之特徵關係,最後以直方圖描述。 </span>
</span>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/Sy8e9xDbbe.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(5) 快速點特徵直方圖 (FPFH)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
透過表面法向量估計取得法向量後,定義局部座標系並計算角度偏差,作為特徵描述的基礎。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>2. 定義局部座標系 (公式 3.3 ~ 3.5):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 設鄰近兩點 <i>P<sub>q</sub></i> 與 <i>P<sub>t</sub></i>,法向量為 <i>N<sub>q</sub></i> 與 <i>N<sub>t</sub></i>。以 <i>U = N<sub>q</sub></i>、<i>V = (P<sub>t</sub>-P<sub>q</sub>) × U</i>、<i>W = U × V</i> 定義局部座標架構。
</span>
</span>
<strong>3. 計算幾何特徵 (公式 3.6 ~ 3.9):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 計算 <i>U, V, W</i> 與法向量 <i>N<sub>t</sub></i> 之間的夾角 <i>α, φ, θ</i> 及距離 <i>d</i>,以此描述兩點間的特徵關係。
</span>
</span>
</ul>
</div>
</section>
</div>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(5) 快速點特徵直方圖 (FPFH)
</p>
<div class="r-stack">
<img
style="width: 100%;"
src="https://hackmd.io/_uploads/HyI1sxDbbl.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/H1T_ixwWbg.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/rybi-ZD-Wx.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(5) 快速點特徵直方圖 (FPFH)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
FPFH 加入了距離權重,將中心點 <i>P<sub>q</sub></i> 的特徵 (SPFH) 與其鄰近點 <i>P<sub>i</sub></i> 的特徵進行加權組合。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>4. FPFH 權重計算 (公式 3.10 ~ 3.11):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 權重 <i>w<sub>i</sub> = √ exp( ||P<sub>q</sub> - P<sub>i</sub>|| )</i>。此步驟透過距離權重 <i>w<sub>i</sub></i> 來推測鄰近點對中心點的重要性。
</span>
</span>
</li>

</ul>
<img
class="fragment"
style="width: 40%;"
src="https://hackmd.io/_uploads/rJIWrZvW-e.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
12/15報這
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(6) 多維樹 (KD-Tree)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
多維樹利用 k 維歐幾里德空間組織資料點,方便資料點對於鄰近點的搜尋。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 原理:</strong>
<br>先計算空間方向軸之方差,將<span style="color: red;">方差最大</span>之方向軸上的<span style="color: red;">中值資料點</span>作為起始的分割節點。
</li>
<strong>2. 建立過程:</strong>
<br>將分割出來的部分依照上述作法循序執行,直到無法再將空間劃分為止。
</li>
<strong>3. 目的:</strong>
<br>由此根據節點之區分關係所建立的多維樹,可達到<span style="color: red;">快速搜尋</span>資料點的效果。
</li>
</ul>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(7) 取樣一致性之初始匹配 (SAC-IA)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
SAC-IA 從樣本中選取多個採樣點,並搜尋目標點雲中具有相似 FPFH 特徵的對應點,計算剛體變換矩陣。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 採樣策略:</strong>
<br>為了確保採樣點具有鑑別度,採樣點兩兩之間的距離需滿足設定之閥值。
</li>
<strong>2. 評估轉換矩陣 (公式 3.12, 3.13):</strong>
<br>利用<span style="color: red;">距離誤差和函數</span>評估矩陣好壞。若變換後的距離大於閥值 <i>m</i>,則給予不同的懲罰權重 (Huber Loss 概念)。
</li>
<p style="font-size: 0.9em; color: #666; margin-top: 10px;">
→ 經由多次迭代,取誤差和函數值最小的矩陣作為最終配準結果。
</p>
</ul>
<img
class="fragment"
style="width: 70%;"
src="https://hackmd.io/_uploads/SJbsgGD-Wl.png"
/>
</div>
<p class="fragment" style="font-size: 0.65em; color: brown; font-weight: bold; margin-top: 10px;">
→ (其中 <i>m</i> 為預先給定的距離閥值,<i>l<sub>i</sub></i> 為變換後的對應點距離)
</p>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
點雲匹配
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
(8) 迭代最近點 (ICP)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
經過 SAC-IA 粗匹配後,ICP 可進一步提高精準度。透過不斷迭代計算最佳旋轉與平移矩陣,使兩組點雲的均方誤差最小化。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 定義點集 (公式 3.14, 3.15):</strong>
<br>目標點集 <i>P = {p<sub>1</sub>...p<sub>n</sub>}</i>,樣本點集 <i>Q = {q<sub>1</sub>...q<sub>n</sub>}</i>。
</li>
<strong>2. 均方誤差函數 (公式 3.16):</strong>
<br>尋找旋轉矩陣 <i>R</i> 與平移向量 <i>t</i>,使誤差 <i>E</i> 達到最小。
</li>
<p style="font-size: 0.9em; color: #666; margin-top: 10px;">
(其中 <i>d</i> 為距離指標,用於判斷是否繼續迭代)
</p>
</p>
</ul>
<img
class="fragment"
style="width: 80%;"
src="https://hackmd.io/_uploads/Sk5SHMvZZx.png"
/>
</div>
<p class="fragment" style="font-size: 0.65em; color: brown; font-weight: bold; margin-top: 10px;">
→ 利用不斷迭代計算,找出最佳的剛體變換矩陣,完成最終的精確匹配。
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件方向性邊界盒(OBB)
</p>
<p style="text-align: left;font-size: 0.7em;line-height: 1.1; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
利用 OBB 以包圍物件之最小邊界盒更精確地描述物件在空間中的姿態與位置,並建立專屬物件座標系。
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.1; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. OBB 座標系定義 (圖 3.15):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 以 <i>C(x<sub>c</sub>, y<sub>c</sub>, z<sub>c</sub>)</i> 表示座標系統原點。
<br>→ <i>CC<sub>1</sub></i>, <i>CC<sub>2</sub></i>, <i>CC<sub>3</sub></i> 為三個單位方向向量,分別表示座標系統的三軸向量。
</span>
</span>
</ul>
<img
style="width: 45%; margin-top: 10px;"
src="https://hackmd.io/_uploads/rJibSH_z-g.png"
/>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件方向性邊界盒(OBB)
</p>
<p style="text-align: left;font-size: 0.7em;line-height: 0.9; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
利用協方差矩陣算法 (Covariance Matrix) 計算點雲分佈趨勢,求得物件之三軸方向。
</p>
<div class="r-stack">
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.1; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>2. 計算協方差與特徵向量 (公式 3.18 ~ 3.19):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 首先計算所有資料點之平均值 <i>¯P</i> (質心)。
<br>→ 計算協方差矩陣 <i>cov</i>,並對其進行特徵值分解。
<br>→ 矩陣之特徵向量 <i>v<sub>1</sub>, v<sub>2</sub>, v<sub>3</sub></i> 即為 OBB 座標系之三軸單位方向向量 (長、寬、高軸向)。
</span>
</span>
</ul>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/BkD12rOzbe.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/ByL-3S_MZe.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件方向性邊界盒(OBB)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic;line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
透過座標轉換將原點雲投影至 OBB 座標系中,以利計算物件之真實尺度。
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>3. 座標轉換 (公式 3.20 ~ 3.23):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 將原點雲座標 <i>p<sub>i</sub></i> 減去質心 <i>r</i> (平移),再乘上旋轉矩陣 <i>R<sup>-1</sup></i> (由 <i>v</i> 向量組成)。
<br>→ <i>p'<sub>i</sub> = R<sup>-1</sup>(p<sub>i</sub> - r)</i>,藉此將點雲轉正至 OBB 座標系。
</span>
</span>
</ul>
<div class="r-stack">
<img
style="width: 85%; margin-top: 10px;"
src="https://hackmd.io/_uploads/BJvNsSuGWe.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/S1i_pruG-g.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/r1KFpB_fWe.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件方向性邊界盒(OBB)
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
計算投影後點雲在各軸的極值,求得 OBB 的三軸尺度向量與幾何原點。
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 0.9; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>4. 計算 OBB 尺度與原點 (公式 3.24 ~ 3.29):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 尺度向量:<i>CC<sub>1</sub> = (x'<sub>max</sub> - x'<sub>min</sub>)v<sub>1</sub></i>。依此類推求得長、寬、高向量。
<br>→ OBB 原點 <i>C</i>:將 <i>x'<sub>min</sub>, y'<sub>min</sub>, z'<sub>min</sub></i> 經逆轉換推回原座標系,即可求得 OBB 幾何原點。
</span>
</span>
</li>
</ul>
<div class="r-stack">
<img
style="width: 95%; margin-top: 10px;"
src="https://hackmd.io/_uploads/HkIbYB_fbg.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/r11XJ8dM-g.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/SJo7yIufWg.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/By_VyLdG-x.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/BkZSJLOM-l.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.65em; line-height: 0.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
本章節利用 OBB 計算之物件姿態,規劃機械手臂的最佳夾取軸向與位置。
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; line-height: 0.3;font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif; margin-top: 30px;">
夾取規劃
</p>
<p style="text-align: left;font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
選擇夾持軸:依據 OBB 資訊計算各軸與桌面之夾角,選擇最適合的軸向作為機械手臂夾持軸。
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 計算夾角與選擇 (公式 4.1 ~ 4.3):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic; line-height: 1;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 計算 OBB 座標系之三軸單位方向向量 <i>v<sub>1</sub>(v<sub>11</sub>, v<sub>12</sub>, v<sub>13</sub>)</i>、<i>v<sub>2</sub>(v<sub>21</sub>, v<sub>22</sub>, v<sub>23</sub>)</i>、<i>v<sub>3</sub>(v<sub>31</sub>, v<sub>32</sub>, v<sub>33</sub>)</i>與桌面 (即世界座標系之 xy 平面) 之夾角 <i>θ<sub>v1</sub></i>、<i>θ<sub>v2</sub></i>、<i>θ<sub>v3</sub></i>,藉此得知物件與桌面的傾斜角。
</span>
</ul>

---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.8em; color: brown;line-height: 0.3; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif; margin-top: 30px;">
夾取規劃
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>2. 判斷方向 (圖 4.1):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br><br>→ 依據夾持軸之 Z 軸分量 <i>v<sub>n3</sub></i> 判斷方向。
<br>→ 正向 (<i>v<sub>n3</sub> > 0</i>):出桌面方向;負向 (<i>v<sub>n3</sub> < 0</i>):入桌面方向。
</span>
</span>
</ul>

---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
機械夾爪夾點規劃:根據 OBB 資訊計算夾持中心與手指接觸點。
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 0.9; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 定義夾持平面與軸向 (圖 4.2):</strong>
<br>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 將夾持軸之另外兩軸定義為 <i>a</i>、<i>b</i> 軸。
<br>→ 若夾持軸為 ±x,則 <i>a=y, b=z</i>;若為 ±y,則 <i>a=z, b=x</i>;若為 ±z,則 <i>a=x, b=y</i>。
</span>
</span>
</ul>

---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
機械夾爪夾點規劃:根據 OBB 資訊計算夾持中心與手指接觸點。
</p>
<ul style="margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>2. 計算夾取中心 (公式 4.4 ~ 4.5):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 依 OBB 之 Z 軸方向調整中心計算公式。
<br>→ +Z (原點在下):<i>O<sub>object</sub> = C + CC<sub>1</sub>/2 + CC<sub>2</sub>/2 + CC<sub>3</sub></i>。
<br>→ -Z (原點在上):<i>O<sub>object</sub> = C + CC<sub>1</sub>/2 + CC<sub>2</sub>/2</i>。
</span>
</span>
</ul>

---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
夾取規劃驗證:透過點雲投影進行可視化驗證,確認夾持軸與手指位置。
</p>

<ul style="text-align: left; margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 0.9; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 定義投影平面 (公式 4.6):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 建立垂直於夾持軸之平面 <i>E: ax+by+cz+d=0</i>。
<br>→ 法向量 <i>(a, b, c)</i> 為夾持軸方向,<i>d</i> 由 OBB 原點代入求得。
</span>
</span>
</ul>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
夾取規劃驗證:透過點雲投影進行可視化驗證,確認夾持軸與手指位置。
</p>
<div class="r-stack">
<img
style="width: 35%; margin-top: 10px;"
src="https://hackmd.io/_uploads/B1Gbew6M-e.png"
/>
<img class="fragment"
style="width: 60%; margin-top: 10px;"
src="https://hackmd.io/_uploads/ryeBIDTfbg.png"
/>
</div>
<ul style="text-align: left; margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.2; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>2. 計算投影點 (公式 4.7 ~ 4.9):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 將點雲座標 <i>(x<sub>o</sub>, y<sub>o</sub>, z<sub>o</sub>)</i> 投影至平面 <i>E</i> 得到 <i>(x<sub>p</sub>, y<sub>p</sub>, z<sub>p</sub>)</i>。
<br>→ 藉此獲得從機械夾爪視角看過去的物件 2D 輪廓 (如圖紅點)。
</span>
</span>
</ul>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
夾取規劃驗證:透過點雲投影進行可視化驗證,確認夾持軸與手指位置。
</p>

<ul style="text-align: left; margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.2; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>3. 可視化驗證 (圖 4.4 ~ 4.5):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 檢查投影形狀 (如圓形瓶底) 是否符合預期。
<br>→ 標示機械手臂第六軸中心 (綠點) 與夾爪手指停留位置 (藍點)。
</span>
</span>
</ul>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
座標系統整合
</p>
<p style="text-align: left;font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
本研究藉由 RGB-D 相機即時取得空間中物件點雲資訊,欲引導機械手臂執行夾取,必須先整合影像座標系統與世界座標系統。本研究共有四個座標系統:<br><span style="color: #A6A600; font-size: 0.9em;">世界座標系 (機械手臂座標系)、相機座標系、工具座標系以及 OBB 座標系統。</span>本節將探討這些座標系之間的轉換關係。
</p>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
齊次轉換矩陣(T):利用 4x4 矩陣整合旋轉與平移,簡化座標變換運算。
</p>
<div class="r-stack">
<ul style="text-align: left; margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.4; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 矩陣結構 (公式 4.10):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ <i>T</i> 矩陣包含旋轉矩陣 <i>R<sub>3×3</sub></i> 與平移向量 <i>t<sub>3×1</sub></i>。
<br>→ 透視向量 <i>O</i> 設定為 0,放大倍率 <i>S</i> 設定為 1。
</span>
</span>
<strong>2. 座標轉換公式 (公式 4.11):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 將影像座標 <i>P<sub>c</sub></i> 轉換為世界座標 <i>P<sub>w</sub></i>。
<br>→ 運算式:<i>[P<sub>w</sub>, 1]<sup>T</sup> = T [P<sub>c</sub>, 1]<sup>T</sup></i>。
</span>
</span>
</ul>
<img class="fragment"
style="width: 70%; margin-top: 10px;"
src="https://hackmd.io/_uploads/Hyc4aYpzZe.png"
/>
</div>

---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 0.7; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
座標系統轉換:建立相機、工具、世界與 OBB 座標系之轉換鏈。
</p>
<div class="r-stack">
<ul style="text-align: left; margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 眼在手轉換 (<i>T<sup>Tool</sup><sub>Camera</sub></i>):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 採眼在手架構,測量相機座標系至工具座標系 (法蘭面) 之旋轉與平移。
<br>→ 此為固定參數,隨機械手臂移動而保持相對不變。
</span>
</span>
<strong>2. 手臂與世界轉換 (<i>T<sup>World</sup><sub>Tool</sub></i>):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 由控制器獲取手臂末端對於基座 (世界原點) 的實時姿態。
<br>→ 結合 <i>T<sup>Tool</sup><sub>Camera</sub></i> 可將相機視角的點雲轉換至世界座標系。
</span>
</span>
<strong>3. OBB 姿態轉換 (<i>T<sup>World</sup><sub>OBB</sub></i>):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 利用協方差算法取得物件在世界座標中的位置與方向。
<br>→ 最終整合計算 <i>T<sup>Tool</sup><sub>OBB</sub></i>,以規劃機械夾爪的夾取路徑。
</span>
</span>
</ul>
<img class="fragment" style="width: 100%; margin-top: 10px;" src="https://hackmd.io/_uploads/BkgtFgc6M-l.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
物件夾取規劃
</p>
<p style="text-align: left;font-size: 0.7em; color: brown; font-weight: bold; font-style: italic; line-height: 1.1; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
工具座標系與 OBB 座標系之轉換:修正 OBB 軸向並計算夾取所需之旋轉角度。
</p>
<div class="r-stack">
<ul style="text-align: left; margin: 0; padding-left: 50px; font-size: 0.65em; line-height: 0.9; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<strong>1. 重新定義 OBB 座標系 (表 4.1 ~ 4.2):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 統一方向:若夾持軸 (Z) 指向天空,則反轉為 -Z 並互換 X、Y 軸,確保符合右手定則且朝向桌面。
<br>→ 匹配手指:將尺度較短之軸向設定為 Y 軸,以配合機械夾爪之手指開合方向。
</span>
</span>
<strong>2. 計算旋轉角度 (公式 4.17 ~ 4.26):</strong>
<span style="font-family: 'Times New Roman'; font-style: italic;">
<span style="color: #666; font-size: 0.9em;">
<br>→ 轉換矩陣:<i>T<sup>Tool</sup><sub>OBB</sub> = T<sup>Tool</sup><sub>World</sub> T<sup>World</sup><sub>OBB</sub></i>,建立物件相對工具之關係。
<br><br>→ 角度解算:解析 <i>T<sup>Tool</sup><sub>OBB</sub></i> 旋轉分量,反推 <i>θ<sub>x</sub></i>、<i>θ<sub>y</sub></i>、<i>θ<sub>z</sub></i> (尤拉角),作為手臂控制指令。
</span>
</span>
</ul>
<img class="fragment" style="width: 80%; margin-top: 10px;"
src="https://hackmd.io/_uploads/Syzph56MWx.png"
/>
<img class="fragment" style="width: 80%; margin-top: 10px;"
src="https://hackmd.io/_uploads/SkTRnc6Gbe.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
實驗結果
</p>
<p style="text-align: left;font-size: 0.65em; line-height: 1.3; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
本章節整合深度學習物件辨識與三維立體視覺,驗證機械手臂夾取系統之性能。實驗分為座標系統整合、物件姿態估測及物件夾取規劃三部分,透過實際數據分析,確認系統能精確計算位移與旋轉量,驅動機械手臂完成夾取動作。
</p>
---
### 整合氣壓移動滑台應用於機械手臂影像物件追蹤控制
#### Development of an Integrate Pneumatic Moving Slide for Vision Tracking Control of Transportable Robotic Arm
---
<style>
/* 只有加了 .top-align 的投影片,才會改成從上方開始排 */
.reveal .slides>section.top-align,
.reveal .slides>section>section.top-align {
top: 0 !important;
transform: none !important;
padding-top: 0px; /* 想更貼上緣就改 0 */
}
</style>
<!-- .slide: class="top-align" -->
<p style="font-size: 3em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
Summary
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 論文摘要
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 系統架構
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 視覺方法
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 軌跡推算與控制
</p>
<p style="text-align: left;font-size: 0.8em;font-weight: bold;">
🐟 實驗結果
</p>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
論文摘要
</p>
<p style="text-align: left;font-size: 0.7em; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
本論文提出一套整合氣壓移動滑台與機械手臂的自動化控制系統,透過將手臂架設於氣壓滑軌上作為第四軸(外部軸),解決傳統固定式手臂工作範圍受限的問題。系統結合了機器視覺技術,能精準偵測、追蹤並抓取微小目標物(10mm 鋼珠),實現長距離的自動化取放作業。
</p>
<p style="font-weight: bold;text-align: left;font-size: 0.5em; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統流程:
</p>
<div class="r-stack">
<p style="text-align: left;font-size: 0.5em; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
1. 首先利用 PID 控制氣壓滑台移動至指定工作區域(抓取區或放置區),待滑台穩態後,啟動安裝於手臂末端的相機進行視覺辨識。
<br><br>
2. 採用霍夫圓偵測法(Hough Circle Transform)克服金屬反光干擾,精準鎖定鋼珠圓心,並透過仿射轉換(Affine Transformation)將影像座標轉換為機械手臂空間座標。
<br><br>
3. 最後,機械手臂依據計算出的座標進行追蹤與抓取,並透過三軸加速規驗證手臂移動軌跡的平滑度與準確性,經實驗驗證,鋼珠取放成功率達 100%。
</p>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統架構
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
設計核心
</p>
<ul style="font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>異質系統整合:</strong>以 PC 為核心,透過 USB 整合 Arduino、LabVIEW (MyDAQ) 與 Python (視覺) 三大平台。</li>
<li><strong>擴展工作空間:</strong>將 uArm 機械手臂安裝於氣壓無桿缸滑台上,形成「3軸 + 1軸」的運動系統。</li>
<li><strong>Eye-in-Hand 視覺:</strong>工業相機固定於手臂末端,隨手臂移動進行動態偵測。</li>
</ul>
<img
style="width: 50%;"
src="https://hackmd.io/_uploads/ryQsxG-b-e.png"
/>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統架構
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
硬體設備
</p>
<ul style="font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>執行機構:</strong>uArm Swift Pro (4軸手臂,負責抓取)、氣壓無桿缸 (1000mm,負責長距離移動)。</li>
<li><strong>感測器:</strong>IDS 工業相機 (視覺辨識)、HC-SR04 超音波 (位置回授)、HW-013 加速規 (軌跡驗證)。</li>
<li><strong>控制器:</strong>Arduino Mega 2560 (發送 G-Code 控制手臂)、NI MyDAQ (執行 PID 運算與訊號擷取)。</li>
</ul>
<img
style="width: 50%;"
src="https://hackmd.io/_uploads/Sy_juGWbZl.png"
/>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統架構
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
訊號連接
</p>
<ul style="font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>Arduino (手臂端):</strong>透過 Serial Port 發送 G-Code;並透過 Digital Pin 與 MyDAQ 交換「到位/抓取」訊號。</li>
<li><strong>MyDAQ (滑台端):</strong>AO 輸出 0-10V 控制比例閥;DIO 讀取超音波感測器數值。</li>
<li><strong>USB-6008 (驗證端):</strong>獨立擷取 HW-013 三軸加速規的類比電壓訊號,用於後續軌跡分析。</li>
</ul>
<img
style="width: 60%;"
src="https://hackmd.io/_uploads/rkcX_G-ZWg.png"
/>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
視覺方法
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
影像處理流程
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>相機校正 (Camera Calibration):</strong>使用棋盤格校正板,修正鏡頭畸變與內外參數。</li>
<li><strong>前處理 (Preprocessing):</strong>
<ul style="margin: 0; padding-left: 20px;">
<li><strong>中值濾波:</strong>去除雜訊但保留邊緣。</li>
<li><strong>灰階化 & 二值化:</strong>分離目標與背景。</li>
<li><strong>形態學處理:</strong>利用膨脹/侵蝕去除反光造成的破洞。</li>
</ul>
</li>
</ul>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/SyEBkFWWbe.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/HyvwkF-bbe.png"
/>
<img
class="fragment"
style="width: 60%;"
src="https://hackmd.io/_uploads/BJk45mWZZl.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
視覺方法
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
核心辨識演算法比較
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>方法一:輪廓法 (Contour Method)</strong>
<ul style="margin: 0; padding-left: 20px;">
<li>原理:找尋二值化後的連通區域。</li>
<li>缺點:易受鋼珠表面反光點干擾,造成誤判。</li>
</ul>
</li>
<li><strong>方法二:霍夫圓偵測 (Hough Circle) <span style="color: brown;">[採用]</span></strong>
<ul style="margin: 0; padding-left: 20px;">
<li>原理:將影像轉換至參數空間,利用投票機制找圓。</li>
<li>優點:抗噪性佳,能忽略反光點,辨識準確率高。</li>
</ul>
</li>
</ul>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/S1IpAm-W-x.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/rySUbEW-bx.png"
/>
<img
class="fragment"
style="width: 100%;"
src="https://hackmd.io/_uploads/r1gY-EZZ-g.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
視覺方法
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
方法一:輪廓法
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<br>
<li><strong>實作流程 (Python + OpenCV):</strong>
<ol style="margin: 0; padding-left: 20px; ">
<li><strong>前處理:</strong> 將影像二值化 (Binarization)。</li>
<li><strong>找輪廓:</strong> 取得所有連通區域的邊界點。</li>
<li><strong>算質心:</strong> 計算輪廓的矩 (Moments),再代入公式求出中心座標 (Cx, Cy)。</li>
</ol>
</li>
<br>
<li><strong>本研究遇到的限制 (缺點):</strong>
<ul style="margin: 0; padding-left: 20px; color: #d9534f;">
<li><strong>光線敏感:</strong>鋼珠表面的<strong>反光亮點</strong>會導致二值化後的輪廓破裂。</li>
<li><strong>誤判:</strong>OpenCV 會將破裂的輪廓視為多個不同物體,導致質心計算錯誤或追蹤不穩定。</li>
</ul>
</li>
</ul>
<img
class="fragment"
style="width: 95%;"
src="https://hackmd.io/_uploads/SJhS54bbbx.png"
/>
<img
class="fragment"
style="width: 96%;"
src="https://hackmd.io/_uploads/Bkj85E-ZZe.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
視覺方法
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
方法二:霍夫圓偵測 (Hough Circle) <span style="color: red; font-size: 0.8em;">[本研究採用]</span>
</p>
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<br>
<li><strong>核心原理 (投票機制):</strong>
<ol style="margin: 0; padding-left: 20px; ">
<li><strong>邊緣轉換:</strong> 將影像空間中的每個邊緣點,轉換到參數空間。</li>
<li><strong>畫圓投票:</strong> 每個邊緣點都畫出可能的圓,這些圓交會最密集的地方就是「圓心」。</li>
<li><strong>確認圓心:</strong> 透過累加器 (Accumulator) 找出票數最高的點,即為鋼珠中心。</li>
</ol>
</li>
<br>
<li><strong>本研究採用的優勢 (優點):</strong>
<ul style="margin: 0; padding-left: 20px; color: #d9534f;">
<li><strong>抗噪性強:</strong> 即使鋼珠中間有反光白點(導致邊緣不連續),只要外圍輪廓存在,就能準確投票出圓心。</li>
<li><strong>單次辨識準確:</strong> 相比輪廓法,霍夫圓能直接濾除內部雜訊,一次就能抓到正確的圓心位置。</li>
</ul>
</li>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/Byl52NZ-Zl.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/ByA2hEZ--e.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
軌跡推算與控制
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
氣壓滑台定位控制
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>控制目標:</strong> 使滑台精準移動並停駐於兩個工作點:
<ul style="margin: 0; padding-left: 20px;">
<li>抓取區 (180mm)</li>
<li>放置區 (680mm)</li>
</ul>
</li>
<br>
<li><strong>閉迴路控制系統 (Closed-loop Control):</strong>
<ul style="margin: 0; padding-left: 20px;">
<li><strong>感測器 (Sensor):</strong> HC-SR04 超音波測距模組 (回授當前位置)。</li>
<li><strong>控制器 (Controller):</strong> LabVIEW 實作 PID 演算法。</li>
<li><strong>致動器 (Actuator):</strong> 電磁閥 (調節 4.8V~5.6V 電壓控制氣流量)。</li>
</ul>
</li>
<br>
</ul>
<img
class="fragment"
style="width: 75%; margin-top: 10px;"
src="https://hackmd.io/_uploads/BksHGSZZZg.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
軌跡推算與控制
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
機械手臂軌跡推算
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>目的:</strong> 利用外部感測器驗證機械手臂之實際運動路徑與平滑度。</li>
<br>
<li><strong>訊號處理流程:</strong>
<ol style="margin: 0; padding-left: 20px;">
<li><strong>校正與中心化:</strong> 將電壓轉換為加速度 (g),並扣除靜止時的平均偏差 (Bias) 使其歸零。</li>
<li><strong>濾波 (Filtering):</strong> 使用低通濾波器濾除高頻雜訊,並設定門檻值 (Threshold) 消除靜止時的微小震動。</li>
<li><strong>積分運算 (Integration):</strong>
<ul style="margin: 0; padding-left: 20px;">
<li>一次積分 → 速度 (Velocity)</li>
<li>二次積分 → 位移 (Displacement)</li>
</ul>
</li>
</ol>
</li>
<br>
<li><strong>驗證結果:</strong> 推算出之 3D 軌跡圖能清楚呈現「抓取 → 移動 → 放置」的三段連續動作,符合預期路徑。</li>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/rJqOSSWWZx.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/BJYoQrWW-l.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/r1KRQHWb-e.png"
/>
</div>
---
<!-- .slide: class="top-align" -->
<p style="font-size: 1.4em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
實驗結果與結論
</p>
<p style="text-align: left;font-size: 0.8em; color: brown; font-weight: bold; font-style: italic; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
系統整合測試結果
<div class="r-stack">
<ul style=" margin: 0; padding-left: 100px; font-size: 0.5em; line-height: 1.5; font-family: 'Times New Roman', '微軟正黑體', sans-serif;">
<li><strong>測試條件:</strong>
<ul style="margin: 0; padding-left: 20px;">
<li>對 10 顆 10mm 鋼珠進行連續取放測試。</li>
<li>整合滑台移動、視覺辨識與手臂動作。</li>
</ul>
</li>
<br>
<li><strong>量化成果:</strong>
<ul style="margin: 0; padding-left: 20px;">
<li><strong>抓取成功率:</strong> <span style="color: red; font-weight: bold;">100%</span></li>
<li><strong>放置成功率:</strong> <span style="color: red; font-weight: bold;">100%</span></li>
<li><strong>單次循環時間:</strong> 約 57 秒</li>
</ul>
</li>
<br>
<li><strong>定位精度:</strong>
<ul style="margin: 0; padding-left: 20px;">
<li>影像解析度:640 x 480。</li>
<li>視覺定位誤差 < 3 pixel。</li>
<li>(換算:10mm 鋼珠 ≈ 30 pixel,故 3 pixel ≈ 1 mm)</li>
</ul>
</li>
</ul>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/SkZ5hrbWZl.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/ry_jhBZ-Wx.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/S19anSWW-g.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/B10RhHbZbl.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/SJvxpHW-Zg.png"
/>
<img
class="fragment"
style="width: 100%; margin-top: 10px;"
src="https://hackmd.io/_uploads/B1CWaB-WWg.png"
/>
</div>
{"description":"基於機器學習二維影像辨識與三維物件姿態估測之眼在手機械手臂夾取系統Eye-in-hand Robotic Arm Gripping System Basedon Two Dimensional Object Recognition UsingMachine Learning and Three Dimensional ObjectPosture Estimation.","slideOptions":"{\"theme\":\"serif\",\"slideNumber\":\"c/t\",\"center\":false}","contributors":"[{\"id\":\"ee8f139e-adc8-45cc-b8cf-7c8859ceef62\",\"add\":92430,\"del\":34639,\"latestUpdatedAt\":1767074298709}]","breaks":false,"title":"志航論文報告 "}