- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Dictionary d =
new Hashtable()
Bundle bundle;bundle.getHeaders()
new Properties()
- Smart code suggestions by Codota
}
/** * Saves the image to the disk and launches the default viewer for images. * * @param file - the file where the image will be saved * @return this */ @NotNull public ImageOverlayBuilder toDiskAndLaunchViewer(@NotNull File file) { toDisk(file); try { Desktop.getDesktop().open(file); Utils.waitFor(3, TimeUnit.SECONDS); } catch (IOException e) { throw new CognitiveException("Could not open image", e); } return this; }
public static void main(String[] args) throws IOException { FaceScenarios faceScenarios = new FaceScenarios(getProperty("azure.cognitive.subscriptionKey"), getProperty("azure.cognitive.emotion.subscriptionKey")); ImageOverlayBuilder imageOverlayBuilder = ImageOverlayBuilder.builder(IMAGE); List<ImageHolder> candidates = candidates(); People people = ScenarioHelper. createPeopleFromHoldingImages(candidates, ImageNamingStrategy.DEFAULT); String groupId = faceScenarios. createGroupWithPeople(randomAlphabetic(6).toLowerCase(), people); Utils.waitFor(10, TimeUnit.SECONDS); //let the training be completed java.util.List<IdentificationSet> identificationSets = faceScenarios.identifyPersonsInGroup(groupId, IMAGE); imageOverlayBuilder.identify(identificationSets); buildGrid(imageOverlayBuilder, people); imageOverlayBuilder.launchViewer().toClipboard(); faceScenarios.deleteGroup(groupId); }