# Combination Pattern Method Using Deep Learning for Pill Classification
## 2 Related Studies
In a separate study [35], Support Vector Machines (SVM) were utilized to investigate color characteristics, achieving a classification accuracy of 97.90%. However, this precision was constrained by specific factors such as lighting conditions, camera resolution, and the contrast between the pill and background colors. Despite the substantial results of most existing research, these studies predominantly identify pills based on a subset of color and imprint features. There is a significant research gap in extracting distinctive features from complex pill shapes for classification purposes. We propose that leveraging such shape-based features could considerably enhance pill-classification performance. Hence, this paper specifically focuses on identifying unique feature points from intricately shaped pills. We employ a combination of four distinct algorithms--KAZE, ORB, Shi-Tomasi, and Harris--to fortify the robustness and accuracy of pill classification. The tasks of tracking or recognizing objects in images or videos are primarily performed via feature extraction. KAZE and ORB are representative feature-extraction algorithms in computer vision. The KAZE algorithm [36] was developed to improve the shortcomings of the conventional Scale-Invariant Feature Transform (SIFT) and Speeded-Up Robust Features (SURF) algorithms [37]. The SIFT algorithm detects features by generating image pyramids via Gaussian smoothing and Difference-of-Gaussian (DOG) operations. SIFT incurs a high computation cost because it generates images at variable scales by adjusting the size of the kernel used in Gaussian smoothing. The SURF algorithm detects features by generating images at various scales using the box filter rather than Gaussian smoothing. Figure 2 compares the feature extraction processes of the SIFT and SURF algorithms. Each algorithm offers a distinct method for detecting essential image features, and the diagram visually represents their respective approaches. In SIFT, the process begins by sampling gradients around a point of interest (POI). Figure 2 (left side) illustrates this with a circular region representing where gradients are computed. This step calculates changes in direction and magnitude at specific points to identify key features. After sampling the gradients, SIFT divides the area into 4 \(\times\) 4 blocks. Inside each block, eight orientations shown as arrows are defined to capture local image features with represent different gradient directions. SIFT extracts strong key points that are robust to transformations like  
scaling and rotation by assigning higher weights to pixels closer to the edges. The right side of the SIFT diagram encodes these local gradient orientations into a vector representation. This feature vector later matches features across different images, maintaining robustness against image transformations. On the right side of the figure, the SURF algorithm uses integral images created by calculating cumulative pixel values at each point. This approach enables rapid image scaling without iterative downscaling, reducing the overall computational cost. SURF detects features by recording neighborhood statistics within \(4\times 4\) blocks. The diagram depicts these blocks with green arrows highlighting the regions where the neighborhood statistics are calculated. Unlike SIFT, which uses eight directional histograms to capture gradients, SURF simplifies the process by employing only four neighborhood statistics, significantly reducing computation time while extracting critical features. Although SURF uses a box filter to increase computational speed, this filter has limitations, such as weaker orientation handling and lower rotational invariability. To mitigate these disadvantages, KAZE was designed to respond to the size, direction, rotation, and transformation of images using a nonlinear scale space in place of Gaussian smoothing. Consequently, the KAZE algorithm can extract more robust features [38; 39].