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.
-
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)