MR
Mayur Rathi
@mayurrathi
⭐ 5 GitHub stars

Azure Ai Vision Imageanalysis Java

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.

mkdir -p ./skills/azure-ai-vision-imageanalysis-java && curl -sfL https://raw.githubusercontent.com/mayurrathi/awesome-agent-skills/main/skills/azure-ai-vision-imageanalysis-java/SKILL.md -o ./skills/azure-ai-vision-imageanalysis-java/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Azure AI Vision Image Analysis SDK for Java


Build image analysis applications using the Azure AI Vision Image Analysis SDK for Java.


Installation


```xml

<dependency>

<groupId>com.azure</groupId>

<artifactId>azure-ai-vision-imageanalysis</artifactId>

<version>1.1.0-beta.1</version>

</dependency>

```


Client Creation


With API Key


```java

import 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();

```


Async Client


```java

import com.azure.ai.vision.imageanalysis.ImageAnalysisAsyncClient;


ImageAnalysisAsyncClient asyncClient = new ImageAnalysisClientBuilder()

.endpoint(endpoint)

.credential(new KeyCredential(key))

.buildAsyncClient();

```


With DefaultAzureCredential


```java

import com.azure.identity.DefaultAzureCredentialBuilder;


ImageAnalysisClient client = new ImageAnalysisClientBuilder()

.endpoint(endpoint)

.credential(new DefaultAzureCredentialBuilder().build())

.buildClient();

```


Visual Features


| 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 |


Core Patterns


Generate Caption


```java

import 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());

```


Generate Caption from URL


```java

ImageAnalysisResult 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());

```


Extract Text (OCR)


```java

ImageAnalysisResult 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());

}

}

}

```


Detect Objects


```java

ImageAnalysisResult 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());

}

```


Get Tags


```java

ImageAnalysisResult result = client.analyzeFromUrl(

imageUrl,

Arrays.asList(VisualFeatures.TAGS),

null);


for (DetectedTag t

🎯 Best For

  • UI designers
  • Product designers
  • Claude users
  • Data professionals
  • Analytics teams

💡 Use Cases

  • Generating component mockups
  • Creating design system tokens
  • Data pipeline auditing
  • Query optimization

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Azure Ai Vision Imageanalysis Java to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

How do I install Azure Ai Vision Imageanalysis Java?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/azure-ai-vision-imageanalysis-java/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping usability testing

AI-generated designs should be validated with real users before development.

Ignoring data quality

AI analysis inherits all data quality issues — profile your data first.

🔗 Related Skills