Crop Hint Detection Activity
The Crop Hint Detection activity identifies optimal crop regions within an image. It suggests a set of vertices that define a suitable area for cropping, based on the image's content. This activity leverages Google Cloud Vision's capabilities to intelligently determine visually important sections.
| Field | Description | Requirement |
|---|---|---|
| Api key | Google Cloud Vision API Key | Required |
| Image path/url | Google Cloud Storage URL of the image | Required |
| Base64 | Base64 encoded string of the image file | Required |
| Response variable name | Variable name to store the HTTP response | Required |
Action Types & Examples
Activity Output
- Format:
string(JSON format) - Example Result:
cropHintResponse
Implementation Examples
Field Setup - Api key: bb3c53c6-8515-4e34-97c8-8281de60972d - Image path/url: gs://cloud-samples-data/vision/ocr/sampleimage.jpg - Base64: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUF……………./58x/8BX+R/9k= - Response variable name: getRespone
Execution Parameters - N/A
Technical Notes
- The activity requires either the Image path/url or the Base64 field to be configured, but not both simultaneously.
- For optimal performance and security, it is recommended to manage API keys securely, potentially using environment variables or a secrets management system.
- The Google Cloud Vision API documentation provides further details on the structure of the crop hint response.