檢測金屬、玻璃或光澤表面塗裝等鏡面材質上的瑕疵,因其光學特性,容易將光源與相機等不相關之物體一併拍攝進影像中,造成後續電腦處理之負擔,也較容易出現誤判,使得系統可靠度下降。此外,部分瑕疵僅於特定入射光角度下才較明顯,因此為此類待測物設計照明方式時,硬體可調整的幅度也會更加侷限。上述解法之一,是Paulo M.F. Forte提出之瑕疵影像增強法,該法以螢幕作為光源,並於螢幕上變換圖案,使得無需活動機構即可達成照明變化,接著藉由演算法將多張取像影像合併,生成一張高瑕疵對比度之最終影像。本研究中提出一補償光源方案,可進一步優化前述瑕疵影像增強法。實驗結果顯示,本方案能有效降低使用瑕疵影像增強法造成之背景暗紋問題,且可減少系統取像張數。 ;Detecting flaws on mirror materials such as metal, glass or glossy surface coating, due to its optical characteristics, it is easy to capture light sources and irrelevant objects such as cameras into the image, resulting in the burden of subsequent computer processing and prone to misjudgment, making the system reliability decrease. In addition, some defects are only obvious under certain incident light angles, so when designing lighting methods for this type of device under test, the adjustable range of the hardware will be more limited.One of the above solutions is the defect image enhancement method proposed by Paulo M.F. Forte. This method uses the screen as the light source, and changes the pattern on the screen, so that the illumination change can be achieved without moving the mechanism, and then multiple images are captured by the algorithm The images are merged to produce a final image with high defect contrast. In this study, a compensation light source scheme is proposed, which can further optimize the aforementioned defect image enhancement method. Experimental results show that this solution can effectively reduce the problem of background dark lines caused by the use of flawed image enhancement methods, and can reduce the number of images captured by the system.