Class ObjectDetectionImageAugmenter

java.lang.Object
org.springframework.cloud.fn.object.detection.ObjectDetectionImageAugmenter
All Implemented Interfaces:
BiFunction<byte[],List<ObjectDetection>,byte[]>

public class ObjectDetectionImageAugmenter extends Object implements BiFunction<byte[],List<ObjectDetection>,byte[]>
Augment the input image fromMemory detected object bounding boxes and categories. For mask models and withMask set to true it draws the instance segmentation image as well.
Author:
Christian Tzolov
  • Field Details

  • Constructor Details

    • ObjectDetectionImageAugmenter

      public ObjectDetectionImageAugmenter()
    • ObjectDetectionImageAugmenter

      public ObjectDetectionImageAugmenter(boolean withMask)
  • Method Details

    • isAgnosticColors

      public boolean isAgnosticColors()
    • setAgnosticColors

      public void setAgnosticColors(boolean agnosticColors)
    • getImageFormat

      public String getImageFormat()
    • setImageFormat

      public void setImageFormat(String imageFormat)
    • apply

      public byte[] apply(byte[] imageBytes, List<ObjectDetection> objectDetections)
      Specified by:
      apply in interface BiFunction<byte[],List<ObjectDetection>,byte[]>