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
Copy file name to clipboardExpand all lines: articles/ai-services/computer-vision/includes/image-analysis-curl-quickstart.md
+15-22Lines changed: 15 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,25 @@ manager: nitinme
8
8
9
9
ms.service: azure-ai-vision
10
10
ms.topic: include
11
-
ms.date: 09/12/2022
11
+
ms.date: 09/30/2024
12
12
ms.author: pafarley
13
13
---
14
14
15
15
Use the Image Analysis REST API to analyze an image for tags.
16
16
17
17
> [!TIP]
18
-
> The Analyze API can do many different operations other than generate image tags. See the [Image Analysis how-to guide](../how-to/call-analyze-image.md) for examples that showcase all of the available features.
18
+
> The Analyze Image API can do many different operations other than generate image tags. See the [Image Analysis how-to guide](../how-to/call-analyze-image.md) for examples that showcase all of the available features.
19
19
20
20
> [!NOTE]
21
21
> This quickstart uses cURL commands to call the REST API. You can also call the REST API using a programming language. See the GitHub samples for examples in [C#](https://github.com/Azure-Samples/cognitive-services-quickstart-code/tree/master/dotnet/ComputerVision/REST), [Python](https://github.com/Azure-Samples/cognitive-services-quickstart-code/tree/master/python/ComputerVision/REST), [Java](https://github.com/Azure-Samples/cognitive-services-quickstart-code/tree/master/java/ComputerVision/REST), and [JavaScript](https://github.com/Azure-Samples/cognitive-services-quickstart-code/tree/master/javascript/ComputerVision/REST).
22
22
23
23
## Prerequisites
24
24
25
-
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
26
-
* Once you have your Azure subscription, <ahref="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision"title="create a Vision resource"target="_blank">create a Vision resource</a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
27
-
* You'll need the key and endpoint from the resource you create to connect your application to the Azure AI Vision service. You'll paste your key and endpoint into the code below later in the quickstart.
25
+
* An Azure subscription. You can [create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?icid=ai-services).
26
+
* Once you have your Azure subscription, create a [Computer Vision resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision) in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
27
+
* You need the key and endpoint from the resource you create to connect your application to the Azure AI Vision service.
28
28
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
29
-
*[cURL](https://curl.haxx.se/) installed
30
-
31
-
29
+
*[cURL](https://curl.se) installed.
32
30
33
31
## Analyze an image
34
32
@@ -37,25 +35,23 @@ To analyze an image for various visual features, do the following steps:
1. Optionally, change the image URL in the request body (`https://learn.microsoft.com/azure/ai-services/computer-vision/media/quickstarts/presentation.png`) to the URL of a different image to be analyzed.
48
46
1. Open a command prompt window.
49
47
1. Paste your edited `curl`command from the text editor into the command prompt window, and then run the command.
50
48
51
-
52
-
53
49
### Examine the response
54
50
55
-
A successful response is returned in JSON. The sample application parses and displays a successful response in the command prompt window, similar to the following example:
51
+
A successful response is returned in JSON format. The sample application parses and displays a successful response in the command prompt window, similar to the following example:
56
52
57
53
```json
58
-
{{
54
+
{
59
55
"tags":[
60
56
{
61
57
"name":"text",
@@ -92,14 +88,11 @@ A successful response is returned in JSON. The sample application parses and dis
92
88
}
93
89
```
94
90
91
+
## Next step
95
92
96
-
97
-
98
-
## Next steps
99
-
100
-
In this quickstart, you learned how to make basic image analysis calls using the REST API. Next, learn more about the Analyze API features.
93
+
In this quickstart, you learned how to make basic image analysis calls using the REST API. Next, learn more about the Analyze Image API features.
101
94
102
95
> [!div class="nextstepaction"]
103
-
>[Call the Analyze API](../how-to/call-analyze-image.md)
96
+
>[Call the Analyze Image API](../how-to/call-analyze-image.md)
Copy file name to clipboardExpand all lines: articles/ai-services/computer-vision/includes/quickstarts-sdk/image-analysis-csharp-sdk.md
+17-21Lines changed: 17 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,32 +6,30 @@ author: PatrickFarley
6
6
manager: nitinme
7
7
ms.service: azure-ai-vision
8
8
ms.topic: include
9
-
ms.date: 03/29/2021
9
+
ms.date: 09/26/2024
10
10
ms.author: pafarley
11
11
---
12
12
13
13
<aname="HOLTop"></a>
14
14
15
15
Use the Image Analysis client library for C# to analyze an image for content tags. This quickstart defines a method, `AnalyzeImageUrl`, which uses the client object to analyze a remote image and print the results.
> You can also analyze a local image. See the [ComputerVisionClient](/dotnet/api/microsoft.azure.cognitiveservices.vision.computervision.computervisionclient) methods, such as **AnalyzeImageInStreamAsync**. Or, see the sample code on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/ComputerVision/ImageAnalysisQuickstart.cs) for scenarios involving local images.
21
21
22
22
> [!TIP]
23
-
> The Analyze API can do many different operations other than generate image tags. See the [Image Analysis how-to guide](../../how-to/call-analyze-image.md) for examples that showcase all of the available features.
23
+
> The Analyze Image API can do many different operations other than generate image tags. See the [Image Analysis how-to guide](../../how-to/call-analyze-image.md) for examples that showcase all of the available features.
24
24
25
25
## Prerequisites
26
26
27
-
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
28
-
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) or current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
29
-
* Once you have your Azure subscription, <ahref="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision"title="create a Computer Vision resource"target="_blank">create a Computer Vision resource</a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
27
+
* An Azure subscription. You can [create one for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?icid=ai-services).
28
+
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) or current version of [.NET Core](https://dotnet.microsoft.com/en-us/download/dotnet).
29
+
* Once you have your Azure subscription, create a [Computer Vision resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision) in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
30
30
* You need the key and endpoint from the resource you create to connect your application to the Azure AI Vision service.
31
31
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
@@ -44,11 +42,11 @@ Use the Image Analysis client library for C# to analyze an image for content tag
44
42
45
43
### Install the client library
46
44
47
-
Once you've created a new project, install the client library by right-clicking on the project solution in the **Solution Explorer** and selecting **Manage NuGet Packages**. In the package manager that opens select **Browse**, check **Include prerelease**, and search for `Microsoft.Azure.CognitiveServices.Vision.ComputerVision`. Select version `7.0.0`, and then **Install**.
45
+
After you create a new project, install the client library by right-clicking on the project solution in the **Solution Explorer** and selecting **Manage NuGet Packages**. In the package manager that opens select **Browse**, check **Include prerelease**, and search for `Microsoft.Azure.CognitiveServices.Vision.ComputerVision`. Select version `7.0.0`, and then **Install**.
48
46
49
47
#### [CLI](#tab/cli)
50
48
51
-
In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app with the name `computer-vision-quickstart`. This command creates a simple "Hello World" C# project with a single source file: *Program.cs*.
49
+
In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app with the name `computer-vision-quickstart`. This command creates a simple *Hello World* C# project with a single source file: *Program.cs*.
52
50
53
51
```console
54
52
dotnet new console -n computer-vision-quickstart
@@ -84,9 +82,8 @@ Use the Image Analysis client library for C# to analyze an image for content tag
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](/azure/key-vault/general/overview). See the Azure AI services [security](../../../security-features.md) article for more information.
86
+
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](/azure/key-vault/general/overview). For more information, see [Azure AI services security](../../../security-features.md).
90
87
91
88
1. Run the application
92
89
@@ -96,7 +93,7 @@ Use the Image Analysis client library for C# to analyze an image for content tag
96
93
97
94
#### [CLI](#tab/cli)
98
95
99
-
Run the application from your application directory with the `dotnet run` command.
96
+
Run the application from your application directory by using the `dotnet run` command.
100
97
101
98
```dotnet
102
99
dotnet run
@@ -105,9 +102,10 @@ Use the Image Analysis client library for C# to analyze an image for content tag
105
102
---
106
103
107
104
108
-
109
105
## Output
110
106
107
+
The output of your operation should look like the following example.
If you want to clean up and remove an Azure AI services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
In this quickstart, you learned how to install the Image Analysis client library and make basic image analysis calls. Next, learn more about the Analyze API features.
142
+
## Related content
148
143
144
+
In this quickstart, you learned how to install the Image Analysis client library and make basic image analysis calls. Next, learn more about the Image Analysis API features.
149
145
150
146
> [!div class="nextstepaction"]
151
-
>[Call the Analyze API](../../how-to/call-analyze-image.md)
147
+
>[Call the Analyze Image API](../../how-to/call-analyze-image.md)
*The source code for this sample can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/ComputerVision/ImageAnalysisQuickstart.cs).
149
+
*[What is Image Analysis?](../../overview-image-analysis.md)
150
+
*[Source code for this sample on GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/ComputerVision/ImageAnalysisQuickstart.cs)
0 commit comments