EstervQrCode 2.0.0
Library for qr code manipulation
Loading...
Searching...
No Matches
dispatch_helper.impl.hpp
1// This file is part of OpenCV project.
2// It is subject to the license terms in the LICENSE file found in the top-level directory
3// of this distribution and at http://opencv.org/license.html.
4
5#ifndef OPENCV_CORE_DETAIL_DISPATCH_HELPER_IMPL_HPP
6#define OPENCV_CORE_DETAIL_DISPATCH_HELPER_IMPL_HPP
7
9
10namespace cv {
11namespace detail {
12
13template<template<typename> class Functor, typename... Args>
14static inline void depthDispatch(const int depth, Args&&... args)
15{
16 switch (depth)
17 {
18 case CV_8U:
19 Functor<uint8_t>{}(std::forward<Args>(args)...);
20 break;
21 case CV_8S:
22 Functor<int8_t>{}(std::forward<Args>(args)...);
23 break;
24 case CV_16U:
25 Functor<uint16_t>{}(std::forward<Args>(args)...);
26 break;
27 case CV_16S:
28 Functor<int16_t>{}(std::forward<Args>(args)...);
29 break;
30 case CV_32S:
31 Functor<int32_t>{}(std::forward<Args>(args)...);
32 break;
33 case CV_32F:
34 Functor<float>{}(std::forward<Args>(args)...);
35 break;
36 case CV_64F:
37 Functor<double>{}(std::forward<Args>(args)...);
38 break;
39 case CV_16F:
40 default:
41 CV_Error(cv::Error::BadDepth, "Unsupported matrix type.");
42 };
43}
44
45}}
46
48
49#endif //OPENCV_CORE_DETAIL_DISPATCH_HELPER_IMPL_HPP
int depth
Definition core_c.h:100
#define CV_8S
Definition interface.h:74
#define CV_16F
Definition interface.h:80
#define CV_64F
Definition interface.h:79
#define CV_8U
Definition interface.h:73
#define CV_32S
Definition interface.h:77
#define CV_32F
Definition interface.h:78
#define CV_16S
Definition interface.h:76
#define CV_16U
Definition interface.h:75
#define CV_Error(code, msg)
Call the error handler.
Definition base.hpp:320
@ BadDepth
input image depth is not supported by the function
Definition base.hpp:86
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441