本論文之研究重點在利用影像處理技術建構一農藥殘留檢測系統,降低檢測費用與縮短檢測時間。引用乙醯膽鹼酯酶(Acetylcholinesterase, AChe)農藥檢測法,並運用樹莓派開發板(Raspberry Pi 3B)與網路攝影機,在QT Creator 編譯器下針對檢測液之顏色反應速率進行影像辨識處理,進而換算出農藥濃度。首先在樹莓派開發板上安裝QT Creator人機介面設計軟體與OpenCV影像處理函式庫,完成開發環境建置,再利用C++程式語言撰寫農藥檢測液化學反應色彩辨識軟體。 由乙醯膽鹼(基質)、乙醯膽鹼酯酶(AChe)與黃色呈色劑調配出農藥檢測液,當含有有機磷或胺基甲酸鹽類之農藥滴入檢測液時,會抑制乙醯膽鹼酯酶的活性,導致乙醯膽鹼(基質)不易水解為乙酸及硫代膽鹼(主導與呈色劑反應),此時硫代膽鹼濃度降低,而當呈色劑滴入檢測液之後,呈現黃色之化學反應速率降低。因此本論文即以攝影機及色彩辨識軟體即時監測檢測液呈現黃色反應之反應速率快慢,來判斷農藥之濃度。當農藥濃度越高,硫代膽鹼濃度越少,呈現黃色的反應速率越慢;反之當農藥濃度越低,硫代膽鹼濃度就越多,呈現黃色的反應速率就越快。 本論文藉由攝影機擷取檢測液化學反應試管之影像,並轉換出各畫素之紅綠藍(RGB)色彩值。且發現由深黃色到淡黃色之RGB數值變化,尤其以藍色數值之變化最為顯著,因此特別紀錄與分析藍色數值隨反應時間之變化情形。為提高檢測之準確性,本實驗監測反應試管的大範圍面積(163x156mm),並紀錄600秒的反應時間,最後計算藍色數值對時間的積分面積來換算為農藥殘留之濃度。本實驗農藥殘留濃度調變由0.0、0.05、0.1、0.2、0.3、0.4、0.5、0.6、0.7、0.8、0.9、0.95至1.0 ppm,經由影像處理軟體測得檢測液化學反應色彩之藍色數值對時間積分面積分別為72844、70392、69164、65809、62467、60187、57198、53775、51638、48749、46596、43971、42358 (Arbitrary units)。最後由程式將藍色數值積分面積換算為農藥殘留濃度,達到快速及低成本的農藥殘留檢測目標。本論文亦從市場中採購蔬菜來進行實測,測得小白菜之農藥殘留濃度為0.2ppm。
This thesis aims to construct a pesticide residue detection system for Taiwan agricultural products to reduce the cost of pesticide testing and shorten the detection time. Raspberry Pi 3B development board and 8MP Raspberry Pi camera module (V2) camera were used in conjunction with Acetylcholinesterase (Ache) detection method to perform image recognition processing in QT Creator encoder. Firstly, the QT Creator man-machine interface design software and OpenCV image processing library were installed on Raspberry Pi 3B development board to complete the establishment of a development environment, and C ++ program was then written. Ache was used to formulate the detection solution capable of detecting organic phosphorus and carbamate pesticide. When Ache comes in contact with organic phosphorus or carbamate pesticide, it will inhibit the activity of Ache, causing Ache being unable to hydrolyze with acetylcholine (matrix) to become acetic acid and thiocholine. Such long-term acting will cause nerve conduction disorder to result in decreased memory. Alzheimer’s disease is a most apparent symptom caused by a decline in acetylcholine. When thiocholine reacts with the coloring agent, it will turn yellow from transparent. The higher the concentration of pesticide, the lower it contains thiocholine and the slower it turns yellow. On the contrary, the lower the concentration of pesticide, the higher it contains thiocholine and the faster it turns yellow. The yellowing process of the transparent test solution was video recorded through the camera being fixed on a light source, and the variation amount of RGB value was recorded every second. Finally, the concentration of pesticide in the vegetable was determined through the integral size of blue channel spectrum to achieve the goal of detecting pesticide residue value rapidly and cheaply.