12

The question How to get text of image using Tesseract was closed for the needs of details and clarity.

However, from my point-of-view the question is clear.

Let me rephrase the question:

  • OP failed to extract the characters from the given input image using tesseract-ocr. Therefore asking suggestions what to do?

The question is related with image-processing and the characters can be extracted by applying pre-preprocessing technique.

I re-read the cast close and reopen votes and I don't understand why the question was closed. Maybe my point-of-view for the question may not be correct.

18
  • 11
    You can't see the times the votes were made, but the original iteration of the question (timeline) was far less detailed. I wouldn't be surprised if the first 2 were cast pre this revision and the last was a "pile on" vote.
    – Thom A
    Commented Jan 27, 2021 at 15:40
  • 1
    @Larnu The second vote was made from the CV review queue about 30 minutes prior to the edit. Only the final close voter voted on the updated version.
    – Ivar
    Commented Jan 27, 2021 at 15:47
  • 5
    If so, then I would suggest my guess is a likely scenario, and that the final voter may have only voted because there were 2 (previously) valid close votes, @Ivar . Or they just didn't really read the question in the review. To my eyes, it now looks "OK", however, my knowledge of Python is limited, and I would not like to cast a reopen vote on something that I can't truly say is on topic for the tag.
    – Thom A
    Commented Jan 27, 2021 at 15:49
  • 4
    The only people who can tell you why they voted to close are the people who voted to close. We can make suppositions and guesses based on the timing and whatnot, but only they can give definitive answers. If you think the question should be reopened, cast a reopen vote. Commented Jan 27, 2021 at 16:21
  • 1
    @HereticMonkey I did cast a reopen vote. Why? Because OP applied two pre-processing methods but still could not achieve an accurate result. If you ask me, OP has done the research. But I also wonder about your ideas on the topic. I'm happy to hear your reasons for my question. Thank you.
    – Ahx
    Commented Jan 27, 2021 at 16:29
  • 7
    Reopened. You don't need to see their identification. These aren't the droids you're looking for. You can go about your business. Commented Jan 27, 2021 at 16:38
  • 4
    Lots of people mistake "I don't understand this question" for "this question is unclear." This problem worsens as questions that aren't duplicates become more and more esoteric. Commented Jan 27, 2021 at 16:57
  • 11
    @StackOverthrow: There's not that much difference. It's the responsibility of the question-asker to ask the question in such a way that it can be understood. Commented Jan 27, 2021 at 17:16
  • 5
    @RobertHarvey In many cases, as apparently in this one, the asker has fulfilled that responsibility and the question is perfectly understandable to people with the right obscure knowledge. I reject the idea that all questions should be generally understandable. Should every question about a given language explain all the pertinent language features known by experienced users of that language? Every question would be a book. Commented Jan 27, 2021 at 17:28
  • 4
    @StackOverthrow: The OP clarified their question an hour after they asked it. So yes, it's a decent question now. Commented Jan 27, 2021 at 17:36
  • 5
    Am I the only one who minds that this is still a debugging question without MCVE and at least one syntax error? Commented Jan 27, 2021 at 19:14
  • 7
    Keep in mind that there are not enough close reasons to cover all bases. I have a series of mental categories that I "feed" into each of the existing close reasons. Thus when I use "unclear" as a close reason, I may mean something quite different but for which I am given no better existing close reason to use. So my point is, don't take the close reason too seriously / literally.
    – matt
    Commented Jan 27, 2021 at 19:51
  • 4
    @Ahx You should upvote good questions – it is fine not to vote on "okay" question. The second question you show barely contains a clear programming problem, is very open-ended, yet very specific to the OP's issue. Commented Jan 27, 2021 at 20:46
  • 6
    @MisterMiyagi No, you're not. Unfortunately the consensus nowadays seems to be that every asker is a special snowflake who deserves the benefit of the doubt, and to be mollycoddled and hand-held down the garden path until they reach the outcome they desire. It doesn't help that the current crop of moderators seem intent on reinforcing that idea, which is entirely contrary to the way Stack Overflow was conceived to work. I'm an atheist, but God helps those who help themselves, and if you aren't going to help us to help you up-front, tough luck - you don't get helped.
    – Ian Kemp
    Commented Jan 28, 2021 at 12:02
  • 5
    And honestly, most of these "Tesseract isn't reading my image" questions are all the same and trivially solved with some basic research on the subject. But basic research and/or understanding no longer seems to be a requirement on Stack Overflow, it doesn't even matter if you've never programmed before - come one, come all to the Stack Overflow bazaar, where for sure somebody who cares about imaginary internet points more than quality will give you an answer to your problem, no matter how trivial that problem is or how easily it could be solved with 5 seconds of Googling.
    – Ian Kemp
    Commented Jan 28, 2021 at 12:08

2 Answers 2

35

As the 1st close voter, here’s my side of the story. (I don't speak for the other close voter.)

For reference, here's a screenshot of the relevant part of the question's timeline:

image of timeline top half

image of timeline bottom half

I saw the question when it was posted as Revision 2 ("edited title"). It basically looked like this:

question revision 2

Notice that there weren't any details about the processing from the raw image to the passed img to Tesseract. Did they load the image properly? Did they do any pre-processing? If there was pre-processing, did they do it correctly? Maybe they messed up in how they loaded img, that's why Tesseract couldn't read the text. (In hindsight, closing as lacking a MCVE could also be used here).

You say that the question can be rephrased as "asking suggestions what to do?" and "The question is related with image-processing and the characters can be extracted by applying pre-preprocessing technique.". But, that isn't fine to me, because that's basically a "give me the codes" or a "give me a tutorial" type of question, and I don't like Stack Overflow becoming a place where people dump their input images so that people can write the OCR code for it.

I didn't VTC as "give me the codes" because to me it looked like they did something, but it's just not giving the correct result, and we can't help them fix it because we don't know what that something they did. (side note: in your answer, it could be great to explain what was wrong in their original code.)

That's my reason for voting to close as "needing details or clarity". I voted based on Revision 2 at 2021-01-27 10:57:46Z and also left a comment "What is img? How is that image loaded into img?" at 2021-01-27 10:57:42Z. (The comment is now deleted since it's no longer needed, but it's in the screenshot of the timeline up above). The OP edited the post afterwards (Revision 3 ("added 632 characters in body")) where they described how they loaded img. I would think it's the result of my comment.

Both of my actions were done before the OP edited it at 2021-01-27 11:25:21Z to what it looks like now. It was a mere ~30mins or so after my vote, but unfortunately, I already signed-off for the day (read: detached myself from my PC). That's dinner time here where I'm at, and I usually check on things I commented and voted on only on the next day. I would have probably retracted my vote or voted to reopened if I've seen it this morning. You could have also pinged me in the comment to ask me to retract/reopen.

Not to sound defensive, but in case someone argues that I could have commented first before VTC-ing or waited for a response:

  • There is no way for me to know then when/if OP will respond
  • This isn't 1-on-1 tech support
  • It was already in the Close Votes queue, so I'm guessing someone already flagged it
  • The How To Ask, MCVE, and Ask Question guidelines clearly states to provide all the details necessary when you are posting your question, particularly a reproducible copy of your code that exhibits the problem
3
  • 27
    There is no reason to be defensive. You closed the question due to its nature at the time you saw it. After that, your obligation is complete. You don't have to come back to the question ever again to see if they edited it into shape. You don't need to comment first (or at all) and wait around until or if the OP responds. The question was close-worthy at the time you saw it and you voted to close. Thank you for performing that duty. Commented Jan 28, 2021 at 1:02
  • 2
    @HereticMonkey just to add to what you said: How long should we wait for a poster to clarify a question before closing?
    – VLAZ
    Commented Jan 28, 2021 at 7:25
  • 6
    "I would have probably retracted my vote or voted to reopened if I've seen it this morning. You could have also pinged me in the comment to ask me to retract/reopen.". You have misinterpreted me. If you look at the end of my question, you will see "Maybe my point-of-view for the question may not be correct." My aim was not to make the question reopened. I want to get the insights of as many people as I can. Reread their ideas, learn from them. Thank you for sharing your ideas with me. Regards
    – Ahx
    Commented Jan 28, 2021 at 8:29
3

From the question history it was "unclear" when closed - after editing in details and this question here it was then reopened.

At it's current state and after the latest edits it could be closed as "need debugging details" again (or/and may warrant a downvote for not enough research done):

Closevote again:
In it's current form the question does no longer shares the speckled input-image, there is no way to reproduce the problem which might lead to a "need debugging details" closing (and partly invalidates your answer).

The current version of the question has an IndentationError in it (which might be another reason for the currently 2 "needs debugging details" close votes). It might also be a sign of the OP posting code that is not really executed on his side - or it might be a copy/paste error (most probably cause).

Dupevote:
Providing an answer for a specific image in question might or might not have much worth for later users - does this question merit a specific "preprocessing steps" answer or should we close it as as dupe - or do both?

OCR and image processing is an art and highly input dependent. There are plenty of ressources on SO that handle improving OCR quality using open-cv:

which could act as close-dupe-targets. Your answer to use Dilatation/Erosion with adaptive thresholding is a common thing to do for preprocessing and covered in other answers "improve orc for tesseract"-kind of questions: here or there (OP already did dilate/erosion in his code).

Researching SO for "OCR improve tesseract site:stackoverflow.com" would have provided ample questions/answers helping the OP out to solve it without asking.

Downvote:
There are tons of tutorials / how to / tips&tricks outside of SO that help - googling how to improve ocr pytesseract leads to about 96k results - which could warrant a "not enough research" downvote in its current state.


I edited the original image back into the question and fixed the indentation error after posting this to make the question "better" again.

1
  • 3
    "Researching SO for "OCR improve tesseract site:stackoverflow.com" would have provided ample questions/ answers helping the OP out to solve it without asking." I think that's the main intention behind the close votes. I see, so my first point-of-view was weak. Now I'm aware of how I should respond in the future. OP should have displayed all the trials/works at the question. Thanks for sharing your ideas. Regards.
    – Ahx
    Commented Jan 29, 2021 at 8:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .