You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new [ImageAnalysisOptions](/cpp/cognitive-services/vision/imageanalysis-imageanalysisoptions) object and call the [SetSegmentationMode](/cpp/cognitive-services/vision/imageanalysis-imageanalysisoptions#setsegmentationmode) method. You must call this method if you want to do segmentation. See [ImageSegmentationMode](/cpp/cognitive-services/vision/azure-ai-vision-imageanalysis-namespace#enum-imagesegmentationmode) for supported values.
Create a new [ImageAnalysisOptions](/java/api/com.azure.ai.vision.imageanalysis.imageanalysisoptions) object and call the [setSegmentationMode](/java/api/com.azure.ai.vision.imageanalysis.imageanalysisoptions#com-azure-ai-vision-imageanalysis-imageanalysisoptions-setsegmentationmode()) method. You must call this method if you want to do segmentation. See [ImageSegmentationMode](/java/api/com.azure.ai.vision.imageanalysis.imagesegmentationmode) for supported values.
Create a new [ImageAnalysisOptions](/cpp/cognitive-services/vision/imageanalysis-imageanalysisoptions) object and call the [SetSegmentationMode](/cpp/cognitive-services/vision/imageanalysis-imageanalysisoptions#setsegmentationmode) method. You must call this method if you want to do segmentation. See [ImageSegmentationMode](/cpp/cognitive-services/vision/azure-ai-vision-imageanalysis-namespace#enum-imagesegmentationmode) for supported values.
Copy file name to clipboardExpand all lines: articles/ai-services/computer-vision/includes/image-analysis-error-codes-40.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,21 @@ Make sure the [ImageAnalysisOptions](/python/api/azure-ai-vision/azure.ai.vision
28
28
29
29
To help resolve issues, look at the [Image Analysis Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk) repository and run the closest sample to your scenario. Search the [GitHub issues](https://github.com/Azure-Samples/azure-ai-vision-sdk/issues) to see if your issue was already address. If not, create a new.
30
30
31
+
# [Java](#tab/java)
32
+
33
+
The sample code for getting analysis results shows how to handle errors and get the [ImageAnalysisErrorDetails](/java/api/com.azure.ai.vision.imageanalysis.imageanalysiserrordetails) object that contains the error information. The error information includes:
34
+
35
+
* Error reason. See enum [ImageAnalysisErrorReason](/java/api/com.azure.ai.vision.imageanalysis.imageanalysiserrorreason).
36
+
* Error code and error message. Select the **REST API** tab to see a list of some common error codes and messages.
37
+
38
+
In addition to those errors, the SDK has a few other error messages, including:
39
+
*`Missing Image Analysis options: You must set at least one visual feature (or model name) for the 'analyze' operation. Or set segmentation mode for the 'segment' operation`
40
+
*`Invalid combination of Image Analysis options: You cannot set both visual features (or model name), and segmentation mode`
41
+
42
+
Make sure the [ImageAnalysisOptions](/java/api/com.azure.ai.vision.imageanalysis.imageanalysisoptions) object is set correctly to fix these errors.
43
+
44
+
To help resolve issues, look at the [Image Analysis Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk) repository and run the closest sample to your scenario. Search the [GitHub issues](https://github.com/Azure-Samples/azure-ai-vision-sdk/issues) to see if your issue was already address. If not, create a new.
45
+
31
46
# [C++](#tab/cpp)
32
47
33
48
The sample code for getting analysis results shows how to handle errors and get the [ImageAnalysisErrorDetails](/cpp/cognitive-services/vision/imageanalysis-imageanalysiserrordetails) object that contains the error information. The error information includes:
1. Update the version value in `<version>0.15.1-beta.1</version>` based on the latest version you find in the Maven repository for the [azure-ai-vision-imageanalysis](https://mvnrepository.com/artifact/com.azure/azure-ai-vision-imageanalysis) package.
72
-
73
67
1. Run the following Maven command to install the Vision SDK and dependencies.
74
-
```console
68
+
```console
75
69
mvn clean dependency:copy-dependencies
76
-
```
77
-
78
-
2. Verify that the local folder path `target\dependency` was created, and it contains `.jar` files including three file named `azure-ai-vision-*.jar`
70
+
```
71
+
1. Verify that the local folder path `target\dependency` was created, and it contains `.jar` files including three file named `azure-ai-vision-*.jar`
79
72
80
73
# [Gradle](#tab/gradle)
81
74
82
75
1. Install [Gradle](https://gradle.org/install).
83
-
84
76
1. In a command prompt run `gradle -v` to confirm successful installation.
85
-
86
77
1. Create you Java application using Gradle. See for example [Building Java Applications Sample](https://docs.gradle.org/8.3/samples/sample_building_java_applications.html).
87
-
88
78
1. Update your `build.gradle` file by inserting 4 new dependencies:
1. Update the version value in `com.azure:azure-ai-vision-imageanalysis:0.15.1-beta.1` based on the latest version you find in the Maven repository for the [azure-ai-vision-imageanalysis](https://mvnrepository.com/artifact/com.azure/azure-ai-vision-imageanalysis) package.
100
-
101
-
1. Update your Java application with Image Analysis code, compile and run it.
88
+
1. Update your Java application to do Image Analysis using the Azure AI Vision SDK, compile and run your application.
0 commit comments