Guitar playing requires accurate finger placement for playing chords. The integration of computer vision holds promise as a supportive tool for real-time assistance, especially for novice players to master finger positions. However, challenges arise in real-time chord recognition, particularly when dealing with tilted guitar fretboards, leading to potential misclassifications. Additionally, discerning between chords with similar shapes remains a persistent obstacle. This research addresses the imperative need for automatic chord recognition in real-time through the application of image processing techniques. The proposed solution adopts a two-step methodology involving keypoint detection to identify crucial finger positions and a machine learning model for chord classification. The model, particularly in its second version utilizing inter-keypoint distances, aims to overcome challenges associated with tilted guitar orientations and enhance accuracy in classifying chords with similar shapes. The construction of the training dataset utilizes Google's Mediapipe framework for keypoint detection to process chord images acquired from multiple online sources. Evaluation encompasses a comprehensive analysis of the model's performance based on accuracy metrics, with a specific focus on its proficiency in handling non-horizontal guitar orientations and accurately classifying chords with similar shapes. Experimental results demonstrate the superiority of the model incorporating inter-keypoint distances, achieving an impressive accuracy of up to 88.24% for a 7 chords classifier in our testing set. This performance outpaces models relying solely on raw keypoints and surpasses methodologies proposed by previous works. The enhanced accuracy is particularly evident in scenarios involving non-horizontal guitar orientations and improved precision in distinguishing between chords with similar shapes.