0.1.6 • Published 7 months ago

yq-facedetector v0.1.6

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

yq-facedetector

A front-end Vue component that interfaces with YQFaceDetector
 facial recognition, mainly used for web based facial recognition and preview, based on websocket

Project setup

yarn add yq-facedetector

npm i yq-facedetector

Example

import YqVideo from "yq-facedetector";

components:
 <yq-video ref="yqVideo" :width="320" :height="240"
                @comparison="handleCheck"
                @error="handleVideoError"/>
                
 methods:{
    start(){
      this.isRun=true
      this.$refs.yqVideo.start()
    },
    stop(){
      this.isRun=false
      this.detector=[]
      this.$refs.yqVideo.stop()
    },
    reload(){
      this.$refs.yqVideo.refreshDb()
    },
    handleCheck(detector,anti){
      if(this.isRun) {
        if (detector) {
          //result
          this.detector = detector
          console.log("result", detector)
        }
        //anti
        if (anti) {
          this.anti = anti
          console.log("anti", anti)
        }
      }
    },
    handleVideoError(code,err){
      console.log('error',code,err)
    }

  }
0.1.6

7 months ago

0.1.5

7 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago