Jump to top

VisionBarcodeDetectorOptions

interface

Custom options for barcode detection.

Example
import vision, { VisionBarcodeFormat, VisionBarcodeValueType } from '@react-native-firebase/ml-vision';

const [barcode, ...otherBarcodes] = await vision().barcodeDetectorProcessImage(filePath, {
  barcodeFormats: [VisionBarcodeFormat.QR_CODE]
});

if (barcode && barcode.valueType === VisionBarcodeValueType.CONTACT_INFO) {
  console.log(barcode.contactInfo);
}

Properties

barcodeFormats

</>

Set the barcode formats to detect.

barcodeFormats: VisionBarcodeFormat[];