-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tesseract1.doOCR method doesn't take into account the stride of the image #257
Comments
@kpentaris The stride may be used internally by Tesseract OCR engine, but its public C API does not use or expose it, so Tess4J does not need to consider it. |
@nguyenq the C API has the TessBaseAPISetImage call which takes the |
@nguyenq hello. Is there a commit number where this issue is fixed (since it was marked as completed)? |
@kpentaris Sorry, it was meant to close as not planned since it's not an issue. Tesseract engine does not consider image stride. |
@nguyenq I'm confused, in my previous comment I showed exactly where it considers it in the |
@kpentaris I misunderstood your statement. Please submit a PR. |
Hello,
We recently integrated Tesseract and Tess4J and noticed that the APIs do not take into account the stride of the image which can potentially differ from the width or xsize of the image. I thought that maybe the
setImage
method would calculate this using theByteBuffer.capacity()
or something but checking the implementation it just assumes that the stride will be a multiple of the width and the bytes per pixel which is not always case e.g. when storing color images using 32bits but the bit depth still is 24. Is there something I'm missing or is this something to be fixed?The text was updated successfully, but these errors were encountered: