6#ifndef ENABLE_WRAPPER_DIM_SAFETY
7#define ENABLE_WRAPPER_DIM_SAFETY true
27 uint8_t
const *primary,
35 uint8_t
const *primary,
45 uint8_t
const *framebuff_3C,
54 uint8_t
const *framebuff_3C,
103#include <opencv2/opencv.hpp>
107 const cv::Mat& src, cv::Mat& dest, uint8_t thresh
109#if ENABLE_WRAPPER_DIM_SAFETY
110 CV_Assert(src.type() == CV_8UC1);
111 CV_Assert(dest.type() == CV_8UC1);
112 CV_Assert(src.size().area() == dest.size().area());
122 const cv::Mat& src, cv::Mat& dest, uint8_t thresh
124#if ENABLE_WRAPPER_DIM_SAFETY
125 CV_Assert(src.type() == CV_8UC1);
126 CV_Assert(dest.type() == CV_8UC1);
127 CV_Assert(src.size().area() == dest.size().area());
137 const cv::Mat& primary,
138 const cv::Mat& comp1,
const cv::Mat& comp2,
139 const cv::Mat& add, cv::Mat& dest
141#if ENABLE_WRAPPER_DIM_SAFETY
142 CV_Assert(primary.type() == CV_8UC1);
143 CV_Assert(comp1.type() == CV_8UC1);
144 CV_Assert(comp2.type() == CV_8UC1);
145 CV_Assert(add.type() == CV_8UC1);
146 CV_Assert(dest.type() == CV_8UC1);
147 CV_Assert(primary.size().area() == comp1.size().area());
148 CV_Assert(primary.size().area() == comp2.size().area());
149 CV_Assert(primary.size().area() == add.size().area());
150 CV_Assert(primary.size().area() == dest.size().area());
158 primary.size().area()
162 const cv::Mat& primary,
163 const cv::Mat& ch1, uint8_t alpha,
164 const cv::Mat& ch2, uint8_t beta,
165 cv::Mat& dest, uint8_t gamma = 0
167#if ENABLE_WRAPPER_DIM_SAFETY
168 CV_Assert(primary.type() == CV_8UC1);
169 CV_Assert(ch1.type() == CV_8UC1);
170 CV_Assert(ch2.type() == CV_8UC1);
171 CV_Assert(dest.type() == CV_8UC1);
172 CV_Assert(primary.size().area() == ch1.size().area());
173 CV_Assert(primary.size().area() == ch2.size().area());
174 CV_Assert(primary.size().area() == dest.size().area());
181 primary.size().area(),
186 const cv::Mat& frame_3C, cv::Mat& dest,
187 vs2::BGR primary, uint8_t alpha = 0xFF, uint8_t beta = 0xFF, uint8_t thresh = 0x7F
189#if ENABLE_WRAPPER_DIM_SAFETY
190 CV_Assert(frame_3C.type() == CV_8UC3);
191 CV_Assert(dest.type() == CV_8UC1);
192 CV_Assert(frame_3C.size().area() == dest.size().area());
197 frame_3C.size().area(),
198 ~primary, alpha, beta, thresh);
201 const cv::Mat& frame_3C, cv::Mat& dest
203#if ENABLE_WRAPPER_DIM_SAFETY
204 CV_Assert(frame_3C.type() == CV_8UC3);
205 CV_Assert(dest.type() == CV_8UC1);
206 CV_Assert(frame_3C.size().area() == dest.size().area());
211 frame_3C.size().area()
216 const cv::Mat& a,
const cv::Mat& b, cv::Mat& dest
218#if ENABLE_WRAPPER_DIM_SAFETY
219 CV_Assert(a.size().area() == b.size().area());
220 CV_Assert(a.size().area() == dest.size().area());
222 if(a.type() == b.type()) {
223#if ENABLE_WRAPPER_DIM_SAFETY
224 CV_Assert(a.type() == dest.type());
230 a.size().area() * a.channels()
232 }
else if(a.type() == CV_8UC3) {
233#if ENABLE_WRAPPER_DIM_SAFETY
234 CV_Assert(b.type() == CV_8UC1);
235 CV_Assert(dest.type() == CV_8UC3);
244#if ENABLE_WRAPPER_DIM_SAFETY
245 CV_Assert(a.type() == CV_8UC1);
246 CV_Assert(b.type() == CV_8UC3);
247 CV_Assert(dest.type() == CV_8UC3);
258 const cv::Mat& a,
const cv::Mat& b, cv::Mat& dest
260#if ENABLE_WRAPPER_DIM_SAFETY
261 CV_Assert(a.size().area() == b.size().area());
262 CV_Assert(a.size().area() == dest.size().area());
264 if(a.type() == CV_8UC3) {
265#if ENABLE_WRAPPER_DIM_SAFETY
266 CV_Assert(dest.type() == CV_8UC3);
268 if(b.type() == CV_8UC3) {
276#if ENABLE_WRAPPER_DIM_SAFETY
277 CV_Assert(b.type() == CV_8UC1);
286 }
else if(b.type() == CV_8UC3) {
287#if ENABLE_WRAPPER_DIM_SAFETY
288 CV_Assert(a.type() == CV_8UC1);
289 CV_Assert(dest.type() == CV_8UC3);
298#if ENABLE_WRAPPER_DIM_SAFETY
299 CV_Assert(a.type() == CV_8UC1);
300 CV_Assert(b.type() == CV_8UC1);
301 CV_Assert(dest.type() == CV_8UC1);
312 const cv::Mat& src,
const cv::Mat& sub, cv::Mat& dest
314#if ENABLE_WRAPPER_DIM_SAFETY
315 CV_Assert(src.type() == CV_8UC1);
316 CV_Assert(sub.type() == CV_8UC1);
317 CV_Assert(dest.type() == dest.type());
318 CV_Assert(src.size().area() == sub.size().area());
319 CV_Assert(src.size().area() == dest.size().area());
void memcpy_bitwise_or_3c_asm(uint8_t const *a_3C, uint8_t const *b, uint8_t *dest_3C, int32_t size)
void memcpy_bitwise_or_asm(uint8_t const *a, uint8_t const *b, uint8_t *dest, int32_t size)
void neon_wst(const cv::Mat &primary, const cv::Mat &ch1, uint8_t alpha, const cv::Mat &ch2, uint8_t beta, cv::Mat &dest, uint8_t gamma=0)
void neon_compare3_add(const cv::Mat &primary, const cv::Mat &comp1, const cv::Mat &comp2, const cv::Mat &add, cv::Mat &dest)
void neon_add(const cv::Mat &a, const cv::Mat &b, cv::Mat &dest)
void neon_threshold_binary(const cv::Mat &src, cv::Mat &dest, uint8_t thresh)
void memcpy_add_asm(uint8_t const *a, uint8_t const *b, uint8_t *dest, int32_t size)
void memcpy_add_3c_asm(uint8_t const *a_3C, uint8_t const *b, uint8_t *dest_3C, int32_t size)
void memcpy_subtract_asm(uint8_t const *base, uint8_t const *sub, uint8_t *dest, int32_t size)
void neon_deinterlace_wstb(const cv::Mat &frame_3C, cv::Mat &dest, vs2::BGR primary, uint8_t alpha=0xFF, uint8_t beta=0xFF, uint8_t thresh=0x7F)
void memcpy_deinterlace_wstb_asm(uint8_t const *framebuff_3C, uint8_t *dest, int32_t size, uint8_t offset, uint8_t alpha, uint8_t beta, uint8_t thresh)
void neon_bitwise_or(const cv::Mat &a, const cv::Mat &b, cv::Mat &dest)
void memcpy_add_3c2_asm(uint8_t const *a_3C, uint8_t const *b, uint8_t *dest_3C, int32_t size)
void neon_threshold(const cv::Mat &src, cv::Mat &dest, uint8_t thresh)
void neon_deinterlace_cvt2gray(const cv::Mat &frame_3C, cv::Mat &dest)
void memcpy_threshold_binary_asm(uint8_t const *src, uint8_t *dest, int32_t size, uint8_t thresh)
void neon_subtract(const cv::Mat &src, const cv::Mat &sub, cv::Mat &dest)
void memcpy_threshold_asm(uint8_t const *src, uint8_t *dest, int32_t size, uint8_t thresh)
void memcpy_wst_asm(uint8_t const *primary, uint8_t const *ch2, uint8_t const *ch3, uint8_t *dest, int32_t size, uint8_t alpha, uint8_t beta, uint8_t gamma)
void memcpy_deinterlace_togray_asm(uint8_t const *framebuff_3C, uint8_t *dest, int32_t size)
void memcpy_compare3_add_asm(uint8_t const *primary, uint8_t const *cmp1, uint8_t const *cmp2, uint8_t const *add, uint8_t *dest, int32_t size)