I am working on a project where I am using OpenCV and Python to recognize English gestures from webcam feed and translate them into Marathi language. However, I am facing an issue with the translation process. Currently, my code translates English gestures into Marathi pronunciation, but I want to achieve true Marathi translations. For example, when the gesture for "Hello" is recognized, I get the the Marathi translation as 'हॅलो', I want the translation to be "नमस्कार" (which means "Namaskar" in Marathi). I am using the python PIL library as shown in this article :Python OpenCV putText() show (non-ascii, unicode, utf) character symbols
Additionally, I also want to ensure that numbers are displayed the same instead of random Marathi alphabet letters. For example, for "1" it displays random alphabet 'ख'.
pil_image = Image.fromarray(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
draw = ImageDraw.Draw(pil_image)
english_text = ' '.join(sentence)
translated_text = ' '.join(translated)
draw.text((3, 30), english_text, fill=(255, 255, 255), font=font)
draw.text((3, image.shape[0] - 40), translated_text, fill=(255, 255, 255), font=font)
This the code that I'm using to display the Image on Opencv feed. Is there a way to Fix my problem?