From c27131842cd7219fb9e3c9b3eb5c2f9991afdd73 Mon Sep 17 00:00:00 2001 From: Dynamsoft-Henry <78675724+Dynamsoft-Henry@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:35:47 +0800 Subject: [PATCH] Adding React Native and fixed some bugs --- _config.yml | 3 + .../simplified-label-recognizer-settings.md | 4 +- .../api-reference/character-result.md | 81 ++++++++++++++++ .../recognized-text-lines-result.md | 44 +++++++++ .../simplified-label-recognizer-settings.md | 95 +++++++++++++++++++ .../api-reference/text-line-result-item.md | 82 ++++++++++++++++ 6 files changed, 307 insertions(+), 2 deletions(-) create mode 100644 programming/react-native/api-reference/character-result.md create mode 100644 programming/react-native/api-reference/recognized-text-lines-result.md create mode 100644 programming/react-native/api-reference/simplified-label-recognizer-settings.md create mode 100644 programming/react-native/api-reference/text-line-result-item.md diff --git a/_config.yml b/_config.yml index ecc4db0..a941a35 100644 --- a/_config.yml +++ b/_config.yml @@ -29,6 +29,9 @@ dcv_maui_api: /capture-vision/docs/mobile/programming/maui/api-reference/ dcv_flutter: /capture-vision/docs/mobile/programming/flutter/ dcv_flutter_api: /capture-vision/docs/mobile/programming/flutter/api-reference/ +dcv_react_native: /capture-vision/docs/mobile/programming/react-native/ +dcv_react_native_api: /capture-vision/docs/mobile/programming/react-native/api-reference/ + dce_ios: /camera-enhancer/docs/mobile/programming/ios/ dce_ios_api: /camera-enhancer/docs/mobile/programming/ios/ dce_android: /camera-enhancer/docs/mobile/programming/android/ diff --git a/programming/flutter/api-reference/simplified-label-recognizer-settings.md b/programming/flutter/api-reference/simplified-label-recognizer-settings.md index adc7fa1..dc3eff9 100644 --- a/programming/flutter/api-reference/simplified-label-recognizer-settings.md +++ b/programming/flutter/api-reference/simplified-label-recognizer-settings.md @@ -23,8 +23,8 @@ class SimplifiedLabelRecognizerSettings | Property | Types | Description | | -------- | ----- | ----------- | -| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *EnumGrayscaleTransformationMode[]* | The grayscale transformation modes in an array of [`EnumGrayscaleTransformationMode`]({{ site.dcv_flutter_api}}core/enum/grayscale-transformation-mode.html). | -| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *EnumGrayscaleEnhancementMode[]* | The grayscale enhancement modes in an array of [`EnumGrayscaleEnhancementMode`]({{ site.dcv_flutter_api}}core/enum/grayscale-enhancement-mode.html). | +| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *List\* | The grayscale transformation modes in an array of [`EnumGrayscaleTransformationMode`]({{ site.dcv_flutter_api}}core/enum/grayscale-transformation-mode.html). | +| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *List\* | The grayscale enhancement modes in an array of [`EnumGrayscaleEnhancementMode`]({{ site.dcv_flutter_api}}core/enum/grayscale-enhancement-mode.html). | | [`characterModelName`](#charactermodelname) | *String* | Specify a character model by its name. | | [`lineStringRegExPattern`](#linestringregexpattern) | *String* | The RegEx pattern of the text line string to filter out the unqualified results. | | [`maxThreadsInOneTask`](#maxthreadsinonetask) | *int* | The maximum available threads count in one label recognition task. | diff --git a/programming/react-native/api-reference/character-result.md b/programming/react-native/api-reference/character-result.md new file mode 100644 index 0000000..2de78c0 --- /dev/null +++ b/programming/react-native/api-reference/character-result.md @@ -0,0 +1,81 @@ +--- +layout: default-layout +title: CharacterResult - Dynamsoft Capture Vision React Native Edition +description: Interface CharacterResult of Dynamsoft Capture Vision React Native edition represents the result of a character recognition process. +keywords: Character result +needGenerateH3Content: true +needAutoGenerateSidebar: true +noTitleIndex: true +breadcrumbText: CharacterResult +--- + +# CharacterResult + +Interface `CharacterResult` represents the result of a character recognition process. It contains the characters recognized (high, medium, and low confidence), their respective confidences, and the location of the character in a quadrilateral shape. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface CharacterResult +``` + +## Properties + +| Property | Types | Description | +| -------- | ----- | ----------- | +| [`characterH`](#characterh) | *string* | The character with the highest confidence. | +| [`characterM`](#characterm) | *string* | The character with medium confidence. | +| [`characterL`](#characterl) | *string* | The character with the lowest confidence. | +| [`characterHConfidence`](#characterhconfidence) | *number* | The confidence score for the highest confidence character. | +| [`characterMConfidence`](#charactermconfidence) | *number* | The confidence score for the medium confidence character. | +| [`characterLConfidence`](#characterlconfidence) | *number* | The confidence score for the lowest confidence character. | + +### CharacterH + +The character with the highest confidence. + +```js +characterH: string; +``` + +### CharacterM + +The character with medium confidence. + +```js +characterM: string; +``` + +### CharacterL + +The character with the lowest confidence. + +```js +characterL: string; +``` + +### CharacterHConfidence + +The confidence score for the highest confidence character. + +```js +characterHConfidence: number; +``` + +### CharacterMConfidence + +The confidence score for the medium confidence character. + +```js +characterMConfidence: number; +``` + +### CharacterLConfidence + +The confidence score for the lowest confidence character. + +```js +characterLConfidence: number; +``` diff --git a/programming/react-native/api-reference/recognized-text-lines-result.md b/programming/react-native/api-reference/recognized-text-lines-result.md new file mode 100644 index 0000000..9f80035 --- /dev/null +++ b/programming/react-native/api-reference/recognized-text-lines-result.md @@ -0,0 +1,44 @@ +--- +layout: default-layout +title: RecognizedTextLinesResult - Dynamsoft Capture Vision React Native Edition +description: Interface RecognizedTextLinesResult of Dynamsoft Capture Vision React Native edition represents the result of a text recognition process. +keywords: Recognized text lines result +needGenerateH3Content: true +needAutoGenerateSidebar: true +noTitleIndex: true +--- + +# RecognizedTextLinesResult + +Interface `RecognizedTextLinesResult` represents the overall result(s) of a text recognition process. It provides access to information about the recognized text lines, the original image, and any errors that occurred during the recognition process. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface RecognizedTextLinesResult extends CapturedResultBase +``` + +## Properties + +| Property | Types | Description | +| -------- | ----- | ----------- | +| [`getItems`](#getitems) | *List* | The text line result(s) recognized from the image/frame in an array of [`TextLineResultItem`](text-line-result-item.md). | + +The following properties are inherited from [`CapturedResultBase`]({{ site.dcv_react_native_api }}core/captured-result-base.html): + +| Property | Types | Description | +| -------- | ----- | ----------- | +| [`originalImageHashId`]({{ site.dcv_react_native_api }}core/captured-result-base.html#originalimagehashid) | *String* | The hash id of the original image. | +| [`rotationTransformMatrix`]({{ site.dcv_react_native_api }}core/captured-result-base.html#rotationtransformmatrix) | *Matrix4* | The rotation transformation matrix of the original image relative to the rotated image. | +| [`errorCode`]({{ site.dcv_react_native_api }}core/captured-result-base.html#errorcode) | *int* | The error code of this result. | +| [`errorMessage`]({{ site.dcv_react_native_api }}core/captured-result-base.html#errormessage) | *String* | The error message of this result. | + +### getItems + +The text line result(s) recognized from the image/frame in an array of [`TextLineResultItem`](text-line-result-item.md). + +```js +items?: Array; +``` diff --git a/programming/react-native/api-reference/simplified-label-recognizer-settings.md b/programming/react-native/api-reference/simplified-label-recognizer-settings.md new file mode 100644 index 0000000..c5eba7d --- /dev/null +++ b/programming/react-native/api-reference/simplified-label-recognizer-settings.md @@ -0,0 +1,95 @@ +--- +layout: default-layout +title: SimplifiedLabelRecognizerSettings - Dynamsoft Capture Vision React Native Edition API Reference +description: Interface SimplifiedLabelRecognizerSettings of Dynamsoft Capture Vision React Native contains label recognition setting of Dynamsoft Capture Vision Flutter edition +keywords: Flutter, SimplifiedLabelRecognizerSettings +needAutoGenerateSidebar: true +needGenerateH3Content: true +--- + +# SimplifiedLabelRecognizerSettings + +Interface `SimplifiedLabelRecognizerSettings` contains settings for label recognition. It is a sub-parameter of `SimplifiedCaptureVisionSettings` + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface SimplifiedLabelRecognizerSettings +``` + +## Properties + +| Property | Types | Description | +| -------- | ----- | ----------- | +| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *Array\* | The grayscale transformation modes in an array of [`EnumGrayscaleTransformationMode`]({{ site.dcv_react_native_api}}core/enum/grayscale-transformation-mode.html). | +| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *Array\* | The grayscale enhancement modes in an array of [`EnumGrayscaleEnhancementMode`]({{ site.dcv_react_native_api}}core/enum/grayscale-enhancement-mode.html). | +| [`characterModelName`](#charactermodelname) | *String* | Specify a character model by its name. | +| [`lineStringRegExPattern`](#linestringregexpattern) | *String* | The RegEx pattern of the text line string to filter out the unqualified results. | +| [`maxThreadsInOneTask`](#maxthreadsinonetask) | *int* | The maximum available threads count in one label recognition task. | +| [`scaleDownThreshold`](#scaledownthreshold) | *int* | The threshold for image shrinking when dealing with large images. | + +### grayscaleTransformationModes + +The grayscale transformation modes in an array of [`EnumGrayscaleTransformationMode`]({{ site.dcv_react_native_api }}core/enum/grayscale-transformation-mode.html). + +```js +grayscaleTransformationModes?: Int32Array | Array +``` + +**Remarks** + +View the parameter reference page of [`GrayscaleTransformationMode`]({{ site.dcv_parameter_reference }}image-parameter/grayscale-transformation-modes.html) for more detail about how to set grayscale transformation modes. + +### grayscaleEnhancementModes + +The grayscale enhancement modes in an array of [`EnumGrayscaleEnhancementMode`]({{ site.dcv_react_native_api }}core/enum/grayscale-enhancement-mode.html). + +```js +grayscaleEnhancementModes?: Int32Array | Array +``` + +**Remarks** + +View the reference page of [`GrayscaleEnhancementMode`]({{ site.dcv_parameter_reference }}image-parameter/grayscale-enhancement-modes.html) for more detail about how to set grayscale enhancement modes. + +### characterModelName + +Specify a character model by its name. + +```js +characterModelName?: string +``` + +**Remarks** + +View the parameter reference of [`CharacterModelName`]({{ site.dcv_parameter_reference }}text-line-specification/character-model-name.html) for more details about how to use the parameter. + +### lineStringRegExPattern + +The RegEx pattern of the text line string to filter out the unqualified results. + +```js +lineStringRegExPattern?: string +``` + +**Remarks** + +### maxThreadsInOneTask + +The maximum available threads count in one label recognition task. + +```js +maxThreadsInOneTask?: number +``` + +**Remarks** + +### scaleDownThreshold + +The threshold for image shrinking when dealing with large images. + +```js +scaleDownThreshold?: number +``` diff --git a/programming/react-native/api-reference/text-line-result-item.md b/programming/react-native/api-reference/text-line-result-item.md new file mode 100644 index 0000000..300fbdd --- /dev/null +++ b/programming/react-native/api-reference/text-line-result-item.md @@ -0,0 +1,82 @@ +--- +layout: default-layout +title: TextLineResultItem - Dynamsoft Capture Vision React Native Edition +description: Interface TextLineResultItem of Dynamsoft Capture Vision React Native edition represents a text line result item recognized by a document layout analysis engine. +keywords: Text line result item +needGenerateH3Content: true +needAutoGenerateSidebar: true +noTitleIndex: true +--- + +# TextLineResultItem + +Interface `TextLineResultItem` represents a single text line result item recognized by the library. It is derived from `CapturedResultItem` and is one of the base items of `RecognizedTextLinesResult`. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface TextLineResultItem extends CapturedResultItem +``` + +*Inheritance:* [CapturedResultItem]({{ site.dcv_react_native_api }}core/captured-result-item.html) -> TextLineResultItem + +## Properties + +| Property | Types | Description | +| -------- | ----- | ----------- | +| [`text`](#text) | *String* | Returns the text content of the text line. | +| [`location`](#location) | *Quadrilateral* | Returns the location of the text line in the form of a quadrilateral. | +| [`confidence`](#confidence) | *int* | Returns the confidence of the text line recognition result. | +| [`characterResults`](#characterresults) | *List* | Get all the characters in the text line. Each character is represented by a [`CharacterResult`](character-result.md) object. | +| [`specificationName`](#specificationname) | *String* | Returns the name of the [`TextLineSpecification`]({{site.dcv_parameter_reference}}text-line-specification/) object that generated this `TextLineResultItem`. | +| [`rawText`](#rawtext) | *String* | Returns the recognized raw text, excluding any concatenation separators. | + +### text + +Returns the text content of the individual text line. + +```js +text: string; +``` + +### location + +It is used to get the location of the text line in the form of a [Quadrilateral]({{ site.dcv_react_native_api }}core/quadrilateral.html). + +```js +location: Quadrilateral; +``` + +### confidence + +Returns the confidence of the individual text line recognition result. + +```js +confidence: number; +``` + +### characterResults + +Returns all the characters in the text line. Each character is represented by a [`CharacterResult`](character-result.md) object. + +```js +characterResults: CharacterResult[]; +``` + +### specificationName + +Returns the name of the [`TextLineSpecification`]({{site.dcv_parameter_reference}}text-line-specification/) object that generated this `TextLineResultItem`. + +```js +specificationName:string; +``` + +### rawText + +Returns the recognized raw text, excluding any concatenation separators. + +```js +rawText: string; +```