Real-World Pill Segmentation Based on Superpixel Merge using Region Adjacency Graph


Misidentified or unidentified prescription pills are an increasing challenge for all caregivers, both families and professionals. Errors in pill identification may lead to serious or fatal adverse events. To respond to this challenge, a fast and reliable automated pill identification technique is needed. The first and most critical step in pill identification is segmentation of the pill from the background. The goals of segmentation are to eliminate both false detection of background area and false omission of pill area. Introduction of either type of error can cause errors in color or shape analysis and can lead to pill misidentification. The real-world consumer images used in this research provide significant segmentation challenges due to varied backgrounds and lighting conditions. This paper proposes a color image segmentation algorithm by generating superpixels using the Simple Linear Iterative Clustering (SLIC) algorithm and merging the superpixels by thresholding the region adjacency graphs. Post-processing steps are given to result in accurate pill segmentation. The segmentation accuracy is evaluated by comparing the consumer-quality pill image segmentation masks to the high quality reference pill image masks.

Meeting Name

Proceedings of the 12th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, VISIGRAPP 2017 (2017: Feb. 27-Mar. 1, Porto, Portugal)


Electrical and Computer Engineering

Second Department


Keywords and Phrases

Clustering algorithms; Computer graphics; Computer vision; Errors; Graph theory; Iterative methods; Pelletizing; Pixels; Quality control; Superpixels; Clustering; Color image segmentation; Identification techniques; Lighting conditions; Region adjacency graphs; Segmentation accuracy; Simple Linear Iterative Clustering; Threshold Cut; Image segmentation; Segmentation

International Standard Book Number (ISBN)


Document Type

Article - Conference proceedings

Document Version


File Type





© 2017 SciTePress, All rights reserved.

Publication Date

01 Feb 2017