The document describes a proposed system for real-time object tracking and learning using template matching. The system uses a live video stream and enables the tracking, learning, and detection of real-time objects. It selects an object of interest via cropping and then tracks it with a bounding box. Template matching is used to match the selected object with regions of interest in subsequent frames to mark its location. If a match is found, principal component analysis is used. The system also introduces a PN discrimination algorithm using background subtraction to increase frame processing speed and improve template matching accuracy. This allows the system to overcome limitations of existing methods and enable long-term, real-time object tracking.