How to Extract Text from Real-Time Generated Images?

8 ビュー (過去 30 日間)
Huzaifa
Huzaifa 2024 年 10 月 18 日
コメント済み: Huzaifa 2024 年 10 月 21 日
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 件のコメント
DGM
DGM 2024 年 10 月 18 日
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 2024 年 10 月 21 日
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.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2024 年 10 月 18 日
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 件のコメント
Huzaifa
Huzaifa 2024 年 10 月 21 日
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.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by