Computational Epigraphy plays a significant role to extract the information about the cultural heritage of various civilizations of the dynasty which includes rich political thoughts, literature, mythology, architecture, medicine, script evolution, etc. Traditionally the study of the epigraph is performed manually and hence the quantitative analysis of script is required. The proposed methodology recognizes the ancient Grantha script. Our approach, builds a K-Nearest Neighbor predictive model, replacing the data to function as a classification basis. Automatically the value of K is calculated as it varies for several data, and is optimized in terms of efficiency. The advancement in computer vision techniques has supported various types of real-time application tasks. One such task is the ability to recognize a character or normally referred to as OCR. There are also several types of algorithms that can be transposed into an OCR. This work aims at figuring out the process behind the OCR model by using K-Nearest Neighbor algorithm and a basic OCR system is developed to identify Grantha script for generating and comparing actual results. The initial step is to train the machine to recognize the ancient character by using the classification algorithm K-nearest neighbor with Laplacian of Gaussian (LoG) filter. This framework obtained the prediction rate of 91% with 800 samples per character for recognizing the ancient script