How to Extract Text from Real-Time Generated Images?

8 visualizzazioni (ultimi 30 giorni)
Huzaifa
Huzaifa il 18 Ott 2024
Commentato: Huzaifa il 21 Ott 2024
Hi everyone,
I am trying to extract text from real-time images that are continuously generated during my experiments. The images are similar to the one attached, where text data is displayed in purple over a white background. I have attempted several approaches but haven't been successful in accurately capturing the text from these images.
I have tried using MATLAB's ocr function, but the results are inconsistent, likely due to the specific formatting and color of the text.
Here's what I need help with:
  1. A reliable method to extract text from these images, particularly where the text is purple and the background is white.
  2. Any suggestions on pre-processing steps (such as filtering the purple text) that could improve the accuracy of text recognition.
If anyone has faced a similar issue or has ideas on how to solve this, I would really appreciate your input!
Thanks in advance!
  2 Commenti
DGM
DGM il 18 Ott 2024
Are the images always purple on white with the text in the exact same location?
Is all the text required, or is it only a particular set of fields that are important?
Is it necessary to extract the information in real time, or would it suffice to capture the images and post-process them later?
I don't have OCR tools to test, but the answers to these questions might change the amount of latitude you have.
Huzaifa
Huzaifa il 21 Ott 2024
Are the images always purple on white with the text in the exact same location?
The images appear in purple on white, but the text is not always in the same location.
Is all the text required, or is it only a particular set of fields that are important?
All the text in purple is important.
Is it necessary to extract the information in real time, or would it suffice to capture the images and post-process them later?
Yes, I want to automate the entire process in real time.

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 18 Ott 2024
You can pre-train against a set of representative images; see trainOCR
However... I note that ocr tends to be on the slower side, and so possibly not suitable for real-time generated images.
  1 Commento
Huzaifa
Huzaifa il 21 Ott 2024
Thanks for the suggestion! I'll look into trainOCR to see if pre-training on a set of representative images improves the results. You're right about ocr being on the slower side—it has been one of the challenges I'm facing with real-time image generation.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by