iveViewer(points);
        }else{
          getCroppedImage(points);
        }
        
      })
      document.getElementById("liveScanBtn").addEventListener("click",function(){
        if (captureViewer) {
          detectHandler.setScanOptions(getScanOptions());
          document.getElementById("captureViewer").style.display = "block";
          captureViewer.play({fill:true});
        }
      })

      function getCroppedImage(points){
        let canvas = documentScanner.crop(document.getElementById("