agentchat.contrib.captainagent.tools.information_retrieval
agentchat.contrib.captainagent.tools.information_retrieval.optical_character_recognition
optical_character_recognition
Perform optical character recognition (OCR) on the given image.
Arguments:
image
Union[str, Image.Image] - The image to perform OCR on. It can be either a file path or an Image object.
Returns:
str
- The extracted text from the image.
Raises:
FileNotFoundError
- If the image file path does not exist.