Color Feature-based Pillbox Image Color Recognition

Peng Guo, Ronald J. Stanley, Justin G. Cole, Jason Hagerty, William V. Stoecker


Patients, their families and caregivers routinely examine pills for medication identification. Key pill information includes color, shape, size and pill imprint. The pill can then be identified using an online pill database. This process is time-consuming and error prone, leading researchers to develop techniques for automatic pill identification. Pill color may be the pill feature that contributes most to automatic pill identification. In this research, we investigate features from two color planes: red, green and blue (RGB), and hue saturation and value (HSV), as well as chromaticity and brightness features. Color-based classification is explored using MatLab over 2140 National Library of Medicine (NLM) Pillbox reference images using 20 feature descriptors. The pill region is extracted using image processing techniques including erosion, dilation and thresholding. Using a leave-one-image-out approach for classifier training/testing, a support vector machine (SVM) classifier yielded an average accuracy over 12 categories as high as 97.90%.


  1. Boughen, N., & Gross, J. (2003). Lightwave 3D 7.5 Lighting. book, Plano, TX, USA: Wordware Publishing Inc.
  2. Chang, C., & Lin, C. (2011). LIBSVM?: A Library for Support Vector Machines. ACM Transactions on Intelligent Systems and Technology (TIST), 2, 1-39.
  3. Cortes, C., & Vapnik, V. (1995). Support-vector networks. Machine Learning, 20(3), 273-297.
  4. De, S., Stanley, R. J., Lu, C., Long, R., Antani, S., Thoma, G., & Zuna, R. (2013). A fusion-based approach for uterine cervical cancer histology image classification. Computerized Medical Imaging and Graphics, 37(7- 8), 475-487.
  5. Gu, Q., Dillon, C. F., & Burt, V. L. (2010). Prescription drug use continues to increase: U.S. prescription drug data for 2007-2008. NCHS Data Brief, (42), 1-8. Retrieved from
  6. Guo, P., Banerjee, K., Stanley, R., Long, R., Antani, S., Thoma, G., … Stoecker, W. (2015). Nuclei-Based Features for Uterine Cervical Cancer Histology Image Analysis with Fusion-based Classification. IEEE Journal of Biomedical and Health Informatics, (c).
  7. Julie N. Barrows Arthur L. Lipman, C. J. B. (2009). Color Additives: FDA's Regulatory Process and Historical Perspectives. book.
  8. Kantor, E. D., Rehm, C. D., Haas, J. S., Chan, A. T., & Giovannucci, E. L. (2015). Trends in Prescription Drug Use Among Adults in the United States From 1999-2012. Jama, 314(17), 1818-1831.
  9. Lee, Y. B., Park, U., Jain, A. K., & Lee, S. W. (2012). Pill-ID: Matching and retrieval of drug pill images. In Pattern Recognition Letters (Vol. 33, pp. 904-910).
  10. Madsen, D. J., Payne, K. S., Hagerty, J. R., Szanto, N., Wronkiewicz, M., Moss, R.H., Stoecker. W.V. (2013). Automatic Pill Identification from Pillbox Images. In: 8th International Conference on Computer Vision Theory and Applications (VISAPP), 21-24 February 2013. 378-384.
  11. Poynton, C. A. (2003). Digital video and HDTV?: algorithms and interfaces. Morgan Kaufmann Publishers.
  12. Schumock, G. T., Li, E. C., Suda, K. J., Wiest, M. D., Stubbings, J., Matusiak, L. M., … Vermeulen, L. C. (2015). National trends in prescription drug expenditures and projections for 2015. American Journal of Health-System Pharmacy?: AJHP?: Official Journal of the American Society of Health-System Pharmacists, 72(9), 717-736.
  13. Thielke, S. M., Simoni-Wastila, L., Edlund, M. J., DeVries, A., Martin, B. C., Braden, J. B., … Sullivan, M. D. (2010). Age and sex trends in long-term opioid use in two large American health systems between 2000 and 2005. Pain Medicine (Malden, Mass.), 11(2), 248-56.
  14. Wan, X., Woods, A. T., Salgado-Montejo, A., Velasco, C., & Spence, C. (2015). Assessing the expectations associated with pharmaceutical pill colour and shape. Food Quality and Preference, 45, 171-182.

Paper Citation

in Harvard Style

Guo P., J. Stanley R., G. Cole J., Hagerty J. and V. Stoecker W. (2017). Color Feature-based Pillbox Image Color Recognition . In Proceedings of the 12th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 4: VISAPP, (VISIGRAPP 2017) ISBN 978-989-758-225-7, pages 188-194. DOI: 10.5220/0006136001880194

in Bibtex Style

author={Peng Guo and Ronald J. Stanley and Justin G. Cole and Jason Hagerty and William V. Stoecker},
title={Color Feature-based Pillbox Image Color Recognition},
booktitle={Proceedings of the 12th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 4: VISAPP, (VISIGRAPP 2017)},

in EndNote Style

JO - Proceedings of the 12th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 4: VISAPP, (VISIGRAPP 2017)
TI - Color Feature-based Pillbox Image Color Recognition
SN - 978-989-758-225-7
AU - Guo P.
AU - J. Stanley R.
AU - G. Cole J.
AU - Hagerty J.
AU - V. Stoecker W.
PY - 2017
SP - 188
EP - 194
DO - 10.5220/0006136001880194