You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2021/04/06 13:50:14 UTC
[incubator-streampipes-extensions] 01/12: adaptions to changes in
ObjectDetection
This is an automated email from the ASF dual-hosted git repository.
bossenti pushed a commit to branch STREAMPIPES-320
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
commit e1c550b5a02a8b21a4c49c0f4e876a0345776296
Author: bossenti <bo...@posteo.de>
AuthorDate: Mon Mar 29 09:49:30 2021 +0200
adaptions to changes in ObjectDetection
---
.../imageprocessing/jvm/processor/imagecropper/ImageCropper.java | 3 ++-
.../jvm/processor/imagecropper/ImageCropperController.java | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropper.java b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropper.java
index 8390326..d3a20d7 100644
--- a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropper.java
+++ b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropper.java
@@ -58,8 +58,9 @@ public class ImageCropper implements EventProcessor<ImageCropperParameters> {
if (finalImage.isPresent()) {
Event outEvent = new Event();
+ outEvent.addField("timestamp", Long.toString(in.getFieldByRuntimeName("timestamp").getAsPrimitive().getAsLong()));
outEvent.addField("image", Base64.getEncoder().encodeToString(finalImage.get()));
- outEvent.addField("classesindex", box.get("classesindex"));
+ outEvent.addField("classname", box.get("classname"));
outEvent.addField("score", box.get("score"));
out.collect(outEvent);
}
diff --git a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperController.java b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperController.java
index 80fdc1d..604a0aa 100644
--- a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperController.java
+++ b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperController.java
@@ -45,7 +45,7 @@ public class ImageCropperController extends StandaloneEventProcessingDeclarer<Im
.category(DataProcessorType.FILTER)
.requiredStream(RequiredBoxStream.getBoxStream())
.outputStrategy(OutputStrategies.append(
- EpProperties.integerEp(Labels.empty(), "classesindex", "https://streampipes.org/Label"),
+ EpProperties.integerEp(Labels.empty(), "classname", "https://streampipes.org/classname"),
EpProperties.doubleEp(Labels.empty(), "score", "https://streampipes.org/Label")
))
.build();