目前手機相機模組的調校設定,大多以手機拍照後的照片透過Photoshop之類的圖像編輯軟體來判斷影像品質使否符合條件,但因為這樣的方式,調整影像品質往往耗費過多時間,而且必須投注人力在調整影像上,浪費公司資源。 本論文使用模擬退火演算法做自動調整Lens Shading(LS)鏡頭進光補償和Color Reproduction(CR)色彩再現兩項,而White Balance(WB)白平衡則透過建立不同色溫的參數表來彌補相機模組內嵌的演算法於特殊環境色溫下的誤判。開發是透過Android工具ADB(Android Debug Bridge)指令去命令手機進入預覽模式(Preview Mode),並進行拍照,最後將影像傳至電腦端,透過電腦端的OpenCV函式庫來判斷影像品質是否達到目標。使用模擬退火演算法反覆將可調整之變數填入,盡量降低誤差值,取得最佳之理想值。而這些過程都可以透過自動化完成,並可靈活應用在不同影像模組之間。
To calibrate the camera module of a cell phone, the engineers typically take pictures and use an image processing software to determine image quality. This tuning process is performed again and again. The problem of this approach is intolerably lengthy calibration time and consequently wasted manpower. This paper introduced an efficient approach that adopted the simulated annealing algorithm to automatically calibrated the lens shading and color reproduction. As to the white balance, we used the auto algorithm of the cell phone camera module to calculate parameter in different color temperature. Our approach included using Android tool (Android Debug Bridge) to switch the cell phone to the preview mode before taking a picture, the captured picture is tuned based on the parameter suggested by the computer side at the cell phone before the picture was sent to the computer side. At the computer side, two tasks are executed. Firstly, the simulated annealing algorithm is applied to generate parameters and send it back to the cell phone for capturing next picture. Secondly, OpenCV API was applied to verify the picture meeting target or not. After the simulated annealing algorithm reached convergence, the tuning of camera module was done.. This process can be automatically performed and is applicable to different sensor modules. The experiment results reveal that our approach can effectively reduce calibration time and consequently effectively save the manpower.