The output is being sorted randomly for the 'Extract Text from Images in Folder...' feature.
amymor opened this issue · comments
Describe the bug
I want to extract text from a series of photos and the order of the images is important to me. Let's say I have 1000 images named screenshot (1).png
, screenshot (2).png
, etc. The extracted text should follow this order by name, but it appears to be extracted randomly.
Where is the bug
- Edit Text Window
- OCR Output
To Reproduce
Steps to reproduce the behavior:
- Go to 'Edit Text Window'
- Click on 'Capture' > 'Extract Text from Images in Folder...'
- Select Folder
- See error
Where did you get Text Grab?
- GitHub releases
- Self-contained
Desktop (please complete the following information):
- OS: Windows 10
- Version 22H2
- Text Grab Version v4.2.0
Additional context
I also tried the drag and drop method but the result is the same.
Thanks in advance.❤️
The process of extracting many images is multi-threaded to speed things up. Because of this the threads will return at different times depending on how long it takes to perform the OCR. The only way to keep everything in order would be to:
- Force single threaded operation, (much slower to do OCR on large batch)
- Complex order tracking and insertion logic to return the results and keep them ordered, (complex and time consuming to write)
- Do not return any results until fully complete, (no feedback result, would maybe seem slower).
This could be a good option for when OCRing stuff like pages in a book