react-native-rectangle-doc-scanner 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -143,7 +143,7 @@ const DocScanner = ({ onCapture, overlayColor = '#e7a649', autoCapture = true, m
143
143
  step = `contour_${i}_area`;
144
144
  reportStage(step);
145
145
  const { value: area } = react_native_fast_opencv_1.OpenCV.invoke('contourArea', contour, false);
146
- if (area < width * height * 0.1) {
146
+ if (area < width * height * 0.05) {
147
147
  continue;
148
148
  }
149
149
  step = `contour_${i}_arcLength`;
@@ -152,7 +152,7 @@ const DocScanner = ({ onCapture, overlayColor = '#e7a649', autoCapture = true, m
152
152
  const approx = react_native_fast_opencv_1.OpenCV.createObject(react_native_fast_opencv_1.ObjectType.PointVector);
153
153
  step = `contour_${i}_approxPolyDP`;
154
154
  reportStage(step);
155
- react_native_fast_opencv_1.OpenCV.invoke('approxPolyDP', contour, approx, 0.02 * perimeter, true);
155
+ react_native_fast_opencv_1.OpenCV.invoke('approxPolyDP', contour, approx, 0.015 * perimeter, true);
156
156
  step = `contour_${i}_toJS`;
157
157
  reportStage(step);
158
158
  const approxValue = react_native_fast_opencv_1.OpenCV.toJSValue(approx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
@@ -163,7 +163,7 @@ export const DocScanner: React.FC<Props> = ({
163
163
  reportStage(step);
164
164
  const { value: area } = OpenCV.invoke('contourArea', contour, false);
165
165
 
166
- if (area < width * height * 0.1) {
166
+ if (area < width * height * 0.05) {
167
167
  continue;
168
168
  }
169
169
 
@@ -174,7 +174,7 @@ export const DocScanner: React.FC<Props> = ({
174
174
 
175
175
  step = `contour_${i}_approxPolyDP`;
176
176
  reportStage(step);
177
- OpenCV.invoke('approxPolyDP', contour, approx, 0.02 * perimeter, true);
177
+ OpenCV.invoke('approxPolyDP', contour, approx, 0.015 * perimeter, true);
178
178
 
179
179
  step = `contour_${i}_toJS`;
180
180
  reportStage(step);