Рубрики
Uncategorized

Идентификация идентификационной карты Nodejs OCR

Автор оригинала: David Wong.

Эта идентификационная карта может неправильно идентифицировать номер идентификационной карты. Либо цифры отсутствуют, либо цифры перевернуты, безмолвны и неточны.

Const Axios = require ('axios') // Axios can use fetch and other interface request modules
const utils = require('utility')
let body = {
      "data" : {
        "uri" : "https://imgs.developpaper.com/imgs/ptng.jpg"
      }
    }
    Let accessKey = '7n accessKey'
    Let secretkey = 'seven cattle secretkey'
    
    let data =  "POST /v1/ocr/idcard\nHost: ai.qiniuapi.com\nContent-Type: application/json\n\n" + JSON.stringify(body)
    let sign = utils.hmac('sha1', secretKey, data).replace(/\+/g, '-').replace(/\//g, '_')
  axios.post('http://ai.qiniuapi.com/v1/ocr/idcard', body ,{
    headers: {
      'Content-Type':'application/json',
      'Authorization':'Qiniu '+accessKey+':'+sign
    }
  }).then((response) => {
    console.log(response.data)
  }).catch((error) => {
    console.log(error)
  })

Take the blogs of other students
php java Python Go
https://www.cnblogs.com/shliujing/p/qi-niu-OCR-jie-kou-diao-shi--qi-niu-jian-quan-Toke.html