14 #ifndef ECVL_ARITHMETIC_H_ 15 #define ECVL_ARITHMETIC_H_ 17 #include <type_traits> 28 #define BINARY_ARITHMETIC_OPERATION_IMAGE_IMAGE(Function) \ 29 inline void Function(const Image& src1, const Image& src2, Image& dst, DataType dst_type = DataType::none, bool saturate = true) \ 31 src1.hal_->Function(src1, src2, dst, dst_type, saturate); \ 34 #define BINARY_ARITHMETIC_OPERATION_IMAGE_SCALAR(Function) \ 35 template<typename ST2> \ 36 void Function(const Image& src1, const ST2& src2, Image& dst, DataType dst_type = DataType::none, bool saturate = true) \ 38 src1.hal_->Function(src1, src2, dst, dst_type, saturate); \ 41 #define BINARY_ARITHMETIC_OPERATION_SCALAR_IMAGE(Function) \ 42 template<typename ST1> \ 43 void Function(const ST1& src1, const Image& src2, Image& dst, DataType dst_type = DataType::none, bool saturate = true) \ 45 src2.hal_->Function(src1, src2, dst, dst_type, saturate); \ 147 src.hal_->Neg(src, dst, dst_type, saturate);
152 #endif // !ECVL_ARITHMETIC_H_
void Mul(const Image &src1, const Image &src2, Image &dst, DataType dst_type=DataType::none, bool saturate=true)
#define BINARY_ARITHMETIC_OPERATION_IMAGE_IMAGE(Function)
DataType
DataType is an enum class which defines data types allowed for images.
#define BINARY_ARITHMETIC_OPERATION_SCALAR_IMAGE(Function)
void Add(const Image &src1, const Image &src2, Image &dst, DataType dst_type=DataType::none, bool saturate=true)
Adds two source Images storing the result into a destination Image.
void Sub(const Image &src1, const Image &src2, Image &dst, DataType dst_type=DataType::none, bool saturate=true)
#define BINARY_ARITHMETIC_OPERATION_IMAGE_SCALAR(Function)
void Neg(const Image &src, Image &dst, DataType dst_type=DataType::none, bool saturate=true)
Negation of an Image.
void Div(const Image &src1, const Image &src2, Image &dst, DataType dst_type=DataType::none, bool saturate=true)