30namespace trafficlight {
67 virtual std::string
Name()
const = 0;
80 std::vector<base::TrafficLightPtr>* lights) = 0;
91 const std::string& camera_name) = 0;
105 const std::string& camera_name,
106 std::vector<base::TrafficLightPtr>* lights) = 0;
116 bool is_working) = 0;
126 bool* is_working)
const = 0;
140#define PERCEPTION_REGISTER_TLPREPROCESSOR(name) \
141 PERCEPTION_REGISTER_CLASS(BaseTLPreprocessor, name)
virtual bool Init(const TrafficLightPreprocessorInitOptions &options)=0
Traffic light preprocessing initialization parameters.
virtual std::string Name() const =0
returns the name of the preprocessing plugin.
virtual bool SetCameraWorkingFlag(const std::string &camera_name, bool is_working)=0
Set the camera working flag object.
BaseTLPreprocessor()=default
Construct a new base trafficlight preprocessor object.
virtual bool UpdateLightsProjection(const camera::CarPose &pose, const TLPreprocessorOption &option, const std::string &camera_name, std::vector< base::TrafficLightPtr > *lights)=0
Update the traffic light projection status and determine whether the projection exceeds the boundary ...
virtual bool UpdateCameraSelection(const camera::CarPose &pose, const TLPreprocessorOption &option, std::vector< base::TrafficLightPtr > *lights)=0
Select the appropriate camera for preprocessing according to the position of the vehicle and the posi...
virtual const std::vector< std::string > & GetCameraNamesByDescendingFocalLen() const =0
Get the camera names by descending focal len object.
virtual ~BaseTLPreprocessor()=default
Destroy the base trafficlight preprocessor object.
virtual bool SyncInformation(const double ts, const std::string &camera_name)=0
Determine whether the selected camera is available and synchronize timestamp information.
virtual bool GetCameraWorkingFlag(const std::string &camera_name, bool *is_working) const =0
Get the camera working flag object.
#define DISALLOW_COPY_AND_ASSIGN(classname)
#define PERCEPTION_REGISTER_REGISTERER(base_class)
std::map< std::string, int > * image_borders_size
float sync_interval_seconds
std::vector< std::string > camera_names