如何从图像倾斜角度图像、角度

2023-09-07 02:31:56 作者:如果回不去,我会努力忘记

我面临的问题得到。我现在用的tesseract API进行图像处理的图像倾斜角度。我已经搜索网络上很多,但没有合适的解决方案中。我用下面的code:

  Pix的测试= ReadFile.readBitmap(bitmap.createBitmap(400,400,Config.ARGB_8888));浮角= Skew.findSkew(试验); 

从上面code,我得到的角度值0.0。请帮我解决这个问题,或者显示正确的方向来解决这个问题。

解决方案

  TessBaseAPI baseApi =新TessBaseAPI();baseApi.setImage(位图);Pix的测试= baseApi.getThresholdedImage();浮动= Skew.findSkew(试验); 

有时得到0.0,一般工作。但我不知道正确的。

一文看懂倾斜摄影技术原理 精度提升 成果检查

I am facing problem to get the skew angle from image .I am using tesseract api for image processing. I have searched a lot on web but no appropriate solution found. I have used following code:

Pix test=ReadFile.readBitmap(bitmap.createBitmap(400, 400, Config.ARGB_8888));
float angle=Skew.findSkew(test);

from above code I get angle value 0.0. Please help me to resolve this problem or show the right direction to resolve this problem.

解决方案

TessBaseAPI baseApi = new TessBaseAPI();
baseApi.setImage(bitmap);    
Pix test = baseApi.getThresholdedImage();
float a = Skew.findSkew(test);

Sometimes get 0.0, generally work. But I'm not sure of the correct.