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/cognitive-services/Computer-vision/QuickStarts/javascript-analyze.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: computer-vision
11
11
ms.topic: quickstart
12
-
ms.date: 12/05/2019
12
+
ms.date: 03/26/2020
13
13
ms.author: pafarley
14
14
ms.custom: seodec18
15
15
---
@@ -21,18 +21,18 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
21
21
22
22
## Prerequisites
23
23
24
-
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Then, [create environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key and service endpoint string, named `COMPUTER_VISION_SUBSCRIPTION_KEY` and `COMPUTER_VISION_ENDPOINT`, respectively.
24
+
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Save your subscription key and endpoint URL to a temporary location.
25
25
26
26
## Create and run the sample
27
27
28
28
To create and run the sample, do the following steps:
29
29
30
-
1.Copy the following code into a text editor.
30
+
1.Create a file called _analyze-image.html_, open it in a text editor, and copy the following code into it.
31
31
1. Optionally, replace the value of the `value` attribute for the `inputImage` control with the URL of a different image that you want to analyze.
32
-
1. Save the code as a file with an `.html` extension. For example, `analyze-image.html`.
33
32
1. Open a browser window.
34
33
1. In the browser, drag and drop the file into the browser window.
35
-
1. When the webpage is displayed in the browser, choose the **Analyze Image** button.
34
+
1. When the webpage is displayed in the browser, paste your subscription key and endpoint URL into the appropriate input boxes.
35
+
1. Select the **Analyze Image** button.
36
36
37
37
```html
38
38
<!DOCTYPE html>
@@ -49,9 +49,8 @@ To create and run the sample, do the following steps:
49
49
// *** Update or verify the following values. ***
50
50
// **********************************************
51
51
52
-
let subscriptionKey =process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
53
-
let endpoint =process.env['COMPUTER_VISION_ENDPOINT']
54
-
if (!subscriptionKey) { thrownewError('Set your environment variables for your subscription key and endpoint.'); }
52
+
var subscriptionKey =document.getElementById("subscriptionKey").value;
53
+
var endpoint =document.getElementById("endpointUrl").value;
55
54
56
55
var uriBase = endpoint +"vision/v2.1/analyze";
57
56
@@ -102,6 +101,13 @@ To create and run the sample, do the following steps:
102
101
<h1>Analyze image:</h1>
103
102
Enter the URL to an image, then click the <strong>Analyze image</strong> button.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Computer-vision/QuickStarts/javascript-hand-text.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: computer-vision
11
11
ms.topic: quickstart
12
-
ms.date: 12/05/2019
12
+
ms.date: 03/26/2020
13
13
ms.author: pafarley
14
14
ms.custom: seodec18
15
15
---
@@ -40,20 +40,20 @@ Compared to Computer Vision 2.0 and 2.1, the Computer Vision 3.0 Public Preview
40
40
41
41
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/ai/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=cognitive-services) before you begin.
42
42
43
-
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Then, [create environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key and service endpoint string, named `COMPUTER_VISION_SUBSCRIPTION_KEY` and `COMPUTER_VISION_ENDPOINT`, respectively.
43
+
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Save your subscription key and endpoint URL to a temporary location.
44
44
45
45
## Create and run the sample
46
46
47
47
#### [Version 2](#tab/version-2)
48
48
49
49
To create and run the sample, do the following steps:
50
50
51
-
1.Copy the following code into a text editor.
51
+
1.Create a file called _get-text.html_, open it in a text editor, and copy the following code into it.
52
52
1. Optionally, replace the value of the `value` attribute for the `inputImage` control with the URL of a different image from which you want to extract text.
53
-
1. Save the code as a file with an `.html` extension. For example, `get-text.html`.
54
53
1. Open a browser window.
55
54
1. In the browser, drag and drop the file into the browser window.
56
-
1. When the webpage is displayed in the browser, choose the **Read image** button.
55
+
1. When the webpage is displayed in the browser, paste your subscription key and endpoint URL into the appropriate input boxes.
56
+
1. Select the **Read image** button.
57
57
58
58
```html
59
59
<!DOCTYPE html>
@@ -70,9 +70,8 @@ To create and run the sample, do the following steps:
70
70
// *** Update or verify the following values. ***
71
71
// **********************************************
72
72
73
-
let subscriptionKey =process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
74
-
let endpoint =process.env['COMPUTER_VISION_ENDPOINT']
75
-
if (!subscriptionKey) { thrownewError('Set your environment variables for your subscription key and endpoint.'); }
73
+
var subscriptionKey =document.getElementById("subscriptionKey").value;
74
+
var endpoint =document.getElementById("endpointUrl").value;
76
75
77
76
var uriBase = endpoint +"vision/v2.1/read/core/asyncBatchAnalyze";
78
77
@@ -166,6 +165,13 @@ To create and run the sample, do the following steps:
Copy file name to clipboardExpand all lines: articles/cognitive-services/Computer-vision/QuickStarts/javascript-print-text.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: computer-vision
11
11
ms.topic: quickstart
12
-
ms.date: 12/05/2019
12
+
ms.date: 03/26/2020
13
13
ms.author: pafarley
14
14
ms.custom: seodec18
15
15
---
@@ -25,18 +25,18 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
25
25
26
26
## Prerequisites
27
27
28
-
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Then, [create environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key and service endpoint string, named `COMPUTER_VISION_SUBSCRIPTION_KEY` and `COMPUTER_VISION_ENDPOINT`, respectively.
28
+
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Save your subscription key and endpoint URL to a temporary location.
29
29
30
30
## Create and run the sample
31
31
32
32
To create and run the sample, do the following steps:
33
33
34
-
1.Copy the following code into a text editor.
34
+
1.Create a file called _get-printed-text.html_, open it in a text editor, and copy the following code into it.
35
35
1. Optionally, replace the value of the `value` attribute for the `inputImage` control with the URL of a different image that you want to analyze.
36
-
1. Save the code as a file with an `.html` extension. For example, `get-printed-text.html`.
37
36
1. Open a browser window.
38
37
1. In the browser, drag and drop the file into the browser window.
39
-
1. When the webpage is displayed in the browser, choose the **Read image** button.
38
+
1. When the webpage is displayed in the browser, paste your subscription key and endpoint URL into the appropriate input boxes.
39
+
1. Select the **Read image** button.
40
40
41
41
```html
42
42
<!DOCTYPE html>
@@ -53,9 +53,8 @@ To create and run the sample, do the following steps:
53
53
// *** Update or verify the following values. ***
54
54
// **********************************************
55
55
56
-
let subscriptionKey =process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
57
-
let endpoint =process.env['COMPUTER_VISION_ENDPOINT']
58
-
if (!subscriptionKey) { thrownewError('Set your environment variables for your subscription key and endpoint.'); }
56
+
var subscriptionKey =document.getElementById("subscriptionKey").value;
57
+
var endpoint =document.getElementById("endpointUrl").value;
59
58
60
59
var uriBase = endpoint +"vision/v2.1/ocr";
61
60
@@ -107,6 +106,13 @@ To create and run the sample, do the following steps:
Copy file name to clipboardExpand all lines: articles/cognitive-services/Computer-vision/QuickStarts/javascript-thumb.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: computer-vision
11
11
ms.topic: quickstart
12
-
ms.date: 12/05/2019
12
+
ms.date: 03/26/2020
13
13
ms.author: pafarley
14
14
ms.custom: seodec18
15
15
---
@@ -21,18 +21,18 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
21
21
22
22
## Prerequisites
23
23
24
-
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Then, [create environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key and service endpoint string, named `COMPUTER_VISION_SUBSCRIPTION_KEY` and `COMPUTER_VISION_ENDPOINT`, respectively.
24
+
You must have a subscription key for Computer Vision. You can get a free trial key from [Try Cognitive Services](https://azure.microsoft.com/try/cognitive-services/?api=computer-vision). Or, follow the instructions in [Create a Cognitive Services account](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) to subscribe to Computer Vision and get your key. Save your subscription key and endpoint URL to a temporary location.
25
25
26
26
## Create and run the sample
27
27
28
28
To create and run the sample, do the following steps:
29
29
30
-
1. Copy the following code into a text editor.
31
-
1. Optionally, replace the value of the `value` attribute for the `inputImage` control with the URL of a different image that you want to analyze.
32
-
1. Save the code as a file with an `.html` extension. For example, `get-thumbnail.html`.
30
+
1. Create a file called _get-thumbnail.html_, open it in a text editor, and copy the following code into it.
31
+
1. Optionally, replace the value of the `value` attribute of the `inputImage` control with the URL of a different image that you want to analyze.
33
32
1. Open a browser window.
34
33
1. In the browser, drag and drop the file into the browser window.
35
-
1. When the webpage is displayed in the browser, choose the **Generate thumbnail** button.
34
+
1. When the webpage is displayed in the browser, paste your subscription key and endpoint URL into the appropriate input boxes.
35
+
1. Finally, select the **Generate thumbnail** button.
36
36
37
37
```html
38
38
<!DOCTYPE html>
@@ -48,9 +48,8 @@ To create and run the sample, do the following steps:
48
48
// *** Update or verify the following values. ***
49
49
// **********************************************
50
50
51
-
let subscriptionKey =process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
52
-
let endpoint =process.env['COMPUTER_VISION_ENDPOINT']
53
-
if (!subscriptionKey) { thrownewError('Set your environment variables for your subscription key and endpoint.'); }
51
+
var subscriptionKey =document.getElementById("subscriptionKey").value;
52
+
var endpoint =document.getElementById("endpointUrl").value;
54
53
55
54
var uriBase = endpoint +"vision/v2.1/generateThumbnail";
56
55
@@ -118,6 +117,13 @@ To create and run the sample, do the following steps:
118
117
Enter the URL to an image to use in creating a thumbnail image,
119
118
then click the <strong>Generate thumbnail</strong> button.
0 commit comments