|
1 | 1 | ---
|
2 |
| -title: "Quickstart: Computer Vision 2.0 and 2.1 - Extract printed and handwritten text - REST, Java" |
| 2 | +title: "Quickstart: Computer Vision 2.1 and 3.0 - Extract printed and handwritten text - REST, Java" |
3 | 3 | titleSuffix: "Azure Cognitive Services"
|
4 | 4 | description: In this quickstart, you extract printed and handwritten text from an image using the Computer Vision API with Java.
|
5 | 5 | services: cognitive-services
|
@@ -80,14 +80,10 @@ To create and run the sample, do the following steps:
|
80 | 80 |
|
81 | 81 | ```java
|
82 | 82 | public class Main {
|
83 |
| - // ********************************************** |
84 |
| - // *** Update or verify the following values. *** |
85 |
| - // ********************************************** |
86 |
| - |
87 | 83 | // Add your Computer Vision subscription key and endpoint to your environment variables.
|
88 | 84 | // After setting, close and then re-open your command shell or project for the changes to take effect.
|
89 |
| - String subscriptionKey = System.getenv("COMPUTER_VISION_SUBSCRIPTION_KEY"); |
90 |
| - String endpoint = ("COMPUTER_VISION_ENDPOINT"); |
| 85 | + private static String subscriptionKey = System.getenv("COMPUTER_VISION_SUBSCRIPTION_KEY"); |
| 86 | + private static String endpoint = System.getenv("COMPUTER_VISION_ENDPOINT"); |
91 | 87 |
|
92 | 88 | private static final String uriBase = endpoint +
|
93 | 89 | "vision/v2.1/read/core/asyncBatchAnalyze";
|
@@ -224,20 +220,17 @@ To create and run the sample, do the following steps:
|
224 | 220 | ```java
|
225 | 221 |
|
226 | 222 | public class Main {
|
227 |
| - // ********************************************** |
228 |
| - // *** Update or verify the following values. *** |
229 |
| - // ********************************************** |
230 | 223 |
|
231 | 224 | // Add your Computer Vision subscription key and endpoint to your environment variables.
|
232 | 225 | // After setting, close and then re-open your command shell or project for the changes to take effect.
|
233 | 226 | private static String subscriptionKey = System.getenv("COMPUTER_VISION_SUBSCRIPTION_KEY");
|
234 | 227 | private static String endpoint = System.getenv("COMPUTER_VISION_ENDPOINT");
|
235 | 228 |
|
236 | 229 | // Set the language that you want to recognize
|
237 |
| - private static String language = "en"; // Accepted values are "en" for English, or "es" for Spanish |
| 230 | + // Accepted values are "en" for English, or "es" for Spanish |
| 231 | + private static String language = "en"; |
238 | 232 |
|
239 |
| - private static String uriBase = endpoint + |
240 |
| - "/vision/v3.0-preview/read/analyze"; |
| 233 | + private static String uriBase = endpoint + "/vision/v3.0-preview/read/analyze"; |
241 | 234 |
|
242 | 235 | private static String imageToAnalyze =
|
243 | 236 | "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/" +
|
|
0 commit comments