Search in sources :

Example 1 with Video

use of com.amazonaws.services.rekognition.model.Video in project aws-doc-sdk-examples by awsdocs.

the class VideoDetect method StartFaceSearchCollection.

// Started face collection search in a video by calling StartFaceSearch.
// bucket is the S3 bucket that contains the video.
// video is the video filename.
// Change CollectionId to the ID of the collection that you want to search
private static void StartFaceSearchCollection(String bucket, String video) throws Exception {
    StartFaceSearchRequest req = new StartFaceSearchRequest().withCollectionId("CollectionId").withVideo(new Video().withS3Object(new S3Object().withBucket(bucket).withName(video))).withNotificationChannel(channel);
    StartFaceSearchResult startPersonCollectionSearchResult = rek.startFaceSearch(req);
    startJobId = startPersonCollectionSearchResult.getJobId();
}
Also used : StartFaceSearchResult(com.amazonaws.services.rekognition.model.StartFaceSearchResult) Video(com.amazonaws.services.rekognition.model.Video) StartFaceSearchRequest(com.amazonaws.services.rekognition.model.StartFaceSearchRequest) S3Object(com.amazonaws.services.rekognition.model.S3Object)

Example 2 with Video

use of com.amazonaws.services.rekognition.model.Video in project aws-doc-sdk-examples by awsdocs.

the class VideoDetect method StartModerationLabels.

// Starts the moderation of content in a video by calling StartContentModeration.
// bucket is the S3 bucket that contains the video.
// video is the video filename.
// ==================================================================
private static void StartModerationLabels(String bucket, String video) throws Exception {
    StartContentModerationRequest req = new StartContentModerationRequest().withVideo(new Video().withS3Object(new S3Object().withBucket(bucket).withName(video))).withNotificationChannel(channel);
    StartContentModerationResult startModerationLabelDetectionResult = rek.startContentModeration(req);
    startJobId = startModerationLabelDetectionResult.getJobId();
}
Also used : StartContentModerationRequest(com.amazonaws.services.rekognition.model.StartContentModerationRequest) Video(com.amazonaws.services.rekognition.model.Video) StartContentModerationResult(com.amazonaws.services.rekognition.model.StartContentModerationResult) S3Object(com.amazonaws.services.rekognition.model.S3Object)

Example 3 with Video

use of com.amazonaws.services.rekognition.model.Video in project aws-doc-sdk-examples by awsdocs.

the class VideoDetect method StartCelebrities.

// Starts the detection of celebrities in a video by calling StartCelebrityRecognition.
// bucket is the S3 bucket that contains the video.
// video is the video filename.
private static void StartCelebrities(String bucket, String video) throws Exception {
    StartCelebrityRecognitionRequest req = new StartCelebrityRecognitionRequest().withVideo(new Video().withS3Object(new S3Object().withBucket(bucket).withName(video))).withNotificationChannel(channel);
    StartCelebrityRecognitionResult startCelebrityRecognitionResult = rek.startCelebrityRecognition(req);
    startJobId = startCelebrityRecognitionResult.getJobId();
}
Also used : Video(com.amazonaws.services.rekognition.model.Video) S3Object(com.amazonaws.services.rekognition.model.S3Object) StartCelebrityRecognitionRequest(com.amazonaws.services.rekognition.model.StartCelebrityRecognitionRequest) StartCelebrityRecognitionResult(com.amazonaws.services.rekognition.model.StartCelebrityRecognitionResult)

Example 4 with Video

use of com.amazonaws.services.rekognition.model.Video in project aws-doc-sdk-examples by awsdocs.

the class VideoDetect method StartFaces.

// Starts face detection in a stored video by calling StartFaceDetection.
// bucket is the S3 bucket that contains the video.
// video is the video filename.
private static void StartFaces(String bucket, String video) throws Exception {
    StartFaceDetectionRequest req = new StartFaceDetectionRequest().withVideo(new Video().withS3Object(new S3Object().withBucket(bucket).withName(video))).withNotificationChannel(channel);
    StartFaceDetectionResult startLabelDetectionResult = rek.startFaceDetection(req);
    startJobId = startLabelDetectionResult.getJobId();
}
Also used : StartFaceDetectionRequest(com.amazonaws.services.rekognition.model.StartFaceDetectionRequest) Video(com.amazonaws.services.rekognition.model.Video) S3Object(com.amazonaws.services.rekognition.model.S3Object) StartFaceDetectionResult(com.amazonaws.services.rekognition.model.StartFaceDetectionResult)

Example 5 with Video

use of com.amazonaws.services.rekognition.model.Video in project aws-doc-sdk-examples by awsdocs.

the class VideoDetect method StartPersons.

// Starts the tracking of people in a video by calling StartPersonTracking
// bucket is the S3 bucket that contains the video.
// video is the video filename.
private static void StartPersons(String bucket, String video) throws Exception {
    int maxResults = 10;
    String paginationToken = null;
    StartPersonTrackingRequest req = new StartPersonTrackingRequest().withVideo(new Video().withS3Object(new S3Object().withBucket(bucket).withName(video))).withNotificationChannel(channel);
    StartPersonTrackingResult startPersonDetectionResult = rek.startPersonTracking(req);
    startJobId = startPersonDetectionResult.getJobId();
}
Also used : Video(com.amazonaws.services.rekognition.model.Video) StartPersonTrackingRequest(com.amazonaws.services.rekognition.model.StartPersonTrackingRequest) S3Object(com.amazonaws.services.rekognition.model.S3Object) StartPersonTrackingResult(com.amazonaws.services.rekognition.model.StartPersonTrackingResult)

Aggregations

S3Object (com.amazonaws.services.rekognition.model.S3Object)6 Video (com.amazonaws.services.rekognition.model.Video)6 StartCelebrityRecognitionRequest (com.amazonaws.services.rekognition.model.StartCelebrityRecognitionRequest)1 StartCelebrityRecognitionResult (com.amazonaws.services.rekognition.model.StartCelebrityRecognitionResult)1 StartContentModerationRequest (com.amazonaws.services.rekognition.model.StartContentModerationRequest)1 StartContentModerationResult (com.amazonaws.services.rekognition.model.StartContentModerationResult)1 StartFaceDetectionRequest (com.amazonaws.services.rekognition.model.StartFaceDetectionRequest)1 StartFaceDetectionResult (com.amazonaws.services.rekognition.model.StartFaceDetectionResult)1 StartFaceSearchRequest (com.amazonaws.services.rekognition.model.StartFaceSearchRequest)1 StartFaceSearchResult (com.amazonaws.services.rekognition.model.StartFaceSearchResult)1 StartLabelDetectionRequest (com.amazonaws.services.rekognition.model.StartLabelDetectionRequest)1 StartLabelDetectionResult (com.amazonaws.services.rekognition.model.StartLabelDetectionResult)1 StartPersonTrackingRequest (com.amazonaws.services.rekognition.model.StartPersonTrackingRequest)1 StartPersonTrackingResult (com.amazonaws.services.rekognition.model.StartPersonTrackingResult)1