#๐ Text from image to Excel
34 messages ยท Page 1 of 1 (latest)
@novel anvil
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
kinda looks like a web interface, what game is this? do you have the font in use?
Game of Thrones: Winter is Coming and I have no idea about the font
And it is more or less a tab in-game where you can see the performance of each individual alliance member... There's no way to download the whole sheet from the game and the way our stat-keeper has done it till now is manually writing it down for each member... Which is... Well... Really time consuming and stupid
pytesseract.image_to_string('image.jpeg') what is the result of this?
This is what it does now, with the submitted code
it looks more or less sensible
what i would do, is to read the image as regions for each row
That's exactly what I'd like to do but have no idea what to write in the code... ๐
Took me honestly 6 hours just to form this code... As I've said, I'm a complete newbie
fyi tesseract is known for being bad with tables, they even mention it in their documentation https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html#tables-recognition
I have previously used pillow to get rows from an image before putting it to pytesseract
!pypi pillow
Got that one installed already
yeah, you should try and separate each cell before running it through tesseract if you can
Have PyAutoGUI, Pytesseract, openpyxl, numpy, opencv-python, pillow and image
How exactly do I do that? ๐
you count the number of pixels for each row, and you iterate over it based on the total height
Is the image guaranteed to always be on the same same format, with the exact same dimensions and offsets?
No
The screenshots are taken manually using windows snipping tool
Good luck with on point accuracy ๐
it does not have to be dead on, but it does need to be accorate
You can correct for a few dozen pixels by cropping the top-left, finding the Member Name and offseting it to where it is supposed to be
Ya, figured
How would you write it in the code?
:warning: The owner of this post is no longer in the server.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.