2017-12-07 21 views
1

// Base64では、あるべきImageContextに言語ヒントを追加する方法のJPEG設定する方法setLanguageHints

base64EncodedImage.encodeContent(imageBytes); 
annotateImageRequest.setImage(base64EncodedImage); 

        // add the features we want 
        annotateImageRequest.setFeatures(new ArrayList<Feature>() {{ 
         Feature textDetection = new Feature(); 
         textDetection.setType("TEXT_DETECTION"); 
         add(textDetection); 
        }}); 
        ImageContext ImageCon = new ImageContext(); 
        ImageCon.cou("th,us"); 
        annotateImageRequest.setImageContext(ImageCon); 
        // Add the list of one thing} to the request 
        add(annotateImageRequest); 
       }}); 

答えて

0

例をエンコード:

ImageContext imageContext = new ImageContext(); 
String [] languages = { "zh-TW" }; 
imageContext.setLanguageHints(Arrays.asList(languages)); 
関連する問題