小编Mor*_* GH的帖子

React Native:有没有办法使用 React Native 相机检测文档边框并更改框架内文档的覆盖颜色?

我是反应原生的新手。我目前正在尝试实现可以​​扫描和捕获身份证图像的代码。基本上我可以使用反应本机相机拍摄图像并保存到图库,但我不知道如何检测身份证边框。我正在寻求帮助来指导我有关卡片边框检测或一些可以实现此类功能的开源库。

基本上,我已经尝试实现react-native-documentscanner-androidrn-doc-scanner-android库。但是react-native-documentscanner-android库我未能实现,并且rn-doc-scanner-android没有卡边框检测功能。

这是我的代码:

import React, {Component} from 'react';
import { RNCamera } from 'react-native-camera';
import {
  StyleSheet,
  View,
  Text,
  TouchableOpacity,
  ToastAndroid
} from 'react-native';

import {
  Colors
} from 'react-native/Libraries/NewAppScreen';
import Dimensions from 'Dimensions';
import CameraRoll from "@react-native-community/cameraroll";

export default class App extends Component {
 constructor(props){
   super(props)
 }
  state = {
    barcodes: [],
  }
render(){
    const { height, width } = Dimensions.get('window');
    const maskRowHeight = Math.round((height - 500) / 20);
    const maskColWidth = (width - 300) …
Run Code Online (Sandbox Code Playgroud)

android react-native

5
推荐指数
0
解决办法
1653
查看次数

标签 统计

android ×1

react-native ×1