VisionBarcode
A representation of a barcode detected in an image.
Example
const [barcode, ...otherBarcodes] = await firebase.vision().barcodeDetectorProcessImage(filePath);
console.log(barcode);
Properties
boundingBox
</>Returns the bounding rectangle of the detected barcode.
boundingBox: FirebaseVisionTypes.VisionRectangle;
calendarEvent
</>Gets parsed calendar event (set if valueType
is VisionBarcodeValueType.CALENDAR_EVENT
).
calendarEvent: VisionBarcodeCalendarEvent;
contactInfo
</>Gets parsed contact details (set if valueType
is VisionBarcodeValueType.CONTACT_INFO
).
contactInfo: VisionBarcodeContactInfo;
cornerPoints
</>Gets the four corner points in clockwise direction starting with top-left. Due to the possible perspective distortions, this is not necessarily a rectangle. Parts of the region could be outside of the image.
cornerPoints: FirebaseVisionTypes.VisionPoint[];
driverLicense
</>Gets parsed drivers license details (set if valueType
is VisionBarcodeValueType.DRIVER_LICENSE
).
driverLicense: VisionBarcodeDriverLicense;
Gets parsed email details (set if valueType
is VisionBarcodeValueType.EMAIL
).
email: VisionBarcodeEmail;
geoPoint
</>Gets parsed Geo Point details (set if valueType
is VisionBarcodeValueType.GEO
).
geoPoint: FirebaseVisionTypes.VisionGeoPoint;
phone
</>Gets parsed phone details (set if valueType
is VisionBarcodeValueType.PHONE
).
phone: VisionBarcodePhone;
sms
</>Gets parsed sms details (set if valueType
is VisionBarcodeValueType.SMS
).
sms: VisionBarcodeSms;
url
</>Gets parsed url details (set if valueType
is VisionBarcodeValueType.URL
).
url: VisionBarcodeUrl;
valueType
</>Returns type of the barcode value, for example VisionBarcodeValueType.EMAIL
.
valueType: number;
wifi
</>Gets parsed wifi details (set if valueType
is VisionBarcodeValueType.WIFI
).
wifi: VisionBarcodeWifi;