A React Native Vision Camera frame processor plugin for Dynamsoft Document Normalizer which can be used to create a document scanner.
npm install vision-camera-dynamsoft-document-normalizerA React Native Vision Camera frame processor plugin for Dynamsoft Document Normalizer.
It can detect document boundaries and run perspective transformation to get a normalized image.
If you do not want to use Vision Camera, you can use the offical React Native package by Dynamsoft.
For vision-camera v2, use versions 0.x.
For vision-camera v3, use versions 1.x - 2.x.
For vision-camera v4, use versions >= 3.0.0.
| Product | Android | iOS |
| ----------- | ----------- | ----------- |
| Dynamsoft Capture Vision | 3.0 | 3.0 |
``sh`
yarn add vision-camera-dynamsoft-document-normalizer
cd ios && pod install
Add the plugin to your babel.config.js:
`js`
module.exports = {
plugins: [['react-native-worklets-core/plugin']],
// ...
> Note: You have to restart metro-bundler for changes in the babel.config.js file to take effect.
1. Scan documents with vision camera.
`js`
import { detect } from 'vision-camera-dynamsoft-document-normalizer';
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const detectionResults = detect(frame);
}, []);
detectBase64
2. Scan documents from a file (or use ).
`ts`
let detectionResults = await detectFile(photoPath);
3. Normalize a document image with the detection result (or use normalizeBase64).
`ts`
let normalizedImageResult = await normalizeFile(photoPath, detectionResult.location,{saveNormalizationResultAsFile:true});
4. License initialization (apply for a trial license).
`ts``
await initLicense("your license");
* Android
* iOS
Build a Document Normalization React Native Vision Camera Plugin
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT