use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class DetectText method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + " <sourceImage>\n\n" + "Where:\n" + " sourceImage - the path to the image that contains text (for example, C:\\AWS\\pic1.png). \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String sourceImage = args[0];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
detectTextLabels(rekClient, sourceImage);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class ListCollections method main.
public static void main(String[] args) {
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
System.out.println("Listing collections");
listAllCollections(rekClient);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class RotateImage method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + " <sourceImage>\n\n" + "Where:\n" + " sourceImage - the path to the image (for example, C:\\AWS\\pic1.png). \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String sourceImage = args[0];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
System.out.println("Locating celebrities in " + sourceImage);
recognizeAllCelebrities(rekClient, sourceImage);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class SearchFaceMatchingImageCollection method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + " <collectionId> <sourceImage>\n\n" + "Where:\n" + " collectionId - the id of the collection. \n" + " sourceImage - the path to the image (for example, C:\\AWS\\pic1.png). \n\n";
if (args.length != 2) {
System.out.println(USAGE);
System.exit(1);
}
String collectionId = args[0];
String sourceImage = args[1];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
System.out.println("Searching for a face in a collections");
searchFaceInCollection(rekClient, collectionId, sourceImage);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class DescribeCollection method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + " <collectionName>\n\n" + "Where:\n" + " collectionName - the name of the Amazon Rekognition collection. \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String collectionName = args[0];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
describeColl(rekClient, collectionName);
rekClient.close();
}
Aggregations