Tesseract Ocr不适合与Androidx.Camera一起使用
我使用Androidx.Camera软件包构建了一个带有相机视图的应用程序应用程序。因此,该应用显示相机流,用按钮拍照,并用Tesseract读取图片文本。问题在于Tesseract无法识别图像的文本(它仅返回了细微的字符),但是,如果我使用普通相机照片的意图拍摄相同的照片,Tesseract可以完美地工作并识别文本。因此,如果有人知道问题可能是什么,我感谢任何帮助。
i builded an andoid application with a camera view, using the androidx.camera packages. So, the app shows the camera stream, take a picture with a button and read the picture text with tesseract. The problem is that tesseract doesn't recognize the text of the image (it returns just nosense characters), but, if i take the same photo using a normal camera photo intent, tesseract works perfectly and recognize the text. So, if anyone knows what the problem could be i appreciate any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到了问题所在。问题在于相机方向。事实证明,Androidx.Camera在Android Camera应用程序以外产生了其他方向的图片。因此,Tesseract识别出相机应用程序图片,但它没有Androidx.Camera图片。我找到了解决此问题的解决方案,通过处理图片位图旋转,此处: https://stackover.com/a/stackover.com/a/a/a/a/a/a/1406265/1404040995
I already found what the problem is. The problem was about the camera orientation. Turns out androidx.camera produced pictures with other orientation than the android camera app. So, tesseract recognized the camera app pictures but it didn't the androidx.camera pictures. I found the solution to this problem, by handling the picture bitmap rotation, here: https://stackoverflow.com/a/14066265/14040995