Skip to content

Commit 6ce4a10

Browse files
committed
Refresh articles
1 parent 245a2e6 commit 6ce4a10

File tree

6 files changed

+86
-112
lines changed

6 files changed

+86
-112
lines changed

articles/ai-services/computer-vision/includes/image-analysis-curl-quickstart.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,25 @@ manager: nitinme
88

99
ms.service: azure-ai-vision
1010
ms.topic: include
11-
ms.date: 09/12/2022
11+
ms.date: 09/30/2024
1212
ms.author: pafarley
1313
---
1414

1515
Use the Image Analysis REST API to analyze an image for tags.
1616

1717
> [!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 Image Analysis 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.
1919
2020
> [!NOTE]
2121
> 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).
2222
2323
## Prerequisites
2424

25-
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
26-
* Once you have your Azure subscription, <a href="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/en-us/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.
2828
* 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.
3230

3331
## Analyze an image
3432

@@ -37,25 +35,23 @@ To analyze an image for various visual features, do the following steps:
3735
1. Copy the following command into a text editor.
3836

3937
```bash
40-
curl.exe -H "Ocp-Apim-Subscription-Key: <subscriptionKey>" -H "Content-Type: application/json" "https://westcentralus.api.cognitive.microsoft.com/vision/v3.2/analyze?visualFeatures=Tags" -d "{'url':'https://learn.microsoft.com/azure/ai-services/computer-vision/media/quickstarts/presentation.png'}"
38+
curl.exe -H "Ocp-Apim-Subscription-Key: <yourKey>" -H "Content-Type: application/json" "https://westcentralus.api.cognitive.microsoft.com/vision/v3.2/analyze?visualFeatures=Tags" -d "{'url':'https://learn.microsoft.com/azure/ai-services/computer-vision/media/quickstarts/presentation.png'}"
4139
```
4240

4341
1. Make the following changes in the command where needed:
44-
1. Replace the value of `<subscriptionKey>` with your key.
45-
1. Replace the first part of the request URL (`westcentralus`) with the text in your own endpoint URL.
42+
1. Replace the value of `<yourKey>` with the key from your Computer Vision resource.
43+
1. Replace the first part of the request URL (`westcentralus.api.cognitive.microsoft.com`) with your own endpoint URL.
4644
[!INCLUDE [Custom subdomains notice](../../includes/cognitive-services-custom-subdomains-note.md)]
4745
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.
4846
1. Open a command prompt window.
4947
1. Paste your edited `curl` command from the text editor into the command prompt window, and then run the command.
5048

51-
52-
5349
### Examine the response
5450

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

5753
```json
58-
{{
54+
{
5955
"tags":[
6056
{
6157
"name":"text",
@@ -92,14 +88,11 @@ A successful response is returned in JSON. The sample application parses and dis
9288
}
9389
```
9490

91+
## Next step
9592

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 Image Analysis API features.
10194

10295
> [!div class="nextstepaction"]
103-
>[Call the Analyze API](../how-to/call-analyze-image.md)
96+
>[Call the Image Analysis API](../how-to/call-analyze-image.md)
10497

105-
* [Image Analysis overview](../overview-image-analysis.md)
98+
* [What is Image Analysis?](../overview-image-analysis.md)

articles/ai-services/computer-vision/includes/quickstarts-sdk/image-analysis-csharp-sdk.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,30 @@ author: PatrickFarley
66
manager: nitinme
77
ms.service: azure-ai-vision
88
ms.topic: include
9-
ms.date: 03/29/2021
9+
ms.date: 09/26/2024
1010
ms.author: pafarley
1111
---
1212

1313
<a name="HOLTop"></a>
1414

1515
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.
1616

17-
[Reference documentation](/dotnet/api/overview/azure/computer-vision) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/cognitiveservices/Vision.ComputerVision) | [Package (NuGet)](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ComputerVision/) | [Samples](/samples/browse/?products=azure&terms=computer-vision)
17+
[Reference documentation](/dotnet/api/overview/azure/computer-vision) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/cognitiveservices/Vision.ComputerVision) | [Package (NuGet)](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ComputerVision/) | [Samples](/samples/browse/?products=azure&terms=computer-vision)
1818

1919
> [!TIP]
2020
> 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.
2121
2222
> [!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 Image Analysis 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.
2424
2525
## Prerequisites
2626

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, <a href="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/en-us/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**.
3030
* You need the key and endpoint from the resource you create to connect your application to the Azure AI Vision service.
3131
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
3232

33-
34-
3533
[!INCLUDE [create environment variables](../environment-variables.md)]
3634

3735
## Analyze image
@@ -44,11 +42,11 @@ Use the Image Analysis client library for C# to analyze an image for content tag
4442

4543
### Install the client library
4644

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**.
4846

4947
#### [CLI](#tab/cli)
5048

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*.
5250

5351
```console
5452
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
8482

8583
[!code-csharp[](~/cognitive-services-quickstart-code/dotnet/ComputerVision/ImageAnalysisQuickstart-single.cs?name=snippet_single)]
8684

87-
8885
> [!IMPORTANT]
89-
> 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).
9087

9188
1. Run the application
9289

@@ -96,7 +93,7 @@ Use the Image Analysis client library for C# to analyze an image for content tag
9693

9794
#### [CLI](#tab/cli)
9895

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

10198
```dotnet
10299
dotnet run
@@ -105,9 +102,10 @@ Use the Image Analysis client library for C# to analyze an image for content tag
105102
---
106103

107104

108-
109105
## Output
110106

107+
The output of your operation should look like the following example.
108+
111109
```console
112110
----------------------------------------------------------
113111
ANALYZE IMAGE - URL
@@ -134,21 +132,19 @@ brown 0.6581960916519165
134132
```
135133

136134

137-
138135
## Clean up resources
139136

140137
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.
141138

142139
* [Azure portal](../../../multi-service-resource.md?pivots=azportal#clean-up-resources)
143140
* [Azure CLI](../../../multi-service-resource.md?pivots=azcli#clean-up-resources)
144141

145-
## Next steps
146-
147-
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
148143

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

150146
> [!div class="nextstepaction"]
151-
>[Call the Analyze API](../../how-to/call-analyze-image.md)
147+
>[Call the Image Analysis API](../../how-to/call-analyze-image.md)
152148
153-
* [Image Analysis overview](../../overview-image-analysis.md)
154-
* 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

Comments
 (0)