#ifndef VIDEO_TO_AI_HPP #define VIDEO_TO_AI_HPP #define NOMINMAX #include "hailo/hailort.hpp" #include "hailo/vdevice.hpp" #include "hailo/expected.hpp" #include "hailo/hailort_common.hpp" #include "hailo/runtime_statistics.hpp" #include #include #include #include #include #if defined(__unix__) #include #endif //#include #include #include #include #include #include namespace VideoToAI { using hailort::ConfiguredInferModel; using hailort::InferModel; using hailort::VDevice; using hailort::hailort_error; using hailort::AsyncInferCompletionInfo; using hailort::DmaMappedBuffer; using hailort::MemoryView; struct DetectionResult { hailo_bbox_float32_t bbox; int class_id; float confidence; }; std::shared_ptr page_aligned_alloc(size_t size); std::string get_coco_name_from_int(int cls); void letterbox(const cv::Mat& image, cv::Mat& outImage, const cv::Size& newShape = cv::Size(640, 640), const cv::Scalar& color = cv::Scalar(128, 128, 128), bool scaleUp = true); void hailoInference(cv::Mat& yPlane, cv::Mat& uvPlane, ConfiguredInferModel& configured_infer_model, std::shared_ptr& infer_model, VDevice* vdevice, std::vector& detection_results); } #endif // VIDEO_TO_AI_HPP