Skip to content

Commit

Permalink
Add notes about the limitations of the current orientation detection …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
robertknight committed Jun 5, 2022
1 parent ebd135c commit 26893cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ocr-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ export class OCRClient {
/**
* Attempt to determine the orientation of the image.
*
* This currently uses a simplistic algorithm [1] which is designed for
* non-uppercase Latin text. It will likely perform badly for other scripts or
* if the text is all uppercase.
*
* [1] See http://www.leptonica.org/papers/skew-measurement.pdf
*
* @return {Promise<Orientation>}
*/
async getOrientation() {
Expand Down
6 changes: 6 additions & 0 deletions src/ocr-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ class OCREngine {
/**
* Attempt to determine the orientation of the document image in degrees.
*
* This currently uses a simplistic algorithm [1] which is designed for
* non-uppercase Latin text. It will likely perform badly for other scripts or
* if the text is all uppercase.
*
* [1] See http://www.leptonica.org/papers/skew-measurement.pdf
*
* @return {Orientation}
*/
getOrientation() {
Expand Down

0 comments on commit 26893cc

Please sign in to comment.