use of com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults in project java-video-intelligence by googleapis.
the class DetectIT method testTrackObjectsGcs.
@Test
public void testTrackObjectsGcs() throws Exception {
VideoAnnotationResults result = TrackObjects.trackObjectsGcs(LABEL_GCS_LOCATION);
String got = bout.toString();
assertThat(got).contains("Entity id");
}
use of com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults in project java-video-intelligence by googleapis.
the class DetectIT method testTextDetection.
@Test
public void testTextDetection() throws Exception {
VideoAnnotationResults result = TextDetection.detectText("resources/googlework_short.mp4");
boolean textExists = false;
for (TextAnnotation textAnnotation : result.getTextAnnotationsList()) {
for (String possibleText : POSSIBLE_TEXTS) {
if (textAnnotation.getText().toUpperCase().contains(possibleText.toUpperCase())) {
textExists = true;
break;
}
}
}
assertThat(textExists).isTrue();
}
use of com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults in project java-video-intelligence by googleapis.
the class DetectIT method testTrackObjectsGcs.
@Test
public void testTrackObjectsGcs() throws Exception {
VideoAnnotationResults result = TrackObjects.trackObjectsGcs(LABEL_GCS_LOCATION);
String got = bout.toString();
assertThat(got).contains("Entity id");
}
use of com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults in project java-video-intelligence by googleapis.
the class DetectTextTest method testTextDetection.
@Test
public void testTextDetection() throws Exception {
VideoAnnotationResults result = TextDetection.detectText("resources/googlework_short.mp4");
boolean textExists = false;
for (TextAnnotation textAnnotation : result.getTextAnnotationsList()) {
for (String possibleText : POSSIBLE_TEXTS) {
if (textAnnotation.getText().toUpperCase().contains(possibleText.toUpperCase())) {
textExists = true;
break;
}
}
}
assertThat(textExists).isTrue();
}
use of com.google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults in project java-video-intelligence by googleapis.
the class DetectTextTest method testTextDetectionGcs.
@Test
public void testTextDetectionGcs() throws Exception {
VideoAnnotationResults result = TextDetection.detectTextGcs(SPEECH_GCS_LOCATION);
boolean textExists = false;
for (TextAnnotation textAnnotation : result.getTextAnnotationsList()) {
for (String possibleText : POSSIBLE_TEXTS) {
if (textAnnotation.getText().toUpperCase().contains(possibleText.toUpperCase())) {
textExists = true;
break;
}
}
}
assertThat(textExists).isTrue();
}
Aggregations