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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
apply
(byte[] imageBytes, List<ObjectDetection> objectDetections) boolean
void
setAgnosticColors
(boolean agnosticColors) void
setImageFormat
(String imageFormat) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
apply
in interfaceBiFunction<byte[],
List<ObjectDetection>, byte[]>
-