Skip to content
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

重载getRotRectImg()函数,修改文本行裁切方式,保证文本方向一致。 #293

Open
wants to merge 1 commit into
base: onnx
Choose a base branch
from

Conversation

zwy4896
Copy link

@zwy4896 zwy4896 commented Nov 6, 2020

原始版本getRotRectImg()方法对于左高右低的文本行(↘类似这种走势)旋转会出问题(文本上下颠倒)。整体思路:先对文本框做boundingRect,将boundingRect区域取出(同时要扩边,否则抠出的文本行两端会不完整),再对该区域整体旋转minareaRect的角度,再将文本框坐标映射至旋转完成的boundingRect区域,并取出映射完成后的文本框区域。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant