Skip to content

Commit

Permalink
Update rectangle usage in api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromewu committed Mar 9, 2020
1 parent 40aea6d commit 2051786
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Figures out what words are in `image`, where the words are in `image`, etc.

- `image` see [Image Format](./image-format.md) for more details.
- `options` a object of customized options
- `rectangles` an array of objects to specify the regions you want to recognized in the image, each object should contain top, left, width and height, see example below.
- `rectangle` an object to specify the regions you want to recognized in the image, should contain top, left, width and height, see example below.
- `jobId` Please see details above

**Output:**
Expand Down Expand Up @@ -209,7 +209,7 @@ const { createWorker } = Tesseract;
await worker.loadLanguage('eng');
await worker.initialize('eng');
const { data: { text } } = await worker.recognize(image, {
rectangles: [{ top: 0, left: 0, width: 100, height: 100 }],
rectangle: { top: 0, left: 0, width: 100, height: 100 },
});
console.log(text);
})();
Expand Down

0 comments on commit 2051786

Please sign in to comment.