In this paper, an automatic visual inspection system for checking silica caps is proposed. The proposed system is able to inspect silica cap and detect outer ring and inner cap defects. This variability is managed in an automatic way by means of using reject piston to automatically reject defects. Furthermore, the system is coupled to install the product on a conveyor to achieve inspection process without affecting the production act time. To achieve a robust inspection process, two algorithms are introduced; the first is a segmentation algorithm for extracting outer ring from images, while second is a recognition algorithm for inner cap inspection. Experimental results on different lots of real production show the robustness and reliability of the proposed in inspecting the silica caps.