Skip to content

Commit c61915a

Browse files
authored
Clarified a method functionality
1 parent 02ab184 commit c61915a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Vision/ComputerVision/src/main/java/ComputerVisionQuickstart.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static void main(String[] args) {
8181
DetectDomainSpecificContentInImage(computerVisionClient, localImagePath, remoteImageURL);
8282
DetectImageTypesInImage(computerVisionClient, localImagePath, remoteImageURL);
8383

84-
// Analyze local and remote text-image for recognizing text with OCR
84+
// Analyze local and remote text-image for recognizing printed text with OCR
8585
RecognizeTextOCR(computerVisionClient, localTextImagePath, remoteTextImageURL);
8686
}
8787

@@ -528,24 +528,24 @@ public static void DetectImageTypesInImage(ComputerVisionClient client, String l
528528
// END - Detect Image Type
529529

530530
/**
531-
* RECOGNIZE TEXT:
532-
* Displays text found in image with angle and orientation of the block of text.
531+
* RECOGNIZE PRINTED TEXT:
532+
* Displays text found in image of printed text with angle and orientation of the block of text.
533533
*/
534534
private static void RecognizeTextOCR(ComputerVisionClient client, String localTextImagePath, String remoteTextImageURL){
535535
System.out.println("-----------------------------------------------");
536-
System.out.println("RECOGNIZE TEXT");
536+
System.out.println("RECOGNIZE PRINTED TEXT");
537537
try {
538538
File rawImage = new File(localTextImagePath);
539539
byte[] localImageBytes = Files.readAllBytes(rawImage.toPath());
540540

541-
// Recognize text in local image
541+
// Recognize printed text in local image
542542
OcrResult ocrResultLocal = client.computerVision().recognizePrintedTextInStream()
543543
.withDetectOrientation(true)
544544
.withImage(localImageBytes)
545545
.withLanguage(OcrLanguages.EN)
546546
.execute();
547547

548-
// Recognize text in remote image
548+
// Recognize printed text in remote image
549549
OcrResult ocrResultRemote = client.computerVision().recognizePrintedText()
550550
.withDetectOrientation(true)
551551
.withUrl(remoteTextImageURL)
@@ -588,7 +588,7 @@ private static void RecognizeTextOCR(ComputerVisionClient client, String localTe
588588
System.out.println(e.getMessage());
589589
e.printStackTrace();
590590
}
591-
// END - Recognize Text
591+
// END - Recognize Printed Text
592592
System.out.println();
593593
System.out.println("-----------------------------------------------");
594594
System.out.println("End of quickstart.");

0 commit comments

Comments
 (0)