Skill

Analyze Images with Azure AI Vision SDK for Java

A Java SDK skill for Azure AI Vision - image captioning, OCR, object/people detection, tagging, and smart cropping.

Works with azure

73
Spark score
out of 100
Updated last month
Version 13.2.0

Add to Favorites

Why it matters

Integrate powerful image analysis capabilities into your Java applications using the Azure AI Vision SDK. Extract text, generate captions, detect objects, and more.

Outcomes

What it gets done

01

Perform OCR to extract text from images.

02

Generate descriptive captions for images.

03

Detect and tag objects within images.

04

Extract smart crop regions for thumbnails.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-azure-ai-vision-imageanalysis-java | bash

Overview

Azure AI Vision Image Analysis SDK for Java

This skill covers the Azure AI Vision Java SDK: image captioning, OCR text extraction, tagging, object and people detection, dense captions, and smart cropping, via a sync or async ImageAnalysisClient. Use it when implementing image captioning, OCR, object/people detection, or smart cropping in Java on Azure AI Vision. Check image format/size limits and region support before deployment.

What it does

This skill builds image analysis applications on Azure AI Vision using the Java SDK (azure-ai-vision-imageanalysis), authenticated via an API key with KeyCredential or via DefaultAzureCredential, using either a synchronous ImageAnalysisClient or an async ImageAnalysisAsyncClient. It covers seven visual features: CAPTION for a human-readable image description, optionally gender-neutral; DENSE_CAPTIONS for region-level captions across up to 10 regions with bounding boxes; READ for OCR that extracts text as blocks, lines, and words with confidence scores and bounding polygons; TAGS for content tags covering objects, scenes, and actions with confidence; OBJECTS for bounding-box object detection with tag and confidence; SMART_CROPS for smart thumbnail regions at requested aspect ratios; and PEOPLE for person detection with bounding box and confidence. Analysis runs against a local file via BinaryData.fromFile or a remote URL via analyzeFromUrl, and multiple features can be requested in a single call - for example CAPTION, TAGS, OBJECTS, and READ together with a language option. Async analysis uses reactive subscribe, error, and complete callbacks, and errors surface as HttpResponseException with a status code and message.

When to use - and when NOT to

Use it when implementing image captioning, OCR, object or people detection, tagging, or smart cropping in a Java application via Azure AI Vision, triggered by phrases like "image analysis Java," "Azure Vision SDK," or "OCR image text extraction." Two hard constraints apply: images must be JPEG, PNG, GIF, BMP, WEBP, ICO, TIFF, or MPO, under 20MB, and between 50x50 and 16000x16000 pixels; and Caption and Dense Captions specifically require GPU-supported regions, so check Azure's supported-region list before deployment. Do not treat its output as a substitute for environment-specific validation or expert review.

Inputs and outputs

Input is an image - a local file as BinaryData or a public URL - plus a list of requested VisualFeatures and optional ImageAnalysisOptions such as gender-neutral captions, smart-crop aspect ratios, or a language setting. Output is an ImageAnalysisResult exposing the requested feature results - caption text and confidence, dense captions with regions, OCR blocks/lines/words, tags, objects, people, or crop regions - or an HttpResponseException with a status code on failure.

Integrations

<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-ai-vision-imageanalysis</artifactId>
    <version>1.1.0-beta.1</version>
</dependency>

It requires a Vision resource endpoint and key, or DefaultAzureCredential for Entra ID authentication, configured through the VISION_ENDPOINT and VISION_KEY environment variables.

Who it's for

Java developers building image-understanding features - content moderation, accessibility captioning, document OCR, product or object detection, or automated thumbnail generation - who need production Azure Vision integration rather than a single-feature prototype.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.