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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]apply(byte[] imageBytes, List<ObjectDetection> objectDetections) booleanvoidsetAgnosticColors(boolean agnosticColors) voidsetImageFormat(String imageFormat) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
DEFAULT_IMAGE_FORMAT
Make checkstyle happy.- See Also:
-
-
Constructor Details
-
ObjectDetectionImageAugmenter
public ObjectDetectionImageAugmenter() -
ObjectDetectionImageAugmenter
public ObjectDetectionImageAugmenter(boolean withMask)
-
-
Method Details
-
isAgnosticColors
public boolean isAgnosticColors() -
setAgnosticColors
public void setAgnosticColors(boolean agnosticColors) -
getImageFormat
-
setImageFormat
-
apply
- Specified by:
applyin interfaceBiFunction<byte[],List<ObjectDetection>, byte[]>
-