AnthropicVisionClient
Anthropic Claude Vision client for AI-powered image analysis. This client provides advanced image understanding capabilities using Claude's vision models.
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Analyzes an image using Anthropic's Claude Vision API.
Analyzes an image using Anthropic's Claude Vision API.
Value parameters
- imagePath
-
Path to the image file to analyze
- prompt
-
Optional custom prompt for the analysis. If not provided, uses a default comprehensive prompt
Attributes
- Returns
-
Either an LLMError if the analysis fails, or an ImageAnalysisResult with the analysis details
- Definition Classes
Converts an image from one format to another.
Converts an image from one format to another.
Value parameters
- imagePath
-
Path to the source image file
- targetFormat
-
The desired output format (JPEG, PNG, GIF, BMP)
Attributes
- Returns
-
Either an LLMError if conversion fails, or a ProcessedImage in the new format
- Definition Classes
Detects the media type of an image file based on its extension.
Detects the media type of an image file based on its extension.
Value parameters
- imagePath
-
Path to the image file
Attributes
- Returns
-
MediaType representing the image format (JPEG, PNG, GIF, or WEBP)
Identifies and describes objects in the image with confidence scores. Uses Claude Vision to detect and locate objects within the image.
Identifies and describes objects in the image with confidence scores. Uses Claude Vision to detect and locate objects within the image.
Value parameters
- imagePath
-
Path to the image file to analyze
Attributes
- Returns
-
Either an LLMError if detection fails, or a List of DetectedObject with labels and confidence scores
Encodes an image file to Base64 format for API transmission.
Encodes an image file to Base64 format for API transmission.
Value parameters
- imagePath
-
Path to the image file to encode
Attributes
- Returns
-
Try containing the Base64-encoded string, or failure if encoding fails
Performs Optical Character Recognition (OCR) on the image using Claude Vision. Extracts and transcribes all visible text from the image.
Performs Optical Character Recognition (OCR) on the image using Claude Vision. Extracts and transcribes all visible text from the image.
Value parameters
- imagePath
-
Path to the image file containing text
Attributes
- Returns
-
Either an LLMError if extraction fails, or the extracted text as a String
Generates descriptive tags for the image content. Creates semantic tags that categorize and describe the image's content, style, and mood.
Generates descriptive tags for the image content. Creates semantic tags that categorize and describe the image's content, style, and mood.
Value parameters
- imagePath
-
Path to the image file to analyze
Attributes
- Returns
-
Either an LLMError if tagging fails, or a List of descriptive tags
Preprocesses an image by applying a sequence of operations.
Preprocesses an image by applying a sequence of operations.
Value parameters
- imagePath
-
Path to the image file to preprocess
- operations
-
List of image operations to apply (resize, crop, rotate, etc.)
Attributes
- Returns
-
Either an LLMError if preprocessing fails, or a ProcessedImage with the result
- Definition Classes
Resizes an image to specified dimensions.
Resizes an image to specified dimensions.
Value parameters
- height
-
Target height in pixels
- imagePath
-
Path to the image file to resize
- maintainAspectRatio
-
If true, maintains the original aspect ratio (default: true)
- width
-
Target width in pixels
Attributes
- Returns
-
Either an LLMError if resizing fails, or a ProcessedImage with new dimensions
- Definition Classes