Package org.photonvision.vision.objects
Interface ObjectDetector
- All Superinterfaces:
Releasable
- All Known Implementing Classes:
NullModel
,RknnObjectDetector
ObjectDetector lifecycle:
Model
s are discovered byNeuralNetworkModelManager
Model
is selected as a parameter ofObjectDetectionPipe
Model.load()
is called to create a ObjectDetector instancedetect(Mat, double, double)
is called to perform object detectionReleasable.release()
is called to release resources
-
Method Summary
Methods inherited from interface org.photonvision.vision.opencv.Releasable
release
-
Method Details
-
getModel
Model getModel()Returns the model that created this ObjectDetector. -
getClasses
Returns the classes that the detector can detect- Returns:
- The classes
-
detect
Detects objects in the given input image. Preprocessing and postprocessing steps should be embedded into this call.- 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.
-