GoogleVision class
Integrates Google Vision features, including painter labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
annotate(
{required AnnotationRequests requests}) → Future< AnnotatedResponses> - Run detection and annotation for a batch of requests.
-
cropHints(
JsonImage jsonImage, {int maxResults = 10}) → Future< CropHintsAnnotation?> - Crop Hints suggests vertices for a crop region on an image.
-
detection(
JsonImage jsonImage, AnnotationType annotationType, {int maxResults = 10}) → Future< AnnotateImageResponse> -
Higher level method for a single detection type as specified by
annotationType
, -
documentTextDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< FullTextAnnotation?> - Extracts text from an image (or file); the response is optimized for dense text and documents. The JSON includes page, block, paragraph, word, and break information. A specific use of documentTextDetection is to detect handwriting in an image.
-
faceDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< List< FaceAnnotation> > - Face Detection detects multiple faces within an image along with the associated key facial attributes such as emotional state or wearing headwear.
-
imageProperties(
JsonImage jsonImage, {int maxResults = 10}) → Future< ImagePropertiesAnnotation?> - The Image Properties feature detects general attributes of the image, such as dominant color.
-
labelDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< List< EntityAnnotation> > - Labels can identify general objects, locations, activities, animal species, products, and more. Labels are returned in English only.
-
landmarkDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< List< EntityAnnotation> > - Landmark Detection detects popular natural and human-made structures within an image.
-
logoDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< List< EntityAnnotation> > - Logo Detection detects popular product logos within an image.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
objectLocalization(
JsonImage jsonImage, {int maxResults = 10}) → Future< List< LocalizedObjectAnnotation> > - The Vision API can detect and extract multiple objects in an image with Object Localization.
-
productSearch(
JsonImage jsonImage, {int maxResults = 10}) → Future< ProductSearchResults?> - Run Product Search.
-
safeSearchDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< SafeSearchAnnotation?> - SafeSearch Detection detects explicit content such as adult content or violent content within an image. This feature uses five categories (adult, spoof, medical, violence, and racy) and returns the likelihood that each is present in a given image. See the SafeSearchAnnotation page for details on these fields.
-
textDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< List< EntityAnnotation> > - Detects and extracts text from any image. For example, a photograph might contain a street sign or traffic sign. The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.
-
toString(
) → String -
A string representation of this object.
inherited
-
webDetection(
JsonImage jsonImage, {int maxResults = 10}) → Future< WebDetection?> - Web Detection detects Web references to an image.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- accept → String
-
final
- contentType → String
-
final
- dio → Dio
-
final
- tokenExpiry → DateTime
-
final
- tokenGenerator ↔ TokenGenerator?
-
getter/setter pair
Static Methods
-
withGenerator(
TokenGenerator generator) → Future< GoogleVision> - Authenticate using the supplied token generator
-
withJwt(
String credentials, [String scope = 'https://www.googleapis.com/auth/cloud-platform']) → Future< GoogleVision> - Authenticated with JWT.
-
withJwtFile(
String credentialsFileName, [String scope = 'https://www.googleapis.com/auth/cloud-platform']) → Future< GoogleVision> - Authenticated with JWT.