usecase_config

namespace EPD

A collection of use-case filters, namely for parsing usecase_config.json, Counting and Color-Matching usecaseMode.

Functions

inline void count(std::vector<std::array<int, 4>> &bboxes, std::vector<uint64_t> &classIndices, std::vector<float> &scores, std::vector<cv::Mat> &masks, std::vector<std::string> allClassNames, const std::vector<std::string> countClassNames)

A Mutator function that takes the base inference results from a P3 inference engine and excludes any bounding boxes, classIndices and score element that do not share the label of selected objects-to-be counted.

inline void matchColor(const cv::Mat &img, std::vector<std::array<int, 4>> &bboxes, std::vector<uint64_t> &classIndices, std::vector<float> &scores, std::vector<cv::Mat> &masks, std::vector<std::string> allClassNames, const std::string filepath_to_refcolor)

A Mutator function that takes the base inference results from a P3 inference engine and excludes any bounding boxes, classIndices and score element that is not similar enough to the template color..

inline void activateUseCase(const cv::Mat &img, std::vector<std::array<int, 4>> &bboxes, std::vector<uint64_t> &classIndices, std::vector<float> &scores, std::vector<cv::Mat> &masks, std::vector<std::string> allClassNames, const unsigned int useCaseMode, const std::vector<std::string> countClassNames, const std::string filepath_to_refcolor)

A Mutator function that takes the base inference results from a P3 inference engine and excludes any bounding boxes, classIndices and score element based on a selected use-case filter.

Variables

const unsigned int CLASSIFICATION_MODE = 0
const unsigned int COUNTING_MODE = 1
const unsigned int COLOR_MATCHING_MODE = 2
const unsigned int LOCALISATION_MODE = 3
const unsigned int TRACKING_MODE = 4