摘要: | 本研究開發了一套基於聚焦成形技術的圓孔自動定位與量測系統,解決了機械手 臂難以將藍寶石玻璃圓孔精確對準量測視野的問題,實現全自動化量測。系統通過獲 取不同聚焦位置的影像,使用聚焦度值演算法進行圓孔的三維形貌重建,並以非接觸 式方式量測圓孔的幾何特徵。 系統由硬體和軟體兩部分組成。硬體包括 CCD 相機、工業鏡頭、低失真微距鏡頭、顯 微鏡頭、照明裝置和電控位移平台等,構成高精度成像與定位系統。軟體使用 Python 進行影像分析與三維重建,C++控制硬體實現自動化定位。工作流程分為圓孔自動粗細 定位和三維形貌重建兩部分。 圓孔自動定位包括粗定位和細定位。粗定位通過 X 與 Y 軸電控位移平台將圓孔快 速移至 2.5 倍顯微鏡頭視野內。細定位則進一步優化圓孔位置,使其對準 20 倍顯微鏡 頭視野中心。實驗顯示,粗細定位成功率均為 100 %,圓孔中心距視野中心最大距離僅 8 μm。 三維形貌重建過程中,系統控制電控升降平台逐微米拍攝圓孔影像。利用聚焦度 值演算法分析每張影像,計算像素點聚焦度值,找出最大值對應的影像位置,從而確 定圓孔入口和出口相對位置,重建三維形貌。 本研究比較了 Roberts、Prewitt、Laplacian、Sobel 和 Scharr 等聚焦度值演算法。結 果顯示,Scharr 演算法與商用形狀分析雷射顯微鏡的量測結果相對誤差最小,最大僅 1%,優於其他算法。 系統性能驗證方面,20 倍物鏡量測範圍為 425 μm * 355 μm,橫向解析度 0.871 μm, 縱向解析度 0.8 μm。重複性實驗表明定位成功率 100%,孔徑與深度誤差分別為 1%和 1.4%。量測極限實驗證實當孔壁傾角小於 80 度時,系統可準確建立三維形貌模型,誤 差為 1.25%。;This study developed an automatic hole positioning and measurement system based on the shape-from-focus technique, solving the problem of mechanical arms′ inability to accurately align sapphire glass holes with the measurement field of view, thus achieving fully automated measurement. The system captures images at different focus positions, uses focus value algorithms for 3D shape reconstruction of holes, and measures hole geometry non-contactly. The system comprises hardware and software components. Hardware includes a CCD camera, industrial lens, low distortion macro lens, microscope lens, illumination device, and motorized translation stages, forming a high-precision imaging and positioning system. Software uses Python for image analysis and 3D reconstruction, while C++ controls hardware for automated positioning. The workflow consists of automatic coarse and fine hole positioning and 3D shape reconstruction. Automatic hole positioning includes coarse and fine positioning. Coarse positioning quickly moves the hole into the 2.5x microscope lens field of view using X and Y-axis motorized stages. Fine positioning further optimizes the hole position, aligning it with the 20x microscope lens field center. Experiments show 100% success rates for both coarse and fine positioning, with a maximum distance of only 8 μm between the hole center and field center. During 3D shape reconstruction, the system controls a motorized lift platform to capture hole images at 1 μm intervals. Focus value algorithms analyze each image, calculating pixel focus values and identifying the image position with the maximum value, determining the relative positions of the hole entrance and exit for 3D shape reconstruction. The study compared Roberts, Prewitt, Laplacian, Sobel, and Scharr focus value algorithms. Results show the Scharr algorithm has the smallest relative error, maximum 1%, compared to commercial shape analysis laser microscope measurements, outperforming other algorithms. For system performance verification, the 20x objective measurement range is 425 μm * III 355 μm, with lateral resolution of 0.871 μm and vertical resolution of 0.8 μm. Repeatability experiments show 100% positioning success rate, with 1% and 1.4% errors in hole diameter and depth, respectively. Measurement limit experiments confirm accurate 3D model construction for hole wall angles less than 80 degrees, with 1.25% error. |