Search in sources :

Example 26 with RekognitionClient

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();
}
Also used : Region(software.amazon.awssdk.regions.Region) RekognitionClient(software.amazon.awssdk.services.rekognition.RekognitionClient)

Example 27 with RekognitionClient

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();
}
Also used : Region(software.amazon.awssdk.regions.Region) RekognitionClient(software.amazon.awssdk.services.rekognition.RekognitionClient)

Example 28 with RekognitionClient

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();
}
Also used : Region(software.amazon.awssdk.regions.Region) RekognitionClient(software.amazon.awssdk.services.rekognition.RekognitionClient)

Example 29 with RekognitionClient

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();
}
Also used : Region(software.amazon.awssdk.regions.Region) RekognitionClient(software.amazon.awssdk.services.rekognition.RekognitionClient)

Example 30 with RekognitionClient

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();
}
Also used : Region(software.amazon.awssdk.regions.Region) RekognitionClient(software.amazon.awssdk.services.rekognition.RekognitionClient)

Aggregations

RekognitionClient (software.amazon.awssdk.services.rekognition.RekognitionClient)34 Region (software.amazon.awssdk.regions.Region)32 NotificationChannel (software.amazon.awssdk.services.rekognition.model.NotificationChannel)6 S3Client (software.amazon.awssdk.services.s3.S3Client)3 ArrayList (java.util.ArrayList)2 SqsClient (software.amazon.awssdk.services.sqs.SqsClient)2 List (java.util.List)1 SdkBytes (software.amazon.awssdk.core.SdkBytes)1 software.amazon.awssdk.services.rekognition.model (software.amazon.awssdk.services.rekognition.model)1 DetectProtectiveEquipmentRequest (software.amazon.awssdk.services.rekognition.model.DetectProtectiveEquipmentRequest)1 DetectProtectiveEquipmentResponse (software.amazon.awssdk.services.rekognition.model.DetectProtectiveEquipmentResponse)1 EquipmentDetection (software.amazon.awssdk.services.rekognition.model.EquipmentDetection)1 Image (software.amazon.awssdk.services.rekognition.model.Image)1 ProtectiveEquipmentBodyPart (software.amazon.awssdk.services.rekognition.model.ProtectiveEquipmentBodyPart)1 ProtectiveEquipmentPerson (software.amazon.awssdk.services.rekognition.model.ProtectiveEquipmentPerson)1 ProtectiveEquipmentSummarizationAttributes (software.amazon.awssdk.services.rekognition.model.ProtectiveEquipmentSummarizationAttributes)1 RekognitionException (software.amazon.awssdk.services.rekognition.model.RekognitionException)1 S3Object (software.amazon.awssdk.services.rekognition.model.S3Object)1