2024-09-30 20:30:21 发布
网友
我使用Tesseract Python包装器来获取文本图像的方向。当我使用Tesseract OCR(而不是API)时,将模式设置为-psm 0可以工作,但我不知道如何在使用包装器时提取这些信息。 我看过文档,并尝试使用AnalyseLayout方法,但似乎找不到正确的方法。有什么想法吗??在
谢谢!在
下面是如何用Java实现它。我想Python也应该是类似的。在
IntBuffer orientation = IntBuffer.allocate(1); IntBuffer direction = IntBuffer.allocate(1); IntBuffer order = IntBuffer.allocate(1); FloatBuffer deskew_angle = FloatBuffer.allocate(1); int success = api.TessBaseAPIRecognize(handle, null); if (success == 0) { TessAPI.TessPageIterator pi = api.TessBaseAPIAnalyseLayout(handle); api.TessPageIteratorOrientation(pi, orientation, direction, order, deskew_angle); }
下面是如何用Java实现它。我想Python也应该是类似的。在
相关问题 更多 >
编程相关推荐