簡易檢索 / 詳目顯示

研究生: 劉黃裕
Huang-Yu Liu
論文名稱: iPill: 高效率及全自動化藥物辨識系統於手機平台之實現
iPill: Highly Efficient and Fully Automatic Pill Recognition System on Android Smart Phone
指導教授: 郭景明
Jing-Ming Guo
口試委員: 花凱龍
Kai-Lung Hua
沈中安
Chung-An Shen
徐繼聖
Gee-Sern Hsu
丁建均
Jian-Jiun Ding
王乃堅
Nai-Jian Wang
學位類別: 碩士
Master
系所名稱: 電資學院 - 電機工程系
Department of Electrical Engineering
論文出版年: 2015
畢業學年度: 103
語文別: 中文
論文頁數: 204
中文關鍵詞: Android自動化藥物辨識系統色彩切割區塊合併陰影偵測特徵擷取幾何特徵形狀特徵顏色特徵刻痕特徵
外文關鍵詞: Pill Recognition, Drug Recognition, Medicine Recognition, Region Merging, Geometric Feature, Imprint Feature
相關次數: 點閱:379下載:4
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

隨者年紀增長,眼力和記憶等都會隨者時間衰退,對於年長者來說,拿錯藥而服用是很有可能發生的。辨識藥物目前缺乏相關工具,大部分情況必須依靠專業人力作判斷,相當不便,而其誤判所造成的問題將直接影響個人健康。本論文提出一手機辨識App,結合Android手機提供民眾自我健康管理,尤其是藥物外觀辨識的參考工具。民眾可以自行下載藥物辨識程式—iPill,並配合藥物辨識外框使用,藥物辨識外框可以直接在應用程式的介紹頁面作下載使用,在自己或是家中年長者服藥時再確認一次,避免吃錯藥的風險。未來可進一步發展為居家照護,提醒家中的長輩吃藥、記錄當天的吃藥次數,避免吃太多藥,或是沒有吃藥的情況發生。
首先,必須要配合使用一個測量參考(Measure reference),將藥物放置於測量參考當中,並對藥物作拍攝,測量參考主要是對藥物的大小作正規化的動作,先利用自適性二值化(Local Adaptive Thresholding,LAT)以及最大通道差異(Maximum Channel Difference,MCD),將候選前景(Candidate foreground)的部份擷取出來,再利用本論文所提出的像素比對法色彩切割(Pixel Matching Segmentation,PMS)配合區塊再合併(Merging method)的方式,將候選前景的部份利用色彩切割的方式,再分為不同的物件區塊,並在單一影像當中,利用候選前景以外的區域,建立Codebook Model背景模型,利用該背景模型,作陰影偵測(Shadow detection),將在候選前景當中的背景部分去除以擷取出藥物的部份。
在特徵方面,本論文提出使用外觀以及刻痕特徵作為藥物辨識系統的分類特徵,外觀特徵細分為幾何特徵、形狀特徵、以及顏色特徵,刻痕特徵配合同心圓遮罩,將藥物的部分以同心圓的方式分為若干層,計算出藥物的刻痕資訊,最後將這些特徵組合為一維的特徵向量,輸入至libSVM當中作訓練,訓練出強健的藥物辨識分類器,並將訓練出來的分類器輸入到手機當中,以在手機平台上面實現自動化的藥物辨識系統,本論文所提出的藥物辨識系統,使用自建的藥物資料庫,收集100種臺灣常見藥物作測試,其辨識效果可達99.07%,且具有抗光影、抗旋轉的辨識效果。


Senior people may not be able to recognize the type of pill, and thus eating by mistake. Another possibility is the wrong frequency of pill taking in a day. The above are undoubtable critical issues in healthcare. Consequently, we develop an Android application to avoid the above scenarios.
This thesis presents an efficient pill recognition method, which is useful in the application of healthcare. Specifically, an effective color segmentation called Pixel Matching Segmentation (PMS) with local adaptive thresholding (LAT) is utilized to segment the pill region, proposed a high accuracy shadow removal method with building codebook model in single image, where the geometric and rotation invariant imprint features are extracted with the aid of reference background. Since the imprint on the pill may not be clear in the image because of luminace variant, parametric oriented histogram equalization (POHE) is deployed to efficiently enhance the image, and the concentric circle masks is proposed to extract the imprint features. Subsequently, the libsvm is applied to train the model for pill recognition and classification. The proposed method is implemented on an Android mobile phone for testing and evaluation purposes. The proposed method yields a recognition accuracy of 99.07% of common 100 types of pill in Taiwan. Experimental results suggest that the proposed method can be an effective and convenient way for the application of pill recognition.

中文摘要 I Abstract III 誌謝 IV 教授推薦書 V 審定書 VI 目錄 VII 圖表索引 X 第一章 緒論(Introduction) 20 1.1 研究背景與動機(Motivation) 20 1.2 主要貢獻(Main Contribution) 22 1.3 Android基礎架構(Fundamental Structure of Android) 23 1.3.1 前言(Abstract) 24 1.3.2 生命週期(Life Cycle) 25 1.3.3 活動(Activity) 32 1.3.4 Android中的影像處理(Image Processing in Android) 37 1.3.5 常見錯誤及例外狀況(Common Errors and Exceptions) 43 1.4 論文架構(Organization) 46 第二章 文獻探討(Reviews) 48 2.1 色彩切割(Color Segmentation) 48 2.2 支持向量機(Support Vector Machine,SVM) 59 2.3 手動查詢(Manual Query) 64 2.4 自動辨識(Auto Recognize) 66 第三章 藥物擷取演算法(Pill Segmentation) 88 3.1 前言(Abstract) 89 3.2 測量參考(Measure Reference) 93 3.3 區域自適性二值化(Local Adaptive Thresholding,LAT) 95 3.4 像素比對法影像切割(Pixel Matching Segmentation,PMS) 102 3.4.1 決定候選前景(Determined Candidate Foreground) 103 3.4.2 色彩切割(Color Segmentation) 106 3.5 區塊再合併(Merging Method) 119 3.6 陰影去除(Shadow Removal) 124 3.6.1 陰影偵測應用於串流影片(Shadow Removal Apply in Sequential Video) 126 3.6.2 陰影偵測應用於單一影像(Shadow Removal Apply in Single Image) 133 第四章 藥物特徵擷取(Feature Extraction) 149 4.1 幾何特徵(Geometric Features) 149 4.1.1 大小(Size) 149 4.1.2 周長(Perimeter) 150 4.1.3 長寬比(Aspect Ratio) 151 4.1.4 真圓度(Roundness) 152 4.2 形狀特徵(shape Feature) 152 4.3 顏色特徵(Color Feature) 156 4.4 刻痕特徵(Imprint Feature) 157 4.4.1 參數導向直方圖等化技術(Parametric Oriented Histogram Equalization,POHE) 158 4.4.2 同心圓遮罩(Concentric Circle Mask) 165 4.4.3 刻痕梯度特徵(Gradient Features) 166 4.4.4 刻痕直條圖特徵(Histogram Features) 168 4.5 參數最佳化(Optimize parameters) 169 第五章 實驗結果(Experiental Results) 172 5.1 資料庫(Database) 172 5.2 陰影偵測實驗結果(Experient Results of Shadow Detection) 180 5.3 藥物辨識實驗結果(Experient Results of Pill Recognition) 182 5.4 iPill使用方法介紹(iPill Manual) 188 第六章 結論與未來展望(Conclusions and Future Works) 196 參考文獻 198 作者簡介 203

[1] 林信良。Java SE7 技術手冊。臺灣台北市:碁資訊股份有限公司。2012。初版二刷。
[2] Gasolin。Google! Android手機應用程式設計入門。臺灣台北市:松崗資產管理股份有限公司。2013。五版初刷。
[3] 李興華。徹底研究Android手機應用程式開發實戰經典。臺灣台北市:上奇資訊股份有限公司。2013。初版。
[4] “Activity: Life Cycle,” Google Developers Website:
http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle.
[5] F. Keinosuke and Larry D. Hostetler, “The estimation of the gradient of a density function, with applications in pattern recognition,” IEEE Transactions on Information Theory, pp. 32-40, vol. 21, no. 1, Jan. 1975.
[6] C. Dorin and M. Peter, “Mean Shift: A Robust Approach Toward Feature Space Analysis,” IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 603-619, vol. 24, no. 5, May 2002.
[7] P. F. Felzenszwalb and D. P. Huttenlocher, “Efficient Graph-Based Image Segmentation,” International Journal of Computer Vision, pp. 167-181. vol. 59, issue 2, Sep. 2004.
[8] K. Jaechul and G. Kristen, “Boundary Preserving Dense Local Regions,” IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 931-943, vol. 37, issue 5, Apr. 2015.
[9] MacQueen and James, “Some methods for classification and analysis of multivariate observations,” Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, vol. 1, no. 14, 1967.
[10] L. Shapiro and G. Stockman. Computer Vision, Addison-Wesley, 2000.
[11] B. E. Boser, I. Guyon, and V. Vapnik, “A training algorithm for optimal margin classifiers,” In Proceedings of the Fifth Annual Workshop on Computational Learning Theory, pp. 144-152. ACM Press, 1992.
[12] C.-C. Chang and C.-J. Lin. LIBSVM: a library for support vector machines, 2001. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm.
[13] 國立臺灣大學附設醫院之藥物辨識系統:
http://www.ntuh.gov.tw/phr/intergrate.aspx.
[14] 長庚醫院之藥品綜合查詢:https://www.cgmh.org.tw/stor/drug001.asp.
[15] “Medicine Data Query System,” Food and Drug Administrator, Ministry of Health and Welfare, Taiwan R.O.C.,
http://www.fda.gov.tw/MLMS/(S(g4mcsjn2bvah5dnq5jvkxt45))/H0004.aspx
[16] L. Y. Beom and U. Park, “Pill-ID: Matching and retrieval of drug pill imprint images,” IEEE International Conference on Pattern Recognition (ICPR), pp. 2632-2635, Aug. 2010.
[17] Canny and John, “A computational approach to edge detection,” IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 679-698, vol. 8, issue 6, Nov. 1986.
[18] H. M. Kuei, “Visual pattern recognition by moment invariants,” IRE Transactions on Information Theory, pp. 179 – 187, vol. 8, issue 2, Feb. 1962.
[19] A. Hartl, C. Arth and D. Schmalstieg, “Instant Segmentation and Feature Extraction for Recognition of Simple Objects on Mobile Phones,” IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pp. 17-24, Jun. 2010.
[20] A. Hartl, C. Arth and D. Schmalstieg, “Instant Medical Pill Recognition on Mobile Phones,” International Conference Computer Vision (CV), pp. 188-195, Jun. 2011.
[21] Handheld Augmented Reality Christian Doppler Laboratory: Studierstube, 2011. Software available at https://handheldar.icg.tugraz.at/stbtracker.php.
[22] Handheld Augmented Reality Christian Doppler Laboratory: ARToolkitPlus, 2011. Software available at https://handheldar.icg.tugraz.at/artoolkitplus.php.
[23] Adobe Technical Guide, http://dba.med.sc.edu/price/irf/Adobe_tg/models/cielab.html.
[24] A. C. Evans, N. A. Thacker and J. E. W. Mayhew, “Pairwise Representations of Shape,” IEEE International Conference on Pattern Recognition (ICPR), vol. 1, pp. 133-136, Sep. 1992.
[25] P. Zhu and P. M. Chirlian, “On Critical Point Detection of Digital Shapes,” IEEE Transactions on Pattern Analysis and Machine Intellience, vol. 7, Issue 8, pp. 737-748, Aug. 1995.
[26] D. Kim and J. Chun, “Drug Image Retrieval by Shape and Color Similarity of the Medication,” First ACIS/JNU International Conference on Computers, Networks, Systems, and Industrial Engineering, pp. 387-390, May. 2011.
[27] J. J. Caban, A. Rosebrock, and T. S. Yoo, “Automatic Identification of Prescription Drugs Using Shape Distribution Models,” IEEE International Conference on Image Processing (ICIP), pp. 1005-1008, Oct. 2012.
[28] Z. Chen and S. Kamata, “A New Accurate Pill Recognition System Using Imprint Information,” International Conference on Machine Vision (ICMV), vol. 9067, Nov. 2013.
[29] B. Epshtein, E. Ofek and Y. Wexler, “Detecting Text in Natural Scenes with Stroke Width Transform,” IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 13-18, Jun. 2010.
[30] S. Belongie, M. Jitendra, and J. Puzicha, “Shape matching and object recognition using shape contexts,” IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 509-522, vol. 24, issue 4, Apr. 2002.
[31] “Shape context,” Wikipedia English: https://en.wikipedia.org/wiki/Shape_context.
[32] Altman, S. Naomi, “An introduction to kernel and nearest-neighbor nonparametric regression,” The American Statistician, pp. 175-185, 1992.
[33] “Databases, Resources & APIs,” United States National Library of Medicine (U.S. NLM), http://wwwcf2.nlm.nih.gov/nlm_eresources/eresources/search_database.cfm.
[34] F. Shafait, D. Keysers and T. M. Breuel, “Efficient Implementation of Local Adaptive Thresholding Techniques Using Integral Images,” The International Society for Optical Engineering Proceedings of SPIE, vol. 6815, pp. 26-31, Jan. 2008.
[35] T. Romen Singh, S. Roy and O. Imocha Singh, “A New Local Adaptive Thresholding Technique in Binarization,” International Journal of Computer Science Issues, Vol. 8, Issue 6, No. 2, pp. 271-277, Nov. 2011.
[36] P. Viola and M. J. Jones, “Robust real-time object detection,” Second International Workshop on Statistical and Computational Theories of Vision, Jul. 2001.
[37] L. Xu, F. Qi and R. Jiang, “Shadow Removal from a Single Image,” IEEE International Conference on Intelligent Systems Design and Applications, vol. 2, pp. 16-18, Oct. 2006.
[38] J. M. Guo, C. H. Hsia and Y. F. Liu, “Fast Background subtraction based on a multilayer Codebook model for moving object detection,” IEEE Transaction on Circuits and Systems for Video Technology, vol. 23, no. 10, pp. 1809-1821, Oct. 2013.
[39] E. J. Carmona, J. Martinez-Cantos and J. Mira, “A new video segmentation method of moving objects based on blob-level knowledge,” Pattern Recognit. Letter, vol. 29, no. 3, pp. 272-285, 2008.
[40] Y. F. Liu, J. M. Guo and B. S. Lai, “High Efficient Contrast Enhancement Using Parametric Approximation,” IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2444-2448, May. 2013.
[41] R. C. Gonzalez and R. E. Woods, Digital Image Processing, 2nd ed., Reading, MA: Addison-Wesley, 1992.
[42] Press, W., et al., “Numerical Recipes in Fortran 77: The Art of Scientific Computing, 933 pp." (1992).
[43] M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, NY: Dover, 1964.
[44] “Pill Identifier,” Drugs.com, http://www.drugs.com/pill_identification.html.
[45] 衛生福利部中央健康保險署:http://www.nhi.gov.tw/.
[46] 食品藥物消費者知識服務網:https://consumer.fda.gov.tw/People.aspx.

QR CODE