This document presents a method for inspecting and classifying defects in pharmaceutical capsules using neural networks. Harris algorithm is used to detect defects by comparing test capsule images to template images and marking differences. Detected defects are classified using a neural network trained on threshold values extracted from defective areas. The neural network achieved 97.9% accuracy in training, 100% in validation, and 94.2% in real-time testing, demonstrating the method can effectively automate capsule inspection.