2017-12-07 42 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));