Skip to content

Commit a5c7241

Browse files
Merge pull request #235453 from dargilco/dargilco/vision-sdk-updates-1
Minor updates to Image Analysis Quickstart pages (SDK pages)
2 parents 6fcfeba + b26ddf9 commit a5c7241

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/image-analysis-cpp-sdk-40.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,17 @@ ms.author: pafarley
1414

1515
<a name="HOLTop"></a>
1616

17-
Use the Image Analysis client library for C++ to analyze an image to read text and generate captions. This quickstart defines a method, `AnalyzeImage`, which uses the client object to analyze a remote image and print the results.
17+
Use the Image Analysis client library for C++ to analyze an image to read text and generate an image caption. This quickstart defines a function `AnalyzeImage()`, which uses the client object to analyze a remote image and print the results to the console.
1818

19-
[Reference documentation](/cpp/cognitive-services/vision) | Packages (NuGet): [Core](https://www.nuget.org/packages/Azure.AI.Vision.Core) [ImageAnalysis](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis) | [Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk)
20-
21-
> [!TIP]
22-
> You can also analyze a local image. See the [reference documentation](/cpp/cognitive-services/vision) for alternative **Analyze** methods. Or, see the sample code on [GitHub](https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/samples/cpp/image-analysis/samples.cpp) for scenarios involving local images.
19+
[Reference documentation](/cpp/cognitive-services/vision) | Packages (NuGet): [ImageAnalysis](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis) | [Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk)
2320

2421
> [!TIP]
2522
> The Analysis 4.0 API can do many different operations. See the [Analyze Image how-to guide](../../how-to/call-analyze-image-40.md) for examples that showcase all of the available features.
2623
2724
## Prerequisites
2825

2926
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
30-
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/).
27+
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) with workload **Desktop development with C++** enabled.
3128
* 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. In order to use the captioning feature in this quickstart, you must create your resource in one of the following Azure regions: East US, France Central, Korea Central, North Europe, Southeast Asia, West Europe, West US. After it deploys, click **Go to resource**.
3229
* You will need the key and endpoint from the resource you create to connect your application to the Computer Vision service.
3330
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
@@ -41,9 +38,7 @@ Create a new C++ application.
4138

4239
#### [Windows](#tab/windows)
4340

44-
In Visual Studio, open the **File** menu and choose **New** -> **Project** to open the **Create a new Project** dialog. Create a new **C++ Console application** and then choose **Next**.
45-
46-
In the **Configure your new project** dialog, enter _ImageAnalysisQuickstart_ in the **Project name** edit box. Choose **Create** to create the project.
41+
Open Visual Studio, and under **Get started** select **Create a new project**. Set the template filters to _C++/Windows/Console_. Select **Console App** and choose **Next**. Update the project name to _ImageAnalysisQuickstart_ and choose **Create** to create the project.
4742

4843
### Install the client library
4944

@@ -61,10 +56,13 @@ Follow [these instructions](https://github.com/Azure-Samples/azure-ai-vision-sdk
6156

6257
From the project directory, open the _ImageAnalysisQuickstart.cpp_ file that was created previously with [your new project](#set-up-application). Clear its contents and paste in the following code:
6358

59+
> [!TIP]
60+
> You can also analyze a local image. See the [sample code](https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/samples/cpp/image-analysis/samples.cpp) repository for scenarios involving local images.
61+
6462
[!code-cpp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/cpp/image-analysis/2/2.cpp?name=snippet_single)]
6563

6664

67-
Then, run the application by clicking the **Debug** button at the top of the IDE window.
65+
Then, compile and run the application by selecting **Start Debugging** from the **Debug** menu at the top of the IDE window (or press **F5**). You should see output similar to the one below.
6866

6967
> [!div class="nextstepaction"]
7068
> <a href="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CPP&Pillar=Vision&Product=Image-analysis&Page=quickstart4&Section=Analyze-image" target="_target">I ran into an issue</a>

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/image-analysis-csharp-sdk-40.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,18 @@ ms.author: pafarley
1414

1515
<a name="HOLTop"></a>
1616

17-
Use the Image Analysis client library for C# to analyze an image to read text and generate captions. This quickstart defines a method, `AnalyzeAsync`, which uses the client object to analyze a remote image and print the results.
17+
Use the Image Analysis client library for C# to analyze an image to read text and generate an image caption. This quickstart defines a method `AnalyzeAsync()`, which uses the client object to analyze a remote image and print the results to the console.
1818

1919
[Reference documentation](/dotnet/api/azure.ai.vision.imageanalysis
20-
) | Packages (NuGet): [Core](https://www.nuget.org/packages/Azure.AI.Vision.Core) [ImageAnalysis](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis) | [Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk)
21-
22-
> [!TIP]
23-
> You can also analyze a local image. See the [reference documetation](/dotnet/api/azure.ai.vision.imageanalysis) for alternative **Analyze** methods. Or, see the sample code on [GitHub](https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/samples/csharp/image-analysis/dotnetcore/Samples.cs) for scenarios involving local images.
20+
) | Packages (NuGet): [ImageAnalysis](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis) | [Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk)
2421

2522
> [!TIP]
2623
> The Analysis 4.0 API can do many different operations. See the [Analyze Image how-to guide](../../how-to/call-analyze-image-40.md) for examples that showcase all of the available features.
2724
2825
## Prerequisites
2926

3027
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
31-
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) or current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
28+
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) with workload **.NET desktop development** enabled, or [.NET 6.0](https://dotnet.microsoft.com/download/dotnet-core) SDK (or above) installed.
3229
* 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. In order to use the captioning feature in this quickstart, you must create your resource in one of the following Azure regions: East US, France Central, Korea Central, North Europe, Southeast Asia, West Europe, West US. After it deploys, click **Go to resource**.
3330
* You will need the key and endpoint from the resource you create to connect your application to the Computer Vision service.
3431
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
@@ -42,7 +39,7 @@ Create a new C# application.
4239

4340
#### [Visual Studio IDE](#tab/visual-studio)
4441

45-
Using Visual Studio, create a new **Console app (.NET Framework)** application.
42+
Open Visual Studio, and under **Get started** select **Create a new project**. Set the template filters to _C#/All Platforms/Console_. Select **Console App** (command-line application that can run on .NET on Windows, Linux and macOS) and choose **Next**. Update the project name to _ImageAnalysisQuickstart_ and choose **Next**. Select **.NET 6.0** or above, and choose **Create** to create the project.
4643

4744
### Install the client library
4845

@@ -52,13 +49,13 @@ Once you've created a new project, install the client library by right-clicking
5249

5350
In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app with the name `image-analysis-quickstart`. This command creates a simple "Hello World" C# project with a single source file: *Program.cs*.
5451

55-
```console
52+
```dotnet
5653
dotnet new console -n image-analysis-quickstart
5754
```
5855

5956
Change your directory to the newly created app folder. You can build the application with:
6057

61-
```console
58+
```dotnet
6259
dotnet build
6360
```
6461

@@ -76,7 +73,7 @@ Build succeeded.
7673

7774
Within the application directory, install the Computer Vision client library for .NET with the following command:
7875

79-
```console
76+
```dotnet
8077
dotnet add package Azure.AI.Vision.ImageAnalysis --prerelease
8178
```
8279

@@ -88,20 +85,24 @@ dotnet add package Azure.AI.Vision.ImageAnalysis --prerelease
8885

8986
From the project directory, open the *Program.cs* file that was created previously with [your new project](#set-up-application). Paste in the following code:
9087

88+
> [!TIP]
89+
> You can also analyze a local image. See the [sample code](https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/samples/csharp/image-analysis/dotnetcore/Samples.cs) repository for scenarios involving local images.
90+
9191
[!code-csharp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/csharp/image-analysis/2/Program.cs?name=snippet_single)]
9292

9393

94-
Then, run the application
94+
Then, build and run the application. You should see output similar to the one below.
9595

9696
#### [Visual Studio IDE](#tab/visual-studio)
9797

98-
Run the application by clicking the **Debug** button at the top of the IDE window.
98+
Build and run the application by selecting **Start Debugging** from the **Debug** menu at the top of the IDE window (or press **F5**).
9999

100100
#### [CLI](#tab/cli)
101101

102-
Run the application from your application directory with the `dotnet run` command.
102+
Build and run the application from your application directory with these commands:
103103

104104
```dotnet
105+
dotnet build
105106
dotnet run
106107
```
107108

articles/cognitive-services/Computer-vision/includes/quickstarts-sdk/image-analysis-python-sdk-40.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ ms.author: pafarley
1414

1515
<a name="HOLTop"></a>
1616

17-
Use the Image Analysis client library for Python to analyze a remote image to read text and generate captions.
17+
Use the Image Analysis client library for Python to analyze a remote image to read text and generate an image caption.
1818

1919
[Reference documentation](/python/api/azure-ai-vision) | [Package (PiPy)](https://pypi.org/project/azure-ai-vision/) | [Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk)
2020

21-
> [!TIP]
22-
> You can also analyze a local image. See the [reference documentation](/python/api/azure-ai-vision) for alternative **Analyze** methods. Or, see the sample code on [GitHub](https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/samples/python/image-analysis/samples.py) for scenarios involving local images.
23-
2421
> [!TIP]
2522
> The Analysis 4.0 API can do many different operations. See the [Analyze Image how-to guide](../../how-to/call-analyze-image-40.md) for examples that showcase all of the available features.
2623
@@ -50,7 +47,10 @@ Use the Image Analysis client library for Python to analyze a remote image to re
5047

5148
1. Copy the following code into *quickstart.py*:
5249

53-
[!code-python[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/python/image-analysis/2/main.py?name=snippet_single)]
50+
> [!TIP]
51+
> You can also analyze a local image. See the [sample code](https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/samples/python/image-analysis/samples.py) repository for scenarios involving local images.
52+
53+
[!code-python[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/python/image-analysis/2/main.py?name=snippet_single)]
5454

5555
1. Then run the application with the `python` command on your quickstart file.
5656

articles/cognitive-services/Computer-vision/quickstarts-sdk/image-analysis-client-library-40.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ keywords: computer vision, computer vision service
1818

1919
# Quickstart: Image Analysis 4.0
2020

21-
Get started with the Image Analysis 4.0 REST API or client libraries to set up a basic image analysis script. The Analyze Image service provides you with AI algorithms for processing images and returning information on their visual features. Follow these steps to install a package to your application and try out the sample code.
21+
Get started with the Image Analysis 4.0 REST API or client libraries to set up a basic image analysis application. The Image Analysis service provides you with AI algorithms for processing images and returning information on their visual features. Follow these steps to install a package to your application and try out the sample code.
2222

2323
::: zone pivot="programming-language-csharp"
2424

0 commit comments

Comments
 (0)