Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- Service Configuration
- OAuth Scopes
- API Declaration
- Resources
- Types
- LatLng
- FaceAnnotationUnderExposedLikelihood
- Feature
- Status
- Property
- Image
- Landmark
- Color
- FaceAnnotationHeadwearLikelihood
- BoundingPoly
- SafeSearchAnnotationAdult
- Vertex
- FaceAnnotationAngerLikelihood
- LocationInfo
- SafeSearchAnnotationMedical
- StatusDetailsItem
- BatchAnnotateImagesRequest
- ColorInfo
- FaceAnnotationBlurredLikelihood
- AnnotateImageResponse
- ImageProperties
- FaceAnnotation
- SafeSearchAnnotationViolence
- EntityAnnotation
- FeatureType
- AnnotateImageRequest
- LandmarkType
- Xgafv
- ImageSource
- SafeSearchAnnotationSpoof
- FaceAnnotationSurpriseLikelihood
- SafeSearchAnnotation
- FaceAnnotationSorrowLikelihood
- FaceAnnotationJoyLikelihood
- ImageContext
- DominantColorsAnnotation
- LatLongRect
- BatchAnnotateImagesResponse
- Position
Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.
- visionService :: ServiceConfig
- cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
- type VisionAPI = ImagesAnnotateResource
- module Network.Google.Resource.Vision.Images.Annotate
- data LatLng
- latLng :: LatLng
- llLatitude :: Lens' LatLng (Maybe Double)
- llLongitude :: Lens' LatLng (Maybe Double)
- data FaceAnnotationUnderExposedLikelihood
- data Feature
- feature :: Feature
- fType :: Lens' Feature (Maybe FeatureType)
- fMaxResults :: Lens' Feature (Maybe Int32)
- data Status
- status :: Status
- sDetails :: Lens' Status [StatusDetailsItem]
- sCode :: Lens' Status (Maybe Int32)
- sMessage :: Lens' Status (Maybe Text)
- data Property
- property :: Property
- pValue :: Lens' Property (Maybe Text)
- pName :: Lens' Property (Maybe Text)
- data Image
- image :: Image
- iContent :: Lens' Image (Maybe ByteString)
- iSource :: Lens' Image (Maybe ImageSource)
- data Landmark
- landmark :: Landmark
- lType :: Lens' Landmark (Maybe LandmarkType)
- lPosition :: Lens' Landmark (Maybe Position)
- data Color
- color :: Color
- cRed :: Lens' Color (Maybe Double)
- cAlpha :: Lens' Color (Maybe Double)
- cGreen :: Lens' Color (Maybe Double)
- cBlue :: Lens' Color (Maybe Double)
- data FaceAnnotationHeadwearLikelihood
- data BoundingPoly
- boundingPoly :: BoundingPoly
- bpVertices :: Lens' BoundingPoly [Vertex]
- data SafeSearchAnnotationAdult
- data Vertex
- vertex :: Vertex
- vX :: Lens' Vertex (Maybe Int32)
- vY :: Lens' Vertex (Maybe Int32)
- data FaceAnnotationAngerLikelihood
- data LocationInfo
- locationInfo :: LocationInfo
- liLatLng :: Lens' LocationInfo (Maybe LatLng)
- data SafeSearchAnnotationMedical
- data StatusDetailsItem
- statusDetailsItem :: HashMap Text JSONValue -> StatusDetailsItem
- sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
- data BatchAnnotateImagesRequest
- batchAnnotateImagesRequest :: BatchAnnotateImagesRequest
- bairRequests :: Lens' BatchAnnotateImagesRequest [AnnotateImageRequest]
- data ColorInfo
- colorInfo :: ColorInfo
- ciColor :: Lens' ColorInfo (Maybe Color)
- ciScore :: Lens' ColorInfo (Maybe Double)
- ciPixelFraction :: Lens' ColorInfo (Maybe Double)
- data FaceAnnotationBlurredLikelihood
- data AnnotateImageResponse
- annotateImageResponse :: AnnotateImageResponse
- airLogoAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
- airLabelAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
- airFaceAnnotations :: Lens' AnnotateImageResponse [FaceAnnotation]
- airError :: Lens' AnnotateImageResponse (Maybe Status)
- airSafeSearchAnnotation :: Lens' AnnotateImageResponse (Maybe SafeSearchAnnotation)
- airLandmarkAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
- airTextAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation]
- airImagePropertiesAnnotation :: Lens' AnnotateImageResponse (Maybe ImageProperties)
- data ImageProperties
- imageProperties :: ImageProperties
- ipDominantColors :: Lens' ImageProperties (Maybe DominantColorsAnnotation)
- data FaceAnnotation
- faceAnnotation :: FaceAnnotation
- faTiltAngle :: Lens' FaceAnnotation (Maybe Double)
- faBlurredLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationBlurredLikelihood)
- faBoundingPoly :: Lens' FaceAnnotation (Maybe BoundingPoly)
- faSurpriseLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationSurpriseLikelihood)
- faLandmarkingConfidence :: Lens' FaceAnnotation (Maybe Double)
- faPanAngle :: Lens' FaceAnnotation (Maybe Double)
- faRollAngle :: Lens' FaceAnnotation (Maybe Double)
- faUnderExposedLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationUnderExposedLikelihood)
- faFdBoundingPoly :: Lens' FaceAnnotation (Maybe BoundingPoly)
- faAngerLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationAngerLikelihood)
- faDetectionConfidence :: Lens' FaceAnnotation (Maybe Double)
- faHeadwearLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationHeadwearLikelihood)
- faSorrowLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationSorrowLikelihood)
- faJoyLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationJoyLikelihood)
- faLandmarks :: Lens' FaceAnnotation [Landmark]
- data SafeSearchAnnotationViolence
- data EntityAnnotation
- entityAnnotation :: EntityAnnotation
- eaScore :: Lens' EntityAnnotation (Maybe Double)
- eaTopicality :: Lens' EntityAnnotation (Maybe Double)
- eaLocale :: Lens' EntityAnnotation (Maybe Text)
- eaBoundingPoly :: Lens' EntityAnnotation (Maybe BoundingPoly)
- eaConfidence :: Lens' EntityAnnotation (Maybe Double)
- eaMid :: Lens' EntityAnnotation (Maybe Text)
- eaLocations :: Lens' EntityAnnotation [LocationInfo]
- eaDescription :: Lens' EntityAnnotation (Maybe Text)
- eaProperties :: Lens' EntityAnnotation [Property]
- data FeatureType
- data AnnotateImageRequest
- annotateImageRequest :: AnnotateImageRequest
- airImage :: Lens' AnnotateImageRequest (Maybe Image)
- airFeatures :: Lens' AnnotateImageRequest [Feature]
- airImageContext :: Lens' AnnotateImageRequest (Maybe ImageContext)
- data LandmarkType
- = UnknownLandmark
- | LeftEye
- | RightEye
- | LeftOfLeftEyebrow
- | RightOfLeftEyebrow
- | LeftOfRightEyebrow
- | RightOfRightEyebrow
- | MidpointBetweenEyes
- | NoseTip
- | UpperLip
- | LowerLip
- | MouthLeft
- | MouthRight
- | MouthCenter
- | NoseBottomRight
- | NoseBottomLeft
- | NoseBottomCenter
- | LeftEyeTopBoundary
- | LeftEyeRightCorner
- | LeftEyeBottomBoundary
- | LeftEyeLeftCorner
- | RightEyeTopBoundary
- | RightEyeRightCorner
- | RightEyeBottomBoundary
- | RightEyeLeftCorner
- | LeftEyebrowUpperMidpoint
- | RightEyebrowUpperMidpoint
- | LeftEarTragion
- | RightEarTragion
- | LeftEyePupil
- | RightEyePupil
- | ForeheadGlabella
- | ChinGnathion
- | ChinLeftGonion
- | ChinRightGonion
- data Xgafv
- data ImageSource
- imageSource :: ImageSource
- isGcsImageURI :: Lens' ImageSource (Maybe Text)
- data SafeSearchAnnotationSpoof
- data FaceAnnotationSurpriseLikelihood
- data SafeSearchAnnotation
- safeSearchAnnotation :: SafeSearchAnnotation
- ssaSpoof :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationSpoof)
- ssaAdult :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationAdult)
- ssaMedical :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationMedical)
- ssaViolence :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationViolence)
- data FaceAnnotationSorrowLikelihood
- data FaceAnnotationJoyLikelihood
- data ImageContext
- imageContext :: ImageContext
- icLanguageHints :: Lens' ImageContext [Text]
- icLatLongRect :: Lens' ImageContext (Maybe LatLongRect)
- data DominantColorsAnnotation
- dominantColorsAnnotation :: DominantColorsAnnotation
- dcaColors :: Lens' DominantColorsAnnotation [ColorInfo]
- data LatLongRect
- latLongRect :: LatLongRect
- llrMaxLatLng :: Lens' LatLongRect (Maybe LatLng)
- llrMinLatLng :: Lens' LatLongRect (Maybe LatLng)
- data BatchAnnotateImagesResponse
- batchAnnotateImagesResponse :: BatchAnnotateImagesResponse
- bairResponses :: Lens' BatchAnnotateImagesResponse [AnnotateImageResponse]
- data Position
- position :: Position
- pZ :: Lens' Position (Maybe Double)
- pX :: Lens' Position (Maybe Double)
- pY :: Lens' Position (Maybe Double)
Service Configuration
visionService :: ServiceConfig Source #
Default request referring to version v1
of the Google Cloud Vision API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] Source #
View and manage your data across Google Cloud Platform services
API Declaration
type VisionAPI = ImagesAnnotateResource Source #
Represents the entirety of the methods and resources available for the Google Cloud Vision API service.
Resources
vision.images.annotate
Types
LatLng
An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. Example of normalization code in Python: def NormalizeLongitude(longitude): """Wraps decimal degrees longitude to [-180.0, 180.0].""" q, r = divmod(longitude, 360.0) if r > 180.0 or (r == 180.0 and q <= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): """Wraps decimal degrees latitude and longitude to [-90.0, 90.0] and [-180.0, 180.0], respectively.""" r = latitude % 360.0 if r <= 90.0: return r, NormalizeLongitude(longitude) elif r >= 270.0: return r - 360, NormalizeLongitude(longitude) else: return 180 - r, NormalizeLongitude(longitude + 180.0) assert 180.0 == NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) The code in logs/storage/validator/logs_validator_traits.cc treats this type as if it were annotated as ST_LOCATION.
See: latLng
smart constructor.
Creates a value of LatLng
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
llLatitude :: Lens' LatLng (Maybe Double) Source #
The latitude in degrees. It must be in the range [-90.0, +90.0].
llLongitude :: Lens' LatLng (Maybe Double) Source #
The longitude in degrees. It must be in the range [-180.0, +180.0].
FaceAnnotationUnderExposedLikelihood
data FaceAnnotationUnderExposedLikelihood Source #
Under-exposed likelihood.
Unknown |
|
VeryUnlikely |
|
Unlikely |
|
Possible |
|
Likely |
|
VeryLikely |
|
Feature
Users describe the type of Google Cloud Vision API tasks to perform over images by using *Feature*s. Each Feature indicates a type of image detection task to perform. Features encode the Cloud Vision API vertical to operate on and the number of top-scoring results to return.
See: feature
smart constructor.
Creates a value of Feature
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
Status
The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.
See: status
smart constructor.
sDetails :: Lens' Status [StatusDetailsItem] Source #
A list of messages that carry the error details. There will be a common set of message types for APIs to use.
sCode :: Lens' Status (Maybe Int32) Source #
The status code, which should be an enum value of google.rpc.Code.
sMessage :: Lens' Status (Maybe Text) Source #
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Property
A `Property` consists of a user-supplied name/value pair.
See: property
smart constructor.
Image
Client image to perform Google Cloud Vision API tasks over.
See: image
smart constructor.
iContent :: Lens' Image (Maybe ByteString) Source #
Image content, represented as a stream of bytes. Note: as with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
iSource :: Lens' Image (Maybe ImageSource) Source #
Google Cloud Storage image location. If both `content` and `source` are provided for an image, `content` takes precedence and is used to perform the image annotation request.
Landmark
A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`.
See: landmark
smart constructor.
Color
Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Here are some examples: Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...
See: color
smart constructor.
cRed :: Lens' Color (Maybe Double) Source #
The amount of red in the color as a value in the interval [0, 1].
cAlpha :: Lens' Color (Maybe Double) Source #
The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).
cGreen :: Lens' Color (Maybe Double) Source #
The amount of green in the color as a value in the interval [0, 1].
cBlue :: Lens' Color (Maybe Double) Source #
The amount of blue in the color as a value in the interval [0, 1].
FaceAnnotationHeadwearLikelihood
data FaceAnnotationHeadwearLikelihood Source #
Headwear likelihood.
FAHLUnknown |
|
FAHLVeryUnlikely |
|
FAHLUnlikely |
|
FAHLPossible |
|
FAHLLikely |
|
FAHLVeryLikely |
|
BoundingPoly
data BoundingPoly Source #
A bounding polygon for the detected image annotation.
See: boundingPoly
smart constructor.
boundingPoly :: BoundingPoly Source #
Creates a value of BoundingPoly
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bpVertices :: Lens' BoundingPoly [Vertex] Source #
The bounding polygon vertices.
SafeSearchAnnotationAdult
data SafeSearchAnnotationAdult Source #
Represents the adult content likelihood for the image.
SSAAUnknown |
|
SSAAVeryUnlikely |
|
SSAAUnlikely |
|
SSAAPossible |
|
SSAALikely |
|
SSAAVeryLikely |
|
Vertex
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
See: vertex
smart constructor.
FaceAnnotationAngerLikelihood
data FaceAnnotationAngerLikelihood Source #
Anger likelihood.
FAALUnknown |
|
FAALVeryUnlikely |
|
FAALUnlikely |
|
FAALPossible |
|
FAALLikely |
|
FAALVeryLikely |
|
LocationInfo
data LocationInfo Source #
Detected entity location information.
See: locationInfo
smart constructor.
locationInfo :: LocationInfo Source #
Creates a value of LocationInfo
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
SafeSearchAnnotationMedical
data SafeSearchAnnotationMedical Source #
Likelihood that this is a medical image.
SSAMUnknown |
|
SSAMVeryUnlikely |
|
SSAMUnlikely |
|
SSAMPossible |
|
SSAMLikely |
|
SSAMVeryLikely |
|
StatusDetailsItem
data StatusDetailsItem Source #
Creates a value of StatusDetailsItem
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue) Source #
Properties of the object. Contains field 'type with type URL.
BatchAnnotateImagesRequest
data BatchAnnotateImagesRequest Source #
Multiple image annotation requests are batched into a single service call.
See: batchAnnotateImagesRequest
smart constructor.
batchAnnotateImagesRequest :: BatchAnnotateImagesRequest Source #
Creates a value of BatchAnnotateImagesRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bairRequests :: Lens' BatchAnnotateImagesRequest [AnnotateImageRequest] Source #
Individual image annotation requests for this batch.
ColorInfo
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
See: colorInfo
smart constructor.
colorInfo :: ColorInfo Source #
Creates a value of ColorInfo
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ciScore :: Lens' ColorInfo (Maybe Double) Source #
Image-specific score for this color. Value in range [0, 1].
ciPixelFraction :: Lens' ColorInfo (Maybe Double) Source #
The fraction of pixels the color occupies in the image. Value in range [0, 1].
FaceAnnotationBlurredLikelihood
data FaceAnnotationBlurredLikelihood Source #
Blurred likelihood.
FABLUnknown |
|
FABLVeryUnlikely |
|
FABLUnlikely |
|
FABLPossible |
|
FABLLikely |
|
FABLVeryLikely |
|
AnnotateImageResponse
data AnnotateImageResponse Source #
Response to an image annotation request.
See: annotateImageResponse
smart constructor.
annotateImageResponse :: AnnotateImageResponse Source #
Creates a value of AnnotateImageResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
airLogoAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation] Source #
If present, logo detection has completed successfully.
airLabelAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation] Source #
If present, label detection has completed successfully.
airFaceAnnotations :: Lens' AnnotateImageResponse [FaceAnnotation] Source #
If present, face detection has completed successfully.
airError :: Lens' AnnotateImageResponse (Maybe Status) Source #
If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set.
airSafeSearchAnnotation :: Lens' AnnotateImageResponse (Maybe SafeSearchAnnotation) Source #
If present, safe-search annotation has completed successfully.
airLandmarkAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation] Source #
If present, landmark detection has completed successfully.
airTextAnnotations :: Lens' AnnotateImageResponse [EntityAnnotation] Source #
If present, text (OCR) detection has completed successfully.
airImagePropertiesAnnotation :: Lens' AnnotateImageResponse (Maybe ImageProperties) Source #
If present, image properties were extracted successfully.
ImageProperties
data ImageProperties Source #
Stores image properties, such as dominant colors.
See: imageProperties
smart constructor.
imageProperties :: ImageProperties Source #
Creates a value of ImageProperties
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ipDominantColors :: Lens' ImageProperties (Maybe DominantColorsAnnotation) Source #
If present, dominant colors completed successfully.
FaceAnnotation
data FaceAnnotation Source #
A face annotation object contains the results of face detection.
See: faceAnnotation
smart constructor.
faceAnnotation :: FaceAnnotation Source #
Creates a value of FaceAnnotation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
faTiltAngle :: Lens' FaceAnnotation (Maybe Double) Source #
Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].
faBlurredLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationBlurredLikelihood) Source #
Blurred likelihood.
faBoundingPoly :: Lens' FaceAnnotation (Maybe BoundingPoly) Source #
The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale, as returned in `ImageParams`. The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated.
faSurpriseLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationSurpriseLikelihood) Source #
Surprise likelihood.
faLandmarkingConfidence :: Lens' FaceAnnotation (Maybe Double) Source #
Face landmarking confidence. Range [0, 1].
faPanAngle :: Lens' FaceAnnotation (Maybe Double) Source #
Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].
faRollAngle :: Lens' FaceAnnotation (Maybe Double) Source #
Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].
faUnderExposedLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationUnderExposedLikelihood) Source #
Under-exposed likelihood.
faFdBoundingPoly :: Lens' FaceAnnotation (Maybe BoundingPoly) Source #
The `fd_bounding_poly` bounding polygon is tighter than the
`boundingPoly`, and encloses only the skin part of the face.
Typically, it is used to eliminate the face from any image analysis that
detects the "amount of skin" visible in an image. It is not based on
the landmarker results, only on the initial face detection, hence the
fd
(face detection) prefix.
faAngerLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationAngerLikelihood) Source #
Anger likelihood.
faDetectionConfidence :: Lens' FaceAnnotation (Maybe Double) Source #
Detection confidence. Range [0, 1].
faHeadwearLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationHeadwearLikelihood) Source #
Headwear likelihood.
faSorrowLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationSorrowLikelihood) Source #
Sorrow likelihood.
faJoyLikelihood :: Lens' FaceAnnotation (Maybe FaceAnnotationJoyLikelihood) Source #
Joy likelihood.
faLandmarks :: Lens' FaceAnnotation [Landmark] Source #
Detected face landmarks.
SafeSearchAnnotationViolence
data SafeSearchAnnotationViolence Source #
Violence likelihood.
SSAVUnknown |
|
SSAVVeryUnlikely |
|
SSAVUnlikely |
|
SSAVPossible |
|
SSAVLikely |
|
SSAVVeryLikely |
|
EntityAnnotation
data EntityAnnotation Source #
Set of detected entity features.
See: entityAnnotation
smart constructor.
entityAnnotation :: EntityAnnotation Source #
Creates a value of EntityAnnotation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
eaTopicality :: Lens' EntityAnnotation (Maybe Double) Source #
The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].
eaLocale :: Lens' EntityAnnotation (Maybe Text) Source #
The language code for the locale in which the entity textual `description` is expressed.
eaBoundingPoly :: Lens' EntityAnnotation (Maybe BoundingPoly) Source #
Image region to which this entity belongs. Currently not produced for `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR), `boundingPoly`s are produced for the entire text detected in an image region, followed by `boundingPoly`s for each word within the detected text.
eaConfidence :: Lens' EntityAnnotation (Maybe Double) Source #
The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].
eaMid :: Lens' EntityAnnotation (Maybe Text) Source #
Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.
eaLocations :: Lens' EntityAnnotation [LocationInfo] Source #
The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.
eaDescription :: Lens' EntityAnnotation (Maybe Text) Source #
Entity textual description, expressed in its `locale` language.
eaProperties :: Lens' EntityAnnotation [Property] Source #
Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.
FeatureType
data FeatureType Source #
The feature type.
TypeUnspecified |
|
FaceDetection |
|
LandmarkDetection |
|
LogoDetection |
|
LabelDetection |
|
TextDetection |
|
SafeSearchDetection |
|
ImageProperties |
|
AnnotateImageRequest
data AnnotateImageRequest Source #
Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features.
See: annotateImageRequest
smart constructor.
annotateImageRequest :: AnnotateImageRequest Source #
Creates a value of AnnotateImageRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
airFeatures :: Lens' AnnotateImageRequest [Feature] Source #
Requested features.
airImageContext :: Lens' AnnotateImageRequest (Maybe ImageContext) Source #
Additional context that may accompany the image.
LandmarkType
data LandmarkType Source #
Face landmark type.
UnknownLandmark |
|
LeftEye |
|
RightEye |
|
LeftOfLeftEyebrow |
|
RightOfLeftEyebrow |
|
LeftOfRightEyebrow |
|
RightOfRightEyebrow |
|
MidpointBetweenEyes |
|
NoseTip |
|
UpperLip |
|
LowerLip |
|
MouthLeft |
|
MouthRight |
|
MouthCenter |
|
NoseBottomRight |
|
NoseBottomLeft |
|
NoseBottomCenter |
|
LeftEyeTopBoundary |
|
LeftEyeRightCorner |
|
LeftEyeBottomBoundary |
|
LeftEyeLeftCorner |
|
RightEyeTopBoundary |
|
RightEyeRightCorner |
|
RightEyeBottomBoundary |
|
RightEyeLeftCorner |
|
LeftEyebrowUpperMidpoint |
|
RightEyebrowUpperMidpoint |
|
LeftEarTragion |
|
RightEarTragion |
|
LeftEyePupil |
|
RightEyePupil |
|
ForeheadGlabella |
|
ChinGnathion |
|
ChinLeftGonion |
|
ChinRightGonion |
|
Xgafv
V1 error format.
ImageSource
data ImageSource Source #
External image source (Google Cloud Storage image location).
See: imageSource
smart constructor.
imageSource :: ImageSource Source #
Creates a value of ImageSource
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
isGcsImageURI :: Lens' ImageSource (Maybe Text) Source #
Google Cloud Storage image URI, which must be in the following form: `gs://bucket_name/object_name` (for details, see Google Cloud Storage Request URIs). NOTE: Cloud Storage object versioning is not supported.
SafeSearchAnnotationSpoof
data SafeSearchAnnotationSpoof Source #
Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.
SSASUnknown |
|
SSASVeryUnlikely |
|
SSASUnlikely |
|
SSASPossible |
|
SSASLikely |
|
SSASVeryLikely |
|
FaceAnnotationSurpriseLikelihood
data FaceAnnotationSurpriseLikelihood Source #
Surprise likelihood.
FASLUnknown |
|
FASLVeryUnlikely |
|
FASLUnlikely |
|
FASLPossible |
|
FASLLikely |
|
FASLVeryLikely |
|
SafeSearchAnnotation
data SafeSearchAnnotation Source #
safeSearchAnnotation :: SafeSearchAnnotation Source #
Creates a value of SafeSearchAnnotation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ssaSpoof :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationSpoof) Source #
Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.
ssaAdult :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationAdult) Source #
Represents the adult content likelihood for the image.
ssaMedical :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationMedical) Source #
Likelihood that this is a medical image.
ssaViolence :: Lens' SafeSearchAnnotation (Maybe SafeSearchAnnotationViolence) Source #
Violence likelihood.
FaceAnnotationSorrowLikelihood
data FaceAnnotationSorrowLikelihood Source #
Sorrow likelihood.
FUnknown |
|
FVeryUnlikely |
|
FUnlikely |
|
FPossible |
|
FLikely |
|
FVeryLikely |
|
FaceAnnotationJoyLikelihood
data FaceAnnotationJoyLikelihood Source #
Joy likelihood.
FAJLUnknown |
|
FAJLVeryUnlikely |
|
FAJLUnlikely |
|
FAJLPossible |
|
FAJLLikely |
|
FAJLVeryLikely |
|
ImageContext
data ImageContext Source #
Image context and/or feature-specific parameters.
See: imageContext
smart constructor.
imageContext :: ImageContext Source #
Creates a value of ImageContext
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
icLanguageHints :: Lens' ImageContext [Text] Source #
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages.
icLatLongRect :: Lens' ImageContext (Maybe LatLongRect) Source #
lat/long rectangle that specifies the location of the image.
DominantColorsAnnotation
data DominantColorsAnnotation Source #
Set of dominant colors and their corresponding scores.
See: dominantColorsAnnotation
smart constructor.
dominantColorsAnnotation :: DominantColorsAnnotation Source #
Creates a value of DominantColorsAnnotation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dcaColors :: Lens' DominantColorsAnnotation [ColorInfo] Source #
RGB color values with their score and pixel fraction.
LatLongRect
data LatLongRect Source #
Rectangle determined by min and max `LatLng` pairs.
See: latLongRect
smart constructor.
latLongRect :: LatLongRect Source #
Creates a value of LatLongRect
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
llrMaxLatLng :: Lens' LatLongRect (Maybe LatLng) Source #
Max lat/long pair.
llrMinLatLng :: Lens' LatLongRect (Maybe LatLng) Source #
Min lat/long pair.
BatchAnnotateImagesResponse
data BatchAnnotateImagesResponse Source #
Response to a batch image annotation request.
See: batchAnnotateImagesResponse
smart constructor.
batchAnnotateImagesResponse :: BatchAnnotateImagesResponse Source #
Creates a value of BatchAnnotateImagesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bairResponses :: Lens' BatchAnnotateImagesResponse [AnnotateImageResponse] Source #
Individual responses to image annotation requests within the batch.
Position
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
See: position
smart constructor.