#include <CscDetectorEngineMultiple.h>
Public Member Functions | |
| CscDetectorEngineMultiple (const string &name, const vector< CscDetectorEngine * > &detectors={}, bool drawPredictionOnImage=false) | |
| ptr< DetectionResult > | detectOnImage (const DetectorSourceImage &image, ptr< DetectionParameters > parameters) override |
| void | addDetector (CscDetectorEngine *detector, DetectorIsEnabledFunction shouldEnable=alwaysEnableDetector) |
| bool | addDetectorIfNew (CscDetectorEngine *detector, DetectorIsEnabledFunction shouldEnable=alwaysEnableDetector) |
| void | enableDuplicateDeletion (float iouThreshold) |
| void | setDrawPredictionOnImage (bool drawPredictionOnImage) |
| virtual bool | equals (CscDetectorEngine *) const override |
Public Member Functions inherited from conscience_core::detector_engine::CscDetectorEngine | |
| void | drawTarget (cv::Mat &image, float x, float y) |
| virtual | ~CscDetectorEngine ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from conscience_core::detector_engine::CscDetectorEngine | |
| CscDetectorEngine () | |
| void | shiftDetectedObjectsForLense (const vector< CscWorldObject * > &resultObjList, const LenseParameter *lense) const |
| void | safeAddRectangle (vector< CscRect2d > &rectangles, CscRect2d &rectangle, cv::Mat &image) |
Static Protected Member Functions inherited from conscience_core::detector_engine::CscDetectorEngine | |
| static void | drawDetectedObjectBox (cv::Mat &frame, const CscRect2d &boxRectangle, float estimatedDistanceMeter, float certitude, const string &objectName, const Vec3 &color=Vec3(255, 178, 50)) |
This detector is a composite of detectors. It groups multiple detectors in a sequence. Every detector in the sequence will be called for each detection pass (detectOnImage), one after another if enabled. Indeed a detector can be disabled in a sequence for a given detection pass, depending on the current detection results (for instance, enable a detector only if a person has been detected by a previous detector in the sequence). To enable/disable a detector for a pass, you can give an activation function coming with the detector to addDetector(detector, activationFunction)
Detection results returned by each detecor is accumulated in a metged result which this multipleDetector will return. NOTE: results can be deduplicated based on modelId and rectangles intersection, please see enableDuplicateDeletion(..)
| conscience_core::detector_engine::CscDetectorEngineMultiple::CscDetectorEngineMultiple | ( | const string & | name, |
| const vector< CscDetectorEngine * > & | detectors = {}, |
||
| bool | drawPredictionOnImage = false |
||
| ) |
|
inline |
Adds the given detector to this detectors sequence. shouldEnable is an activation function which will be called for each detection pass to know if detector should be called or not.
| bool conscience_core::detector_engine::CscDetectorEngineMultiple::addDetectorIfNew | ( | CscDetectorEngine * | detector, |
| DetectorIsEnabledFunction | shouldEnable = alwaysEnableDetector |
||
| ) |
return false if detector was not added because it's already present
|
overridevirtual |
|
inline |
If this method is called, this detector will try to remove duplicate in detections from underlying detectors, using objectModelId, inclusion, and IoU ratio
|
overridevirtual |
|
inline |