Skip to content

Instantly share code, notes, and snippets.

@jcbribeiro
Last active May 2, 2017 10:08
Show Gist options
  • Select an option

  • Save jcbribeiro/2a3bf214c1b9ec2978d41d7f6d250dc8 to your computer and use it in GitHub Desktop.

Select an option

Save jcbribeiro/2a3bf214c1b9ec2978d41d7f6d250dc8 to your computer and use it in GitHub Desktop.
Addicional image annotation requests to be added to the Cloud Vision Android Sample
// add the features we want
annotateImageRequest.setFeatures(new ArrayList<Feature>() {{
Feature labelDetection = new Feature();
labelDetection.setType("LABEL_DETECTION");
labelDetection.setMaxResults(10);
add(labelDetection);
Feature textDetection = new Feature();
textDetection.setType("TEXT_DETECTION");
textDetection.setMaxResults(10);
add(textDetection);
Feature landmarkDetection = new Feature();
landmarkDetection.setType("LANDMARK_DETECTION");
landmarkDetection.setMaxResults(10);
add(landmarkDetection);
Feature logoDetection = new Feature();
logoDetection.setType("LOGO_DETECTION");
logoDetection.setMaxResults(10);
add(logoDetection);
Feature faceDetection = new Feature();
faceDetection.setType("FACE_DETECTION");
faceDetection.setMaxResults(10);
add(faceDetection);
Feature imageProperties = new Feature();
imageProperties.setType("IMAGE_PROPERTIES");
imageProperties.setMaxResults(10);
add(imageProperties);
Feature webDetection = new Feature();
webDetection.setType("WEB_DETECTION");
webDetection.setMaxResults(10);
add(webDetection);
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment