123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461 |
- #ifndef GMVDetector_GMVDetectorConstants_h
- #define GMVDetector_GMVDetectorConstants_h
- #import <Foundation/Foundation.h>
- /** @file GMVDetectorConstants.h
- * Detector constants.
- */
- /** Possible error codes returned by GMVDetector. */
- typedef NS_ENUM(NSInteger, GMVDetectorError) {
- GMVDetectorInvalidInput = -301
- };
- /**
- * @enum GMVImageOrientation
- * This enumeration specifies where the origin (0,0) of the image is located. The constant
- * has the same value as defined by EXIF specifications.
- */
- typedef NS_ENUM(NSInteger, GMVImageOrientation) {
- /**
- * Orientation code indicating the 0th row is the top and the 0th column is the left side.
- */
- GMVImageOrientationTopLeft = 1,
- /**
- * Orientation code indicating the 0th row is the top and the 0th column is the right side.
- */
- GMVImageOrientationTopRight = 2,
- /**
- * Orientation code indicating the 0th row is the bottom and the 0th column is the right side.
- */
- GMVImageOrientationBottomRight = 3,
- /**
- * Orientation code indicating the 0th row is the bottom and the 0th column is the left side.
- */
- GMVImageOrientationBottomLeft = 4,
- /**
- * Orientation code indicating the 0th row is the left side and the 0th column is the top.
- */
- GMVImageOrientationLeftTop = 5,
- /**
- * Orientation code indicating the 0th row is the right side and the 0th column is the top.
- */
- GMVImageOrientationRightTop = 6,
- /**
- * Orientation code indicating the 0th row is the right side and the 0th column is the bottom.
- */
- GMVImageOrientationRightBottom = 7,
- /**
- * Orientation code indicating the 0th row is the left side and the 0th column is the
- * bottom.
- */
- GMVImageOrientationLeftBottom = 8
- };
- /**
- * @enum GMVDetectorFaceModeOption
- * This enum specifies a preference for accuracy vs. speed trade-offs.
- */
- typedef NS_ENUM(NSInteger, GMVDetectorFaceModeOption) {
- /**
- * Face detection mode code indicating detect fewer faces and may be less precise in determining
- * values such as position, but will run faster.
- */
- GMVDetectorFaceFastMode = 200,
- /**
- * Face detection mode code indicating detect more faces and may be more precise in determining
- * values such as position, at the cost of speed.
- */
- GMVDetectorFaceAccurateMode = 201,
- /**
- * Face detection mode code indicating detect predominant faces appeared in self-photography
- * style and may be not detecting smaller and further away faces.
- */
- GMVDetectorFaceSelfieMode = 202
- };
- /**
- * @options GMVDetectorFaceLandmark
- * This option specifies the landmark detection type.
- */
- typedef NS_OPTIONS(NSInteger, GMVDetectorFaceLandmark) {
- /**
- * Face landmark option indicating it performs no landmark detection.
- */
- GMVDetectorFaceLandmarkNone = 1 << 0,
- /**
- * Face landmark option indicating it performs all landmark detection.
- */
- GMVDetectorFaceLandmarkAll = 1 << 1,
- /**
- * Face landmark option indicating it performs contour detection.
- */
- GMVDetectorFaceLandmarkContour = 1 << 2
- };
- /**
- * @options GMVDetectorFaceClassification
- * This option specifies the classification type.
- */
- typedef NS_OPTIONS(NSInteger, GMVDetectorFaceClassification) {
- /**
- * Face classification option indicating it performs no classification.
- */
- GMVDetectorFaceClassificationNone = 1 << 0,
- /**
- * Face classification option indicating it performs all classification.
- */
- GMVDetectorFaceClassificationAll = 1 << 1
- };
- /** This value is the default score threshold set on label detectors. */
- extern const float kGMVDetectorLabelScoreThresholdDefaultValue;
- /**
- * @enum GMVBarcodeFeatureEmailType
- * This enum specifies the email type for GMVBarcodeFeatureEmail.
- */
- typedef NS_ENUM(NSInteger, GMVBarcodeFeatureEmailType) {
- /**
- * Unknown email type.
- */
- GMVBarcodeFeatureEmailTypeUnknown = 0,
- /**
- * Barcode feature work email type.
- */
- GMVBarcodeFeatureEmailTypeWork = 1,
- /**
- * Barcode feature home email type.
- */
- GMVBarcodeFeatureEmailTypeHome = 2
- };
- /**
- * @enum GMVBarcodeFeaturePhoneType
- * This enum specifies the phone type for GMVBarcodeFeaturePhone.
- */
- typedef NS_ENUM(NSInteger, GMVBarcodeFeaturePhoneType) {
- /**
- * Unknown phone type.
- */
- GMVBarcodeFeaturePhoneTypeUnknown = 0,
- /**
- * Barcode feature work phone type.
- */
- GMVBarcodeFeaturePhoneTypeWork = 1,
- /**
- * Barcode feature home phone type.
- */
- GMVBarcodeFeaturePhoneTypeHome = 2,
- /**
- * Barcode feature fax phone type.
- */
- GMVBarcodeFeaturePhoneTypeFax = 3,
- /**
- * Barcode feature mobile phone type.
- */
- GMVBarcodeFeaturePhoneTypeMobile = 4
- };
- /**
- * @enum GMVBarcodeFeatureWiFiEncryptionType
- * This enum specifies the Wi-Fi encryption type for GMVBarcodeFeatureWiFi.
- */
- typedef NS_ENUM(NSInteger, GMVBarcodeFeatureWiFiEncryptionType) {
- /**
- * Barcode feature unknown Wi-Fi encryption type.
- */
- GMVBarcodeFeatureWiFiEncryptionTypeUnknown = 0,
- /**
- * Barcode feature open Wi-Fi encryption type.
- */
- GMVBarcodeFeatureWiFiEncryptionTypeOpen = 1,
- /**
- * Barcode feature WPA Wi-Fi encryption type.
- */
- GMVBarcodeFeatureWiFiEncryptionTypeWPA = 2,
- /**
- * Barcode feature WEP Wi-Fi encryption type.
- */
- GMVBarcodeFeatureWiFiEncryptionTypeWEP = 3
- };
- /**
- * @enum GMVBarcodeFeatureAddressType
- * This enum specifies address type.
- */
- typedef NS_ENUM(NSInteger, GMVBarcodeFeatureAddressType) {
- /**
- * Barcode feature unknown address type.
- */
- GMVBarcodeFeatureAddressTypeUnknown = 0,
- /**
- * Barcode feature work address type.
- */
- GMVBarcodeFeatureAddressTypeWork = 1,
- /**
- * Barcode feature home address type.
- */
- GMVBarcodeFeatureAddressTypeHome = 2
- };
- /**
- * @enum GMVDetectorBarcodeValueFormat
- * This enum specifies a barcode's value format. For example, TEXT, PRODUCT, URL, etc.
- */
- typedef NS_ENUM(NSInteger, GMVDetectorBarcodeValueFormat) {
- /**
- * Barcode value format for contact info.
- */
- GMVDetectorBarcodeValueFormatContactInfo = 1,
- /**
- * Barcode value format for email addresses.
- */
- GMVDetectorBarcodeValueFormatEmail = 2,
- /**
- * Barcode value format for ISBNs.
- */
- GMVDetectorBarcodeValueFormatISBN = 3,
- /**
- * Barcode value format for phone numbers.
- */
- GMVDetectorBarcodeValueFormatPhone = 4,
- /**
- * Barcode value format for product codes.
- */
- GMVDetectorBarcodeValueFormatProduct = 5,
- /**
- * Barcode value format for SMS details.
- */
- GMVDetectorBarcodeValueFormatSMS = 6,
- /**
- * Barcode value format for plain text.
- */
- GMVDetectorBarcodeValueFormatText = 7,
- /**
- * Barcode value format for URLs/bookmarks.
- */
- GMVDetectorBarcodeValueFormatURL = 8,
- /**
- * Barcode value format for Wi-Fi access point details.
- */
- GMVDetectorBarcodeValueFormatWiFi = 9,
- /**
- * Barcode value format for geographic coordinates.
- */
- GMVDetectorBarcodeValueFormatGeographicCoordinates = 10,
- /**
- * Barcode value format for calendar events.
- */
- GMVDetectorBarcodeValueFormatCalendarEvent = 11,
- /**
- * Barcode value format for driver's license data.
- */
- GMVDetectorBarcodeValueFormatDriversLicense = 12
- };
- /**
- * @options GMVDetectorBarcodeFormat
- * This option specifies the barcode formats that the library should detect.
- */
- typedef NS_OPTIONS(NSInteger, GMVDetectorBarcodeFormat) {
- /**
- * Code-128 detection.
- */
- GMVDetectorBarcodeFormatCode128 = 0x0001,
- /**
- * Code-39 detection.
- */
- GMVDetectorBarcodeFormatCode39 = 0x0002,
- /**
- * Code-93 detection.
- */
- GMVDetectorBarcodeFormatCode93 = 0x0004,
- /**
- * Codabar detection.
- */
- GMVDetectorBarcodeFormatCodaBar = 0x0008,
- /**
- * Data Matrix detection.
- */
- GMVDetectorBarcodeFormatDataMatrix = 0x0010,
- /**
- * EAN-13 detection.
- */
- GMVDetectorBarcodeFormatEAN13 = 0x0020,
- /**
- * EAN-8 detection.
- */
- GMVDetectorBarcodeFormatEAN8 = 0x0040,
- /**
- * ITF detection.
- */
- GMVDetectorBarcodeFormatITF = 0x0080,
- /**
- * QR Code detection.
- */
- GMVDetectorBarcodeFormatQRCode = 0x0100,
- /**
- * UPC-A detection.
- */
- GMVDetectorBarcodeFormatUPCA = 0x0200,
- /**
- * UPC-E detection.
- */
- GMVDetectorBarcodeFormatUPCE = 0x0400,
- /**
- * PDF-417 detection.
- */
- GMVDetectorBarcodeFormatPDF417 = 0x0800,
- /**
- * Aztec code detection.
- */
- GMVDetectorBarcodeFormatAztec = 0x1000
- };
- #pragma mark - Detector type constants
- /**
- * @memberof GMVDetector
- * A detector that searches for faces in a still image or video, returning GMVFaceFeature
- * objects that provide information about detected faces.
- */
- extern NSString * const GMVDetectorTypeFace;
- /**
- * @memberof GMVDetector
- * A detector that searches for barcodes in a still image or video, returning GMVBarcodeFeature
- * objects that provide information about detected barcodes.
- */
- extern NSString * const GMVDetectorTypeBarcode;
- /**
- * @memberof GMVDetector
- * A detector that does optical character recognition in a still image or video, returning
- * GMVTextBlockFeature objects that provide information about detected text.
- */
- extern NSString * const GMVDetectorTypeText;
- /**
- * @memberof GMVDetector
- * A detector that classifies a still image, returning GMVLabelFeature objects that provide
- * information about detected labels.
- */
- extern NSString * const GMVDetectorTypeLabel;
- #pragma mark - Label Detector Configuration Keys
- /**
- * @memberof GMVDetector
- * A key used to specify the score threshold for labels returned by the label detector, a float
- * value between 0 and 1.
- *
- * All features returned by the label detector have a score higher or equal to this threshold.
- * If unset, a default value of kGMVDetectorLabelScoreThresholdDefaultValue is used.
- */
- extern NSString * const GMVDetectorLabelScoreThreshold;
- #pragma mark - Barcode Detector Configuration Keys
- /**
- * @memberof GMVDetector
- * A key used to specify the barcode detection formats. If not specified, defaults to
- * GMVDetectorBarcodeFormatAllFormats.
- */
- extern NSString * const GMVDetectorBarcodeFormats;
- #pragma mark - Face Detector Configuration Keys
- /**
- * @memberof GMVDetector
- * A key used to specify detector's accuracy/speed trade-offs. If not specified, defaults to
- * GMVDetectorFaceFastMode.
- */
- extern NSString * const GMVDetectorFaceMode;
- /**
- * @memberof GMVDetector
- * A key used to specify is face tracking feature enabled. If not specified, defaults to false.
- */
- extern NSString * const GMVDetectorFaceTrackingEnabled;
- /**
- * @memberof GMVDetector
- * A key used to specify the smallest desired face size. The size is expressed as a proportion
- * of the width of the head to the image width. For example, if a value of 0.1 is specified, then
- * the smallest face to search for is roughly 10% of the width of the image being searched.
- * If not specified, defaults to 0.1.
- */
- extern NSString * const GMVDetectorFaceMinSize;
- /**
- * @memberof GMVDetector
- * A key used to specify whether to run additional classifiers for characterizing attributes
- * such as smiling. If not specified, defaults to GMVDetectorFaceClassificationNone.
- */
- extern NSString * const GMVDetectorFaceClassificationType;
- /**
- * @memberof GMVDetector
- * A key used to specify whether to detect no landmarks or all landmarks. Processing time
- * increases as the number of landmarks to search for increases, so detecting all landmarks
- * will increase the overall detection time. If not specified, defaults to
- * GMVDetectorFaceLandmarkNone.
- */
- extern NSString * const GMVDetectorFaceLandmarkType;
- #pragma mark - Detector Detection Configuration Keys
- /**
- * @memberof GMVDetector
- * A key used to specify the display orientation of the image for face feature detection. The
- * value of this key is an NSNumber wrapping a GMVImageOrientation.
- */
- extern NSString * const GMVDetectorImageOrientation;
- #pragma mark - Feature Types
- /**
- * @memberof GMVFeature
- * The discovered feature is a person’s face. Use the GMVFaceFeature class to get more
- * information about the detected feature.
- */
- extern NSString * const GMVFeatureTypeFace;
- /**
- * @memberof GMVFeature
- * The discovered feature is a barcode. Use the GMVBarcodeFeature class to get more
- * information about the detected feature.
- */
- extern NSString * const GMVFeatureTypeBarcode;
- /**
- * @memberof GMVFeature
- * The discovered feature is a text block. Use the GMVTextBlockFeature class to get more
- * information about the detected feature.
- */
- extern NSString * const GMVFeatureTypeTextBlock;
- /**
- * @memberof GMVFeature
- * The discovered feature is a text line. Use the GMVTextLineFeature class to get more
- * information about the detected feature.
- */
- extern NSString * const GMVFeatureTypeTextLine;
- /**
- * @memberof GMVFeature
- * The discovered feature is a text element. Use the GMVTextElementFeature class to get more
- * information about the detected feature.
- */
- extern NSString * const GMVFeatureTypeTextElement;
- /**
- * @memberof GMVFeature
- * The discovered feature is a label. Use the GMVLabelFeature class to get more information about
- * the detected feature.
- */
- extern NSString * const GMVFeatureTypeLabel;
- #endif // GMVDetector_GMVDetectorConstants_h
|