This document presents a new algorithm in MATLAB to extract vehicle number plates from images in various lighting conditions. The algorithm uses preprocessing techniques like grayscale conversion, dilation, and edge detection. It then segments the region of interest containing the number plate and extracts it. Individual characters are then segmented and recognized using template matching. The algorithm achieves 99% accuracy on images taken from a fixed angle and distance under controlled conditions. It is less accurate for images with problematic backgrounds or lighting. The algorithm provides an automated way to extract number plates for applications like traffic monitoring, parking management, and stolen vehicle identification.