Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build image analysis applications with Azure AI Vision SDK for Java. Use when implementing image captioning, OCR text extraction, object detection, tagging, or smart cropping.
.claude/skills/azure-ai-vision-imageanalysis-java/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-17 | ✗→✓ | ▲ Improved | — | — |
Build image analysis applications using the Azure AI Vision Image Analysis SDK for Java.
xml<dependency> <groupId>com.azure</groupId> <artifactId>azure-ai-vision-imageanalysis</artifactId> <version>1.1.0-beta.1</version> </dependency>
javaimport com.azure.ai.vision.imageanalysis.ImageAnalysisClient; import com.azure.ai.vision.imageanalysis.ImageAnalysisClientBuilder; import com.azure.core.credential.KeyCredential; String endpoint = System.getenv("VISION_ENDPOINT"); String key = System.getenv("VISION_KEY"); ImageAnalysisClient client = new ImageAnalysisClientBuilder() .endpoint(endpoint) .credential(new KeyCredential(key)) .buildClient();
javaimport com.azure.ai.vision.imageanalysis.ImageAnalysisAsyncClient; ImageAnalysisAsyncClient asyncClient = new ImageAnalysisClientBuilder() .endpoint(endpoint) .credential(new KeyCredential(key)) .buildAsyncClient();
javaimport com.azure.identity.DefaultAzureCredentialBuilder; ImageAnalysisClient client = new ImageAnalysisClientBuilder() .endpoint(endpoint) .credential(new DefaultAzureCredentialBuilder().build()) .buildClient();
| Feature | Description | |---------|-------------| | CAPTION | Generate human-readable image description | | DENSE_CAPTIONS | Captions for up to 10 regions | | READ | OCR - Extract text from images | | TAGS | Content tags for objects, scenes, actions | | OBJECTS | Detect objects with bounding boxes | | SMART_CROPS | Smart thumbnail regions | | PEOPLE | Detect people with locations |
javaimport com.azure.ai.vision.imageanalysis.models.*; import com.azure.core.util.BinaryData; import java.io.File; import java.util.Arrays; // From file BinaryData imageData = BinaryData.fromFile(new File("image.jpg").toPath()); ImageAnalysisResult result = client.analyze( imageData, Arrays.asList(VisualFeatures.CAPTION), new ImageAnalysisOptions().setGenderNeutralCaption(true)); System.out.printf("Caption: \"%s\" (confidence: %.4f)%n", result.getCaption().getText(), result.getCaption().getConfidence());
javaImageAnalysisResult result = client.analyzeFromUrl( "https://example.com/image.jpg", Arrays.asList(VisualFeatures.CAPTION), new ImageAnalysisOptions().setGenderNeutralCaption(true)); System.out.printf("Caption: \"%s\"%n", result.getCaption().getText());
javaImageAnalysisResult result = client.analyze( BinaryData.fromFile(new File("document.jpg").toPath()), Arrays.asList(VisualFeatures.READ), null); for (DetectedTextBlock block : result.getRead().getBlocks()) { for (DetectedTextLine line : block.getLines()) { System.out.printf("Line: '%s'%n", line.getText()); System.out.printf(" Bounding polygon: %s%n", line.getBoundingPolygon()); for (DetectedTextWord word : line.getWords()) { System.out.printf(" Word: '%s' (confidence: %.4f)%n", word.getText(), word.getConfidence()); } } }
javaImageAnalysisResult result = client.analyzeFromUrl( imageUrl, Arrays.asList(VisualFeatures.OBJECTS), null); for (DetectedObject obj : result.getObjects()) { System.out.printf("Object: %s (confidence: %.4f)%n", obj.getTags().get(0).getName(), obj.getTags().get(0).getConfidence()); ImageBoundingBox box = obj.getBoundingBox(); System.out.printf(" Location: x=%d, y=%d, w=%d, h=%d%n", box.getX(), box.getY(), box.getWidth(), box.getHeight()); }
javaImageAnalysisResult result = client.analyzeFromUrl( imageUrl, Arrays.asList(VisualFeatures.TAGS), null); for (DetectedTag tag : result.getTags()) { System.out.printf("Tag: %s (confidence: %.4f)%n", tag.getName(), tag.getConfidence()); }
javaImageAnalysisResult result = client.analyzeFromUrl( imageUrl, Arrays.asList(VisualFeatures.PEOPLE), null); for (DetectedPerson person : result.getPeople()) { ImageBoundingBox box = person.getBoundingBox(); System.out.printf("Person at x=%d, y=%d (confidence: %.4f)%n", box.getX(), box.getY(), person.getConfidence()); }
javaImageAnalysisResult result = client.analyzeFromUrl( imageUrl, Arrays.asList(VisualFeatures.SMART_CROPS), new ImageAnalysisOptions().setSmartCropsAspectRatios(Arrays.asList(1.0, 1.5))); for (CropRegion crop : result.getSmartCrops()) { System.out.printf("Crop region: aspect=%.2f, x=%d, y=%d, w=%d, h=%d%n", crop.getAspectRatio(), crop.getBoundingBox().getX(), crop.getBoundingBox().getY(), crop.getBoundingBox().getWidth(), crop.getBoundingBox().getHeight()); }
javaImageAnalysisResult result = client.analyzeFromUrl( imageUrl, Arrays.asList(VisualFeatures.DENSE_CAPTIONS), new ImageAnalysisOptions().setGenderNeutralCaption(true)); for (DenseCaption caption : result.getDenseCaptions()) { System.out.printf("Caption: \"%s\" (confidence: %.4f)%n", caption.getText(), caption.getConfidence()); System.out.printf(" Region: x=%d, y=%d, w=%d, h=%d%n", caption.getBoundingBox().getX(), caption.getBoundingBox().getY(), caption.getBoundingBox().getWidth(), caption.getBoundingBox().getHeight()); }
javaImageAnalysisResult result = client.analyzeFromUrl( imageUrl, Arrays.asList( VisualFeatures.CAPTION, VisualFeatures.TAGS, VisualFeatures.OBJECTS, VisualFeatures.READ), new ImageAnalysisOptions() .setGenderNeutralCaption(true) .setLanguage("en")); // Access all results System.out.println("Caption: " + result.getCaption().getText()); System.out.println("Tags: " + result.getTags().size()); System.out.println("Objects: " + result.getObjects().size()); System.out.println("Text blocks: " + result.getRead().getBlocks().size());
javaasyncClient.analyzeFromUrl( imageUrl, Arrays.asList(VisualFeatures.CAPTION), null) .subscribe( result -> System.out.println("Caption: " + result.getCaption().getText()), error -> System.err.println("Error: " + error.getMessage()), () -> System.out.println("Complete") );
javaimport com.azure.core.exception.HttpResponseException; try { client.analyzeFromUrl(imageUrl, Arrays.asList(VisualFeatures.CAPTION), null); } catch (HttpResponseException e) { System.out.println("Status: " + e.getResponse().getStatusCode()); System.out.println("Error: " + e.getMessage()); }
bashVISION_ENDPOINT=https://<resource>.cognitiveservices.azure.com/ VISION_KEY=<your-api-key>
Caption and Dense Captions require GPU-supported regions. Check supported regions before deployment.
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.