Ocv Common#

a header file with common samples functionality using OpenCV

Typedefs

using LayoutCondition = std::tuple<size_t, IntervalCondition, std::string>#

Functions

static inline ov::Tensor wrapMat2Tensor(const cv::Mat &mat)#
template<template<class> class Cond, class ...Args>
IntervalCondition makeCond(Args&&... args)#
static inline std::tuple<bool, ov::Layout> makeGuesLayoutFrom4DShape(const ov::PartialShape &shape)#
static inline ov::Layout getLayoutFromShape(const ov::PartialShape &shape)#
static cv::Scalar string2Scalar(const std::string &string)#
static inline cv::Mat wrap_saliency_map_tensor_to_mat(ov::Tensor &t, size_t shape_shift, size_t class_idx)#
struct IntervalCondition#

Public Types

using DimType = size_t#
using IndexType = size_t#
using ConditionChecker = std::function<bool(IndexType, const ov::PartialShape&)>#

Public Functions

template<class Cond>
inline constexpr IntervalCondition(IndexType i1, IndexType i2, Cond c)#
inline bool operator()(IndexType i0, const ov::PartialShape &shape) const#

Private Members

ConditionChecker impl#
class InputTransform#

Public Functions

inline InputTransform()#
inline InputTransform(bool reverseInputChannels, const std::string &meanValues, const std::string &scaleValues)#
inline void setPrecision(ov::preprocess::PrePostProcessor &ppp, const std::string &tensorName)#
inline cv::Mat operator()(const cv::Mat &inputs)#

Private Members

bool reverseInputChannels#
bool isTrivial#
cv::Scalar means#
cv::Scalar stdScales#