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

Fix coordinates sorting of textlines #628 #636

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Conversation

dmMaze
Copy link
Contributor

@dmMaze dmMaze commented Jun 6, 2024

Original Quadrilateral.pts sorting method failed to sort horizontal coordinates correctly, which resulted in wrong direction determination and wrong warp_transform for OCR. For example:
[[ 367, 1333],
[ 378, 1376],
[ 191, 1430],
[ 180, 1387]])

Direction must be provided to sort the coordinates correctly.

Test image:
Test

Before:
图片

Fix:
屏幕截图 2024-06-06 211129

Close #628

@dmMaze dmMaze marked this pull request as draft June 7, 2024 01:08
@dmMaze dmMaze marked this pull request as ready for review June 7, 2024 03:13
@dmMaze dmMaze changed the title Align Quadrilateral.pts with reading order Fix coordinates sorting of textlines #628 Jun 7, 2024
@zyddnys zyddnys merged commit c49cdc8 into zyddnys:main Jun 7, 2024
0 of 2 checks passed
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.

[Bug]: OCR fails to recognise Japanese text in horizontal orientation
2 participants