Search in sources :

Example 1 with StartTextDetectionResponse

use of software.amazon.awssdk.services.rekognition.model.StartTextDetectionResponse in project aws-doc-sdk-examples by awsdocs.

the class VideoDetectText method startTextLabels.

// snippet-start:[rekognition.java2.recognize_video_text.main]
public static void startTextLabels(RekognitionClient rekClient, NotificationChannel channel, String bucket, String video) {
    try {
        S3Object s3Obj = S3Object.builder().bucket(bucket).name(video).build();
        Video vidOb = Video.builder().s3Object(s3Obj).build();
        StartTextDetectionRequest labelDetectionRequest = StartTextDetectionRequest.builder().jobTag("DetectingLabels").notificationChannel(channel).video(vidOb).build();
        StartTextDetectionResponse labelDetectionResponse = rekClient.startTextDetection(labelDetectionRequest);
        startJobId = labelDetectionResponse.jobId();
    } catch (RekognitionException e) {
        System.out.println(e.getMessage());
        System.exit(1);
    }
}
Also used : StartTextDetectionRequest(software.amazon.awssdk.services.rekognition.model.StartTextDetectionRequest) StartTextDetectionResponse(software.amazon.awssdk.services.rekognition.model.StartTextDetectionResponse) RekognitionException(software.amazon.awssdk.services.rekognition.model.RekognitionException) Video(software.amazon.awssdk.services.rekognition.model.Video) S3Object(software.amazon.awssdk.services.rekognition.model.S3Object)

Aggregations

RekognitionException (software.amazon.awssdk.services.rekognition.model.RekognitionException)1 S3Object (software.amazon.awssdk.services.rekognition.model.S3Object)1 StartTextDetectionRequest (software.amazon.awssdk.services.rekognition.model.StartTextDetectionRequest)1 StartTextDetectionResponse (software.amazon.awssdk.services.rekognition.model.StartTextDetectionResponse)1 Video (software.amazon.awssdk.services.rekognition.model.Video)1