PDF417バーコードを検出するために、GoogleのMLKit Barcode Detectorとともに迅速でシンプルなAVCaptureSessionを使用しようとしています。ただし、終了行のない切り詰められた PDF417 バーコードは検出されません。画像レイヤーを追加してバーコードの最後にこれを追加できる迅速なライブラリはありますか? 私は現在、バーコードの角も持っています:
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
let barcodeScanner = BarcodeScanner.barcodeScanner(options: barcodeOptions)
// print("Capturing", Date())
let image = VisionImage(buffer: sampleBuffer)
image.orientation = imageOrientation(
deviceOrientation: UIDevice.current.orientation,
cameraPosition: AVCaptureDevice.Position.front)
guard let barcodes = try? barcodeScanner.results(in: image) else {return}
for barcode in barcodes {
let corners = barcode.cornerPoints
print(corners)
//let displayValue = barcode.displayValue
let rawValue = barcode.rawValue
切り捨てられた:
非切り捨て