Skip to content

Commit a1c048f

Browse files
authored
Merge pull request #229753 from eric-urban/eur/image-analysis
Image analysis suggested edits
2 parents 2df4248 + 0beb9f6 commit a1c048f

File tree

7 files changed

+263
-283
lines changed

7 files changed

+263
-283
lines changed

articles/cognitive-services/Computer-vision/how-to/background-removal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This guide assumes you've already [created a Computer Vision resource](https://p
2323
2424
## Submit data to the service
2525

26-
When calling the **Image Analysis - Segment** API, you specify the image's URL by formatting the request body like this: `{"url":"https://docs.microsoft.com/azure/cognitive-services/computer-vision/images/windows-kitchen.jpg"}`.
26+
When calling the **Image Analysis - Segment** API, you specify the image's URL by formatting the request body like this: `{"url":"https://learn.microsoft.com/azure/cognitive-services/computer-vision/images/windows-kitchen.jpg"}`.
2727

2828
To analyze a local image, you'd put the binary image data in the HTTP request body.
2929

articles/cognitive-services/Computer-vision/how-to/call-analyze-image-40.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The code in this guide uses remote images referenced by URL. You may want to try
2727
In your main class, save a reference to the URL of the image you want to analyze.
2828

2929
```csharp
30-
var imageSource = VisionSource.FromUrl(new Uri("https://docs.microsoft.com/azure/cognitive-services/computer-vision/images/windows-kitchen.jpg"));
30+
var imageSource = VisionSource.FromUrl(new Uri("https://learn.microsoft.com/azure/cognitive-services/computer-vision/images/windows-kitchen.jpg"));
3131
```
3232

3333
> [!TIP]
@@ -59,7 +59,7 @@ auto imageSource = VisionSource::FromUrl("https://learn.microsoft.com/azure/cogn
5959
6060
#### [REST](#tab/rest)
6161

62-
When analyzing a remote image, you specify the image's URL by formatting the request body like this: `{"url":"https://docs.microsoft.com/azure/cognitive-services/computer-vision/images/windows-kitchen.jpg"}`.
62+
When analyzing a remote image, you specify the image's URL by formatting the request body like this: `{"url":"https://learn.microsoft.com/azure/cognitive-services/computer-vision/images/windows-kitchen.jpg"}`.
6363

6464
To analyze a local image, you'd put the binary image data in the HTTP request body.
6565

articles/cognitive-services/Computer-vision/includes/image-analysis-curl-quickstart-40.md

Lines changed: 104 additions & 136 deletions
Large diffs are not rendered by default.

articles/cognitive-services/Computer-vision/includes/image-analysis-curl-quickstart.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@ Use the Image Analysis REST API to analyze an image for tags.
3838
To analyze an image for various visual features, do the following steps:
3939

4040
1. Copy the following command into a text editor.
41+
42+
```bash
43+
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://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Salto_del_Angel-Canaima-Venezuela08.JPG/800px-Salto_del_Angel-Canaima-Venezuela08.JPG'}"
44+
```
45+
4146
1. Make the following changes in the command where needed:
4247
1. Replace the value of `<subscriptionKey>` with your key.
4348
1. Replace the first part of the request URL (`westcentralus`) with the text in your own endpoint URL.
4449
[!INCLUDE [Custom subdomains notice](../../../../includes/cognitive-services-custom-subdomains-note.md)]
4550
1. Optionally, change the image URL in the request body (`https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Salto_del_Angel-Canaima-Venezuela08.JPG/800px-Salto_del_Angel-Canaima-Venezuela08.JPG`) to the URL of a different image to be analyzed.
4651
1. Open a command prompt window.
47-
1. Paste the command from the text editor into the command prompt window, and then run the command.
48-
49-
```bash
50-
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://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Salto_del_Angel-Canaima-Venezuela08.JPG/800px-Salto_del_Angel-Canaima-Venezuela08.JPG'}"
51-
```
52+
1. Paste your edited `curl` command from the text editor into the command prompt window, and then run the command.
5253

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

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

Lines changed: 65 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: pafarley
1616

1717
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.
1818

19-
[Reference documentation](/cpp/cognitive-services/vision) | Packages (NuGet): [Core](https://www.nuget.org/packages/Azure.AI.Vision.Core/0.8.1-beta.1) [ImageAnalysis](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis/0.8.1-beta.1) | [Samples](https://github.com/Azure-Samples/azure-ai-vision-sdk)
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)
2020

2121
> [!TIP]
2222
> 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.
@@ -59,7 +59,7 @@ Follow [these instructions](https://github.com/Azure-Samples/azure-ai-vision-sdk
5959

6060
## Analyze Image
6161

62-
From the project directory, open the _ImageAnalysisQuickstart.cpp_ file in your preferred editor or IDE. Clear its contents and paste in the following code:
62+
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:
6363

6464
<!--[!code-cpp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/cpp/image-analysis/2/2.cpp?name=snippet-single)]-->
6565

@@ -192,54 +192,69 @@ Then, run the application by clicking the **Debug** button at the top of the IDE
192192
## Output
193193
194194
```console
195-
Please wait for image analysis results...
196-
Caption:
197-
"a man pointing at a screen", Confidence 0.489159
198-
Text:
199-
Line: "9:35 AM" Word: "9:35", Confidence 0.993
200-
Word: "AM", Confidence 0.998
201-
Line: "E Conference room 154584354" Word: "E", Confidence 0.104
202-
Word: "Conference", Confidence 0.902
203-
Word: "room", Confidence 0.796
204-
Word: "154584354", Confidence 0.864
205-
Line: "#: 555-173-4547" Word: "#:", Confidence 0.036
206-
Word: "555-173-4547", Confidence 0.597
207-
Line: "Town Hall" Word: "Town", Confidence 0.981
208-
Word: "Hall", Confidence 0.991
209-
Line: "9:00 AM - 10:00 AM" Word: "9:00", Confidence 0.09
210-
Word: "AM", Confidence 0.991
211-
Word: "-", Confidence 0.691
212-
Word: "10:00", Confidence 0.885
213-
Word: "AM", Confidence 0.991
214-
Line: "Aaron Buaion" Word: "Aaron", Confidence 0.602
215-
Word: "Buaion", Confidence 0.291
216-
Line: "Daily SCRUM" Word: "Daily", Confidence 0.175
217-
Word: "SCRUM", Confidence 0.114
218-
Line: "10:00 AM 11:00 AM" Word: "10:00", Confidence 0.857
219-
Word: "AM", Confidence 0.998
220-
Word: "11:00", Confidence 0.479
221-
Word: "AM", Confidence 0.994
222-
Line: "Churlette de Crum" Word: "Churlette", Confidence 0.464
223-
Word: "de", Confidence 0.81
224-
Word: "Crum", Confidence 0.885
225-
Line: "Quarterly NI Hands" Word: "Quarterly", Confidence 0.523
226-
Word: "NI", Confidence 0.303
227-
Word: "Hands", Confidence 0.613
228-
Line: "11.00 AM-12:00 PM" Word: "11.00", Confidence 0.618
229-
Word: "AM-12:00", Confidence 0.27
230-
Word: "PM", Confidence 0.662
231-
Line: "Bebek Shaman" Word: "Bebek", Confidence 0.611
232-
Word: "Shaman", Confidence 0.605
233-
Line: "Weekly stand up" Word: "Weekly", Confidence 0.606
234-
Word: "stand", Confidence 0.489
235-
Word: "up", Confidence 0.815
236-
Line: "12:00 PM-1:00 PM" Word: "12:00", Confidence 0.826
237-
Word: "PM-1:00", Confidence 0.209
238-
Word: "PM", Confidence 0.039
239-
Line: "Delle Marckre" Word: "Delle", Confidence 0.58
240-
Word: "Marckre", Confidence 0.275
241-
Line: "Product review" Word: "Product", Confidence 0.615
242-
Word: "review", Confidence 0.04
195+
Caption:
196+
"a person pointing at a screen", Confidence 0.489159
197+
Text:
198+
Line: "9:35 AM", Bounding polygon {{130,129},{215,130},{215,149},{130,148}}
199+
Word: "9:35", Bounding polygon {{131,130},{171,130},{171,149},{130,149}}, Confidence 0.993
200+
Word: "AM", Bounding polygon {{179,130},{204,130},{203,149},{178,149}}, Confidence 0.998
201+
Line: "E Conference room 154584354", Bounding polygon {{130,153},{224,154},{224,161},{130,161}}
202+
Word: "E", Bounding polygon {{131,154},{135,154},{135,161},{131,161}}, Confidence 0.104
203+
Word: "Conference", Bounding polygon {{142,154},{174,154},{173,161},{141,161}}, Confidence 0.902
204+
Word: "room", Bounding polygon {{175,154},{189,155},{188,161},{175,161}}, Confidence 0.796
205+
Word: "154584354", Bounding polygon {{192,155},{224,154},{223,162},{191,161}}, Confidence 0.864
206+
Line: "#: 555-173-4547", Bounding polygon {{130,163},{182,164},{181,171},{130,170}}
207+
Word: "#:", Bounding polygon {{131,163},{139,164},{139,171},{131,171}}, Confidence 0.036
208+
Word: "555-173-4547", Bounding polygon {{142,164},{182,165},{181,171},{142,171}}, Confidence 0.597
209+
Line: "Town Hall", Bounding polygon {{546,180},{590,180},{590,190},{546,190}}
210+
Word: "Town", Bounding polygon {{547,181},{568,181},{568,190},{546,191}}, Confidence 0.981
211+
Word: "Hall", Bounding polygon {{570,181},{590,181},{590,191},{570,190}}, Confidence 0.991
212+
Line: "9:00 AM - 10:00 AM", Bounding polygon {{546,191},{596,192},{596,200},{546,199}}
213+
Word: "9:00", Bounding polygon {{546,192},{555,192},{555,200},{546,200}}, Confidence 0.09
214+
Word: "AM", Bounding polygon {{557,192},{565,192},{565,200},{557,200}}, Confidence 0.991
215+
Word: "-", Bounding polygon {{567,192},{569,192},{569,200},{567,200}}, Confidence 0.691
216+
Word: "10:00", Bounding polygon {{570,192},{585,193},{584,200},{570,200}}, Confidence 0.885
217+
Word: "AM", Bounding polygon {{586,193},{593,194},{593,200},{586,200}}, Confidence 0.991
218+
Line: "Aaron Buaion", Bounding polygon {{543,201},{581,201},{581,208},{543,208}}
219+
Word: "Aaron", Bounding polygon {{545,202},{560,202},{559,208},{544,208}}, Confidence 0.602
220+
Word: "Buaion", Bounding polygon {{561,202},{580,202},{579,208},{560,208}}, Confidence 0.291
221+
Line: "Daily SCRUM", Bounding polygon {{537,259},{575,260},{575,266},{537,265}}
222+
Word: "Daily", Bounding polygon {{538,259},{551,260},{550,266},{538,265}}, Confidence 0.175
223+
Word: "SCRUM", Bounding polygon {{552,260},{570,260},{570,266},{551,266}}, Confidence 0.114
224+
Line: "10:00 AM 11:00 AM", Bounding polygon {{536,266},{590,266},{590,272},{536,272}}
225+
Word: "10:00", Bounding polygon {{539,267},{553,267},{552,273},{538,272}}, Confidence 0.857
226+
Word: "AM", Bounding polygon {{554,267},{561,267},{560,273},{553,273}}, Confidence 0.998
227+
Word: "11:00", Bounding polygon {{564,267},{578,267},{577,273},{563,273}}, Confidence 0.479
228+
Word: "AM", Bounding polygon {{579,267},{586,267},{585,273},{578,273}}, Confidence 0.994
229+
Line: "Churlette de Crum", Bounding polygon {{538,273},{584,273},{585,279},{538,279}}
230+
Word: "Churlette", Bounding polygon {{539,274},{562,274},{561,279},{538,279}}, Confidence 0.464
231+
Word: "de", Bounding polygon {{563,274},{569,274},{568,279},{562,279}}, Confidence 0.81
232+
Word: "Crum", Bounding polygon {{570,274},{582,273},{581,279},{569,279}}, Confidence 0.885
233+
Line: "Quarterly NI Hands", Bounding polygon {{538,295},{588,295},{588,301},{538,302}}
234+
Word: "Quarterly", Bounding polygon {{540,296},{562,296},{562,302},{539,302}}, Confidence 0.523
235+
Word: "NI", Bounding polygon {{563,296},{570,296},{570,302},{563,302}}, Confidence 0.303
236+
Word: "Hands", Bounding polygon {{572,296},{588,296},{588,302},{571,302}}, Confidence 0.613
237+
Line: "11.00 AM-12:00 PM", Bounding polygon {{536,304},{588,303},{588,309},{536,310}}
238+
Word: "11.00", Bounding polygon {{538,304},{552,304},{552,310},{538,310}}, Confidence 0.618
239+
Word: "AM-12:00", Bounding polygon {{554,304},{578,304},{577,310},{553,310}}, Confidence 0.27
240+
Word: "PM", Bounding polygon {{579,304},{586,304},{586,309},{578,310}}, Confidence 0.662
241+
Line: "Bebek Shaman", Bounding polygon {{538,310},{577,310},{577,316},{538,316}}
242+
Word: "Bebek", Bounding polygon {{539,310},{554,310},{554,317},{539,316}}, Confidence 0.611
243+
Word: "Shaman", Bounding polygon {{555,310},{576,311},{576,317},{555,317}}, Confidence 0.605
244+
Line: "Weekly stand up", Bounding polygon {{537,332},{582,333},{582,339},{537,338}}
245+
Word: "Weekly", Bounding polygon {{538,332},{557,333},{556,339},{538,338}}, Confidence 0.606
246+
Word: "stand", Bounding polygon {{558,333},{572,334},{571,340},{557,339}}, Confidence 0.489
247+
Word: "up", Bounding polygon {{574,334},{580,334},{580,340},{573,340}}, Confidence 0.815
248+
Line: "12:00 PM-1:00 PM", Bounding polygon {{537,340},{583,340},{583,347},{536,346}}
249+
Word: "12:00", Bounding polygon {{539,341},{553,341},{552,347},{538,347}}, Confidence 0.826
250+
Word: "PM-1:00", Bounding polygon {{554,341},{575,341},{574,347},{553,347}}, Confidence 0.209
251+
Word: "PM", Bounding polygon {{576,341},{583,341},{582,347},{575,347}}, Confidence 0.039
252+
Line: "Delle Marckre", Bounding polygon {{538,347},{582,347},{582,352},{538,353}}
253+
Word: "Delle", Bounding polygon {{540,348},{559,347},{558,353},{539,353}}, Confidence 0.58
254+
Word: "Marckre", Bounding polygon {{560,347},{582,348},{582,353},{559,353}}, Confidence 0.275
255+
Line: "Product review", Bounding polygon {{538,370},{577,370},{577,376},{538,375}}
256+
Word: "Product", Bounding polygon {{539,370},{559,371},{558,376},{539,376}}, Confidence 0.615
257+
Word: "review", Bounding polygon {{560,371},{576,371},{575,376},{559,376}}, Confidence 0.04
243258
```
244259

245260
> [!div class="nextstepaction"]

0 commit comments

Comments
 (0)