From 205178646ba9df0150c2561b65bd20f5cc9077c0 Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Mon, 9 Mar 2020 20:54:42 +0800 Subject: [PATCH] Update rectangle usage in api.md --- docs/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 7cfb181..018f712 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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:** @@ -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); })();