Package org.photonvision.vision.objects
Class NullModel
java.lang.Object
org.photonvision.vision.objects.NullModel
- All Implemented Interfaces:
Model
,ObjectDetector
,Releasable
A 'null' implementation of the
Model
and ObjectDetector
interfaces. This is used
when no model is available to load.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondetect
(org.opencv.core.Mat in, double nmsThresh, double boxThresh) Detects objects in the given input image.Returns the classes that the detector can detectstatic NullModel
getModel()
Returns the model that created this ObjectDetector.getName()
load()
void
release()
-
Field Details
-
INSTANCE
-
-
Method Details
-
getInstance
-
load
-
getName
-
release
public void release()- Specified by:
release
in interfaceReleasable
-
getModel
Description copied from interface:ObjectDetector
Returns the model that created this ObjectDetector.- Specified by:
getModel
in interfaceObjectDetector
-
getClasses
Description copied from interface:ObjectDetector
Returns the classes that the detector can detect- Specified by:
getClasses
in interfaceObjectDetector
- Returns:
- The classes
-
detect
public List<NeuralNetworkPipeResult> detect(org.opencv.core.Mat in, double nmsThresh, double boxThresh) Description copied from interface:ObjectDetector
Detects objects in the given input image. Preprocessing and postprocessing steps should be embedded into this call.- Specified by:
detect
in interfaceObjectDetector
- Parameters:
in
- The input image to perform object detection on.nmsThresh
- The threshold value for non-maximum suppression.boxThresh
- The threshold value for bounding box detection.- Returns:
- A list of NeuralNetworkPipeResult objects representing the detected objects. Returns an empty list if the detector is not initialized or if no objects are detected.
-