WWW::GCloud::API::Vision

Google Cloud Vision API for WWW::GCloud

NAME

WWW::GCloud::API::Vision - WWW::GCloud implementation of Google Vision API

SYNOPSIS

use v6.e.PREVIEW;
use WWW::GCloud;
use WWW::GCloud::API::Vision;
use WWW::GCloud::API::Vision::Types;

my $gcloud = WWW::GCloud.new;
my $images = $gcloud.vision.images;

my $queue = $images.annotation-queue;
given $queue {
    .project("my-project-id");
    # Create a new request to OCR-annotate an image. Subsequent calls to .request will queue new requests.
    .request(
        :file("my-image.ext"), # Can be a PNG, TIFF, GIF.
        feature => ( :type(GCVFDocument), :model<builtin/latest> ),
        # If several features to be added at once:
        # features => [...],
        -> $request {
            # Here we can do things with the request object itself.
            $request.feature(GCVFLogo); # Also search the image for logos.
            # If there is something special about the input config...
            # $request.set-input-config(...);

            # If the image is a multi-page one. .pages is an Array[UInt:D] attribute.
            # $request.pages = 1,3;
        }
    );
}

await $queue
        .start
        .andthen({
            say "Annotate completed."
            # .result is an instance of WWW::GCloud::R::Vision::BatchAnnotateImagesResponse
        });

DESCRIPTION

This module lacks complete documentation due to me not currently able to write it. Please, see some notes for WWW::GCloud framework. And look into exmaples/ where I tried to provide meaningful code to follow.

Status

This module is pre-beta, pre-anything. It is incomplete and likely not well thought out at places. But it already lets you do a lot with your storages.

If there is anything you need but it is missing then, please, consider implementing it and submitting a PR. Any other approach would barely proces any outcome for what I do apologize!

Either way, this module can be used as a reference implementation for a WWW::GGCloud API.

COPYRIGHT

(c) 2023, Vadim Belman [email protected]

LICENSE

Artistic License 2.0

See the LICENSE file in this distribution.

WWW::GCloud::API::Vision v0.0.1

Google Cloud Vision API for WWW::GCloud

Authors

  • Vadim Belman

License

Artistic-2.0

Dependencies

WWW::GCloud:auth<zef:vrurg>WWW::GCloud::API::Storage:auth<zef:vrurg>Cro::Core:ver<0.8.9>:auth<zef:cro>Color:ver<1.004001>:auth<zef:raku-community-modules>AttrX::Mooish:auth<zef:vrurg>:api<1.0.0+>:ver<1.0.3+>MIME::Base64:ver<1.2.3>:auth<zef:raku-community-modules>MIME::Types:ver<0.2>:auth<zef:raku-community-modules>JSON::Marshal:ver<0.0.24>:auth<zef:jonathanstowe>:api<1.0>JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>

Provides

  • WWW::GCloud::API::Vision
  • WWW::GCloud::API::Vision::AnnotationQueue
  • WWW::GCloud::API::Vision::Files
  • WWW::GCloud::API::Vision::Images
  • WWW::GCloud::API::Vision::Operations
  • WWW::GCloud::API::Vision::Types
  • WWW::GCloud::API::Vision::X
  • WWW::GCloud::R::Vision::AnnotateFileRequest
  • WWW::GCloud::R::Vision::AnnotateFileResponse
  • WWW::GCloud::R::Vision::AnnotateImageRequest
  • WWW::GCloud::R::Vision::AnnotateImageResponse
  • WWW::GCloud::R::Vision::AsyncAnnotateFileRequest
  • WWW::GCloud::R::Vision::BatchAnnotateFilesResponse
  • WWW::GCloud::R::Vision::BatchAnnotateImagesResponse
  • WWW::GCloud::R::Vision::Block
  • WWW::GCloud::R::Vision::BoundingPoly
  • WWW::GCloud::R::Vision::Color
  • WWW::GCloud::R::Vision::ColorInfo
  • WWW::GCloud::R::Vision::CropHint
  • WWW::GCloud::R::Vision::CropHintsAnnotation
  • WWW::GCloud::R::Vision::CropHintsParams
  • WWW::GCloud::R::Vision::DetectedBreak
  • WWW::GCloud::R::Vision::DetectedLanguage
  • WWW::GCloud::R::Vision::DominantColorsAnnotation
  • WWW::GCloud::R::Vision::EntityAnnotation
  • WWW::GCloud::R::Vision::FaceAnnotation
  • WWW::GCloud::R::Vision::Feature
  • WWW::GCloud::R::Vision::GcsDestination
  • WWW::GCloud::R::Vision::GcsSource
  • WWW::GCloud::R::Vision::GroupedResult
  • WWW::GCloud::R::Vision::Image
  • WWW::GCloud::R::Vision::ImageAnnotationContext
  • WWW::GCloud::R::Vision::ImageContext
  • WWW::GCloud::R::Vision::ImageProperties
  • WWW::GCloud::R::Vision::ImageSource
  • WWW::GCloud::R::Vision::InputConfig
  • WWW::GCloud::R::Vision::KeyValue
  • WWW::GCloud::R::Vision::Landmark
  • WWW::GCloud::R::Vision::LatLng
  • WWW::GCloud::R::Vision::LatLongRect
  • WWW::GCloud::R::Vision::LocalizedObjectAnnotation
  • WWW::GCloud::R::Vision::LocationInfo
  • WWW::GCloud::R::Vision::NormalizedVertex
  • WWW::GCloud::R::Vision::ObjectAnnotation
  • WWW::GCloud::R::Vision::Operation
  • WWW::GCloud::R::Vision::Operations
  • WWW::GCloud::R::Vision::OutputConfig
  • WWW::GCloud::R::Vision::Page
  • WWW::GCloud::R::Vision::Paragraph
  • WWW::GCloud::R::Vision::Position
  • WWW::GCloud::R::Vision::Product
  • WWW::GCloud::R::Vision::ProductSearchParams
  • WWW::GCloud::R::Vision::ProductSearchResults
  • WWW::GCloud::R::Vision::Property
  • WWW::GCloud::R::Vision::Result
  • WWW::GCloud::R::Vision::SafeSearchAnnotation
  • WWW::GCloud::R::Vision::Symbol
  • WWW::GCloud::R::Vision::TextAnnotation
  • WWW::GCloud::R::Vision::TextDetectionParams
  • WWW::GCloud::R::Vision::TextProperty
  • WWW::GCloud::R::Vision::Vertex
  • WWW::GCloud::R::Vision::WebDetection
  • WWW::GCloud::R::Vision::WebDetectionParams
  • WWW::GCloud::R::Vision::WebEntity
  • WWW::GCloud::R::Vision::WebImage
  • WWW::GCloud::R::Vision::WebLabel
  • WWW::GCloud::R::Vision::WebPage
  • WWW::GCloud::R::Vision::Word
  • WWW::GCloud::RR::Vision::AnnotateFile
  • WWW::GCloud::RR::Vision::AnnotateRequest
  • WWW::GCloud::RR::Vision::BatchAnnotateResponse
  • WWW::GCloud::RR::Vision::Contentish
  • WWW::GCloud::RR::Vision::ObjAnnotation
  • WWW::GCloud::RR::Vision::Scorable
  • WWW::GCloud::RR::Vision::Uri

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.