List of usage examples for com.amazonaws.services.rekognition.model CompareFacesResult getFaceMatches
public java.util.List<CompareFacesMatch> getFaceMatches()
An array of faces in the target image that match the source image face.
From source file:mx.iteso.desi.cloud.hw3.AWSFaceCompare.java
License:Apache License
private Face compare(String sourceKey, String targetKey) { Image source = getImageUtil(sourceKey); Image target = getImageUtil(targetKey); CompareFacesResult compareFacesResult = callCompareFaces(source, target, AWSFaceCompare.SIMILARITY_THRESHOLD); if (compareFacesResult.getFaceMatches().size() > 0) { return new Face(targetKey, compareFacesResult.getFaceMatches().get(0).getSimilarity()); } else {//from ww w . j av a2s . com return new Face("", 0.0f); } }