The Mobile Vision API is deprecated

GMVBarcodeFeature Class

Stay organized with collections Save and categorize content based on your preferences.

GMVBarcodeFeature Class Reference

Overview

Describes a barcode detected in a still image frame.

Its properties provide barcode value information.

Inherits GMVFeature.

Public Attributes

NSString *const GMVFeatureTypeFace
 
NSString *const GMVFeatureTypeBarcode
 
NSString *const GMVFeatureTypeTextBlock
 
NSString *const GMVFeatureTypeTextLine
 
NSString *const GMVFeatureTypeTextElement
 

Property Summary

NSString * rawValue
 Barcode value as it was encoded in the barcode. More...
 
NSString * displayValue
 Barcode value in a user-friendly format. More...
 
GMVDetectorBarcodeFormat format
 Barcode format; for example, EAN_13. More...
 
NSArray< NSValue * > * cornerPoints
 The four corner points of the barcode, in clockwise order starting with the top left relative to the detected image in the view coordinate system. More...
 
GMVDetectorBarcodeValueFormat valueFormat
 Format of the barcode value. More...
 
GMVBarcodeFeatureEmailemail
 An email message from a 'MAILTO:' or similar QR Code type. More...
 
GMVBarcodeFeaturePhonephone
 A phone number from a 'TEL:' or similar QR Code type. More...
 
GMVBarcodeFeatureSMSsms
 An SMS message from an 'SMS:' or similar QR Code type. More...
 
GMVBarcodeFeatureURLBookmarkurl
 A URL and title from a 'MEBKM:' or similar QR Code type. More...
 
GMVBarcodeFeatureWiFiwifi
 Wi-Fi network parameters from a 'WIFI:' or similar QR Code type. More...
 
GMVBarcodeFeatureGeoPointgeoPoint
 GPS coordinates from a 'GEO:' or similar QR Code type. More...
 
GMVBarcodeFeatureContactInfocontactInfo
 A person's or organization's business card. More...
 
GMVBarcodeFeatureCalendarEventcalendarEvent
 A calendar event extracted from a QR Code. More...
 
GMVBarcodeFeatureDriverLicensedriverLicense
 A driver license or ID card. More...
 
CGRect bounds
 The rectangle that holds the discovered feature relative to the detected image in the view coordinate system. More...
 
NSString * type
 The type of feature that was discovered. More...
 
BOOL hasTrackingID
 Indicates whether the object has a tracking ID. More...
 
NSUInteger trackingID
 The tracking identifier of the feature. More...
 

Member Data Documentation

- (NSString* const) GMVFeatureTypeFace
inherited

The discovered feature is a person’s face. Use the GMVFaceFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeBarcode
inherited

The discovered feature is a barcode. Use the GMVBarcodeFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeTextBlock
inherited

The discovered feature is a text block. Use the GMVTextBlockFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeTextLine
inherited

The discovered feature is a text line. Use the GMVTextLineFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeTextElement
inherited

The discovered feature is a text element. Use the GMVTextElementFeature class to get more information about the detected feature.

Property Detail

- (NSString*) rawValue
readatomiccopy

Barcode value as it was encoded in the barcode.

Structured values are not parsed, for example: 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. Does not include the supplemental value.

- (NSString*) displayValue
readatomiccopy

Barcode value in a user-friendly format.

May omit some of the information encoded in the barcode. For example, in the case above the display_value might be 'https://www.google.com'. If valueFormat==TEXT, this field will be equal to rawValue. This value may be multiline, for example, when line breaks are encoded into the original TEXT barcode value. May include the supplement value.

- (GMVDetectorBarcodeFormat) format
readatomicassign

Barcode format; for example, EAN_13.

Note that this field may contain values not present in the current set of format constants. When mapping this value to something else, it is advisable to have a default/fallback case.

- (NSArray<NSValue *>*) cornerPoints
readatomiccopy

The four corner points of the barcode, in clockwise order starting with the top left relative to the detected image in the view coordinate system.

These are CGPoints boxed in NSValues. Due to the possible perspective distortions, this is not necessarily a rectangle.

- (GMVDetectorBarcodeValueFormat) valueFormat
readatomicassign

Format of the barcode value.

For example, TEXT, PRODUCT, URL, etc. Note that this field may contain values not present in the current set of value format constants. When mapping this value to something else, it is advisable to have a default/fallback case.

- (GMVBarcodeFeatureEmail*) email
readatomicstrong

An email message from a 'MAILTO:' or similar QR Code type.

This properly is only set if valueFormat is GMVDetectorBarcodeValueFormatEmail.

- (GMVBarcodeFeaturePhone*) phone
readatomicstrong

A phone number from a 'TEL:' or similar QR Code type.

This property is only set if valueFormat is GMVDetectorBarcodeValueFormatPhone.

- (GMVBarcodeFeatureSMS*) sms
readatomicstrong

An SMS message from an 'SMS:' or similar QR Code type.

This property is only set if valueFormat is GMVDetectorBarcodeValueFormatSMS.

- (GMVBarcodeFeatureURLBookmark*) url
readatomicstrong

A URL and title from a 'MEBKM:' or similar QR Code type.

This property is only set iff valueFormat is GMVDetectorBarcodeValueFormatURL.

- (GMVBarcodeFeatureWiFi*) wifi
readatomicstrong

Wi-Fi network parameters from a 'WIFI:' or similar QR Code type.

This property is only set iff valueFormat is GMVDetectorBarcodeValueFormatWifi.

- (GMVBarcodeFeatureGeoPoint*) geoPoint
readatomicstrong

GPS coordinates from a 'GEO:' or similar QR Code type.

This property is only set iff valueFormat is GMVDetectorBarcodeValueFormatGeo

- (GMVBarcodeFeatureContactInfo*) contactInfo
readatomicstrong

A person's or organization's business card.

For example a VCARD. This property is only set iff valueFormat is GMVDetectorBarcodeValueFormatContactInfo.

- (GMVBarcodeFeatureCalendarEvent*) calendarEvent
readatomicstrong

A calendar event extracted from a QR Code.

This property is only set iff valueFormat is GMVDetectorBarcodeValueFormatCalendarEvent.

- (GMVBarcodeFeatureDriverLicense*) driverLicense
readatomicstrong

A driver license or ID card.

This property is only set iff valueFormat is GMVDetectorBarcodeValueFormatDriverLicense.

- (CGRect) bounds
readatomicassigninherited

The rectangle that holds the discovered feature relative to the detected image in the view coordinate system.

- (NSString*) type
readatomiccopyinherited

The type of feature that was discovered.

- (BOOL) hasTrackingID
readatomicassigninherited

Indicates whether the object has a tracking ID.

- (NSUInteger) trackingID
readatomicassigninherited

The tracking identifier of the feature.

This ID is not associated with a specific feature but identifies the same barcode among consecutive video frames.