hal.hpp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. #ifndef CV_IMGPROC_HAL_HPP
  2. #define CV_IMGPROC_HAL_HPP
  3. #include "opencv2/core/cvdef.h"
  4. #include "opencv2/core/cvstd.hpp"
  5. #include "opencv2/core/hal/interface.h"
  6. namespace cv { namespace hal {
  7. //! @addtogroup imgproc_hal_functions
  8. //! @{
  9. //---------------------------
  10. //! @cond IGNORED
  11. struct CV_EXPORTS Filter2D
  12. {
  13. CV_DEPRECATED static Ptr<hal::Filter2D> create(uchar * , size_t , int ,
  14. int , int ,
  15. int , int ,
  16. int , int ,
  17. int , double ,
  18. int , int ,
  19. bool , bool );
  20. virtual void apply(uchar * , size_t ,
  21. uchar * , size_t ,
  22. int , int ,
  23. int , int ,
  24. int , int ) = 0;
  25. virtual ~Filter2D() {}
  26. };
  27. struct CV_EXPORTS SepFilter2D
  28. {
  29. CV_DEPRECATED static Ptr<hal::SepFilter2D> create(int , int , int ,
  30. uchar * , int ,
  31. uchar * , int ,
  32. int , int ,
  33. double , int );
  34. virtual void apply(uchar * , size_t ,
  35. uchar * , size_t ,
  36. int , int ,
  37. int , int ,
  38. int , int ) = 0;
  39. virtual ~SepFilter2D() {}
  40. };
  41. struct CV_EXPORTS Morph
  42. {
  43. CV_DEPRECATED static Ptr<hal::Morph> create(int , int , int , int , int ,
  44. int , uchar * , size_t ,
  45. int , int ,
  46. int , int ,
  47. int , const double *,
  48. int , bool , bool );
  49. virtual void apply(uchar * , size_t , uchar * , size_t , int , int ,
  50. int , int , int , int ,
  51. int , int , int , int ) = 0;
  52. virtual ~Morph() {}
  53. };
  54. //! @endcond
  55. //---------------------------
  56. CV_EXPORTS void filter2D(int stype, int dtype, int kernel_type,
  57. uchar * src_data, size_t src_step,
  58. uchar * dst_data, size_t dst_step,
  59. int width, int height,
  60. int full_width, int full_height,
  61. int offset_x, int offset_y,
  62. uchar * kernel_data, size_t kernel_step,
  63. int kernel_width, int kernel_height,
  64. int anchor_x, int anchor_y,
  65. double delta, int borderType,
  66. bool isSubmatrix);
  67. CV_EXPORTS void sepFilter2D(int stype, int dtype, int ktype,
  68. uchar * src_data, size_t src_step,
  69. uchar * dst_data, size_t dst_step,
  70. int width, int height,
  71. int full_width, int full_height,
  72. int offset_x, int offset_y,
  73. uchar * kernelx_data, int kernelx_len,
  74. uchar * kernely_data, int kernely_len,
  75. int anchor_x, int anchor_y,
  76. double delta, int borderType);
  77. CV_EXPORTS void morph(int op, int src_type, int dst_type,
  78. uchar * src_data, size_t src_step,
  79. uchar * dst_data, size_t dst_step,
  80. int width, int height,
  81. int roi_width, int roi_height, int roi_x, int roi_y,
  82. int roi_width2, int roi_height2, int roi_x2, int roi_y2,
  83. int kernel_type, uchar * kernel_data, size_t kernel_step,
  84. int kernel_width, int kernel_height, int anchor_x, int anchor_y,
  85. int borderType, const double borderValue[4],
  86. int iterations, bool isSubmatrix);
  87. CV_EXPORTS void resize(int src_type,
  88. const uchar * src_data, size_t src_step, int src_width, int src_height,
  89. uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
  90. double inv_scale_x, double inv_scale_y, int interpolation);
  91. CV_EXPORTS void warpAffine(int src_type,
  92. const uchar * src_data, size_t src_step, int src_width, int src_height,
  93. uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
  94. const double M[6], int interpolation, int borderType, const double borderValue[4]);
  95. CV_EXPORTS void warpPerspective(int src_type,
  96. const uchar * src_data, size_t src_step, int src_width, int src_height,
  97. uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
  98. const double M[9], int interpolation, int borderType, const double borderValue[4]);
  99. CV_EXPORTS void cvtBGRtoBGR(const uchar * src_data, size_t src_step,
  100. uchar * dst_data, size_t dst_step,
  101. int width, int height,
  102. int depth, int scn, int dcn, bool swapBlue);
  103. CV_EXPORTS void cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step,
  104. uchar * dst_data, size_t dst_step,
  105. int width, int height,
  106. int scn, bool swapBlue, int greenBits);
  107. CV_EXPORTS void cvtBGR5x5toBGR(const uchar * src_data, size_t src_step,
  108. uchar * dst_data, size_t dst_step,
  109. int width, int height,
  110. int dcn, bool swapBlue, int greenBits);
  111. CV_EXPORTS void cvtBGRtoGray(const uchar * src_data, size_t src_step,
  112. uchar * dst_data, size_t dst_step,
  113. int width, int height,
  114. int depth, int scn, bool swapBlue);
  115. CV_EXPORTS void cvtGraytoBGR(const uchar * src_data, size_t src_step,
  116. uchar * dst_data, size_t dst_step,
  117. int width, int height,
  118. int depth, int dcn);
  119. CV_EXPORTS void cvtBGR5x5toGray(const uchar * src_data, size_t src_step,
  120. uchar * dst_data, size_t dst_step,
  121. int width, int height,
  122. int greenBits);
  123. CV_EXPORTS void cvtGraytoBGR5x5(const uchar * src_data, size_t src_step,
  124. uchar * dst_data, size_t dst_step,
  125. int width, int height,
  126. int greenBits);
  127. CV_EXPORTS void cvtBGRtoYUV(const uchar * src_data, size_t src_step,
  128. uchar * dst_data, size_t dst_step,
  129. int width, int height,
  130. int depth, int scn, bool swapBlue, bool isCbCr);
  131. CV_EXPORTS void cvtYUVtoBGR(const uchar * src_data, size_t src_step,
  132. uchar * dst_data, size_t dst_step,
  133. int width, int height,
  134. int depth, int dcn, bool swapBlue, bool isCbCr);
  135. CV_EXPORTS void cvtBGRtoXYZ(const uchar * src_data, size_t src_step,
  136. uchar * dst_data, size_t dst_step,
  137. int width, int height,
  138. int depth, int scn, bool swapBlue);
  139. CV_EXPORTS void cvtXYZtoBGR(const uchar * src_data, size_t src_step,
  140. uchar * dst_data, size_t dst_step,
  141. int width, int height,
  142. int depth, int dcn, bool swapBlue);
  143. CV_EXPORTS void cvtBGRtoHSV(const uchar * src_data, size_t src_step,
  144. uchar * dst_data, size_t dst_step,
  145. int width, int height,
  146. int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV);
  147. CV_EXPORTS void cvtHSVtoBGR(const uchar * src_data, size_t src_step,
  148. uchar * dst_data, size_t dst_step,
  149. int width, int height,
  150. int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV);
  151. CV_EXPORTS void cvtBGRtoLab(const uchar * src_data, size_t src_step,
  152. uchar * dst_data, size_t dst_step,
  153. int width, int height,
  154. int depth, int scn, bool swapBlue, bool isLab, bool srgb);
  155. CV_EXPORTS void cvtLabtoBGR(const uchar * src_data, size_t src_step,
  156. uchar * dst_data, size_t dst_step,
  157. int width, int height,
  158. int depth, int dcn, bool swapBlue, bool isLab, bool srgb);
  159. CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * src_data, size_t src_step,
  160. uchar * dst_data, size_t dst_step,
  161. int dst_width, int dst_height,
  162. int dcn, bool swapBlue, int uIdx);
  163. //! Separate Y and UV planes
  164. CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * y_data, const uchar * uv_data, size_t src_step,
  165. uchar * dst_data, size_t dst_step,
  166. int dst_width, int dst_height,
  167. int dcn, bool swapBlue, int uIdx);
  168. CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * y_data, size_t y_step, const uchar * uv_data, size_t uv_step,
  169. uchar * dst_data, size_t dst_step,
  170. int dst_width, int dst_height,
  171. int dcn, bool swapBlue, int uIdx);
  172. CV_EXPORTS void cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
  173. uchar * dst_data, size_t dst_step,
  174. int dst_width, int dst_height,
  175. int dcn, bool swapBlue, int uIdx);
  176. CV_EXPORTS void cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step,
  177. uchar * dst_data, size_t dst_step,
  178. int width, int height,
  179. int scn, bool swapBlue, int uIdx);
  180. //! Separate Y and UV planes
  181. CV_EXPORTS void cvtBGRtoTwoPlaneYUV(const uchar * src_data, size_t src_step,
  182. uchar * y_data, uchar * uv_data, size_t dst_step,
  183. int width, int height,
  184. int scn, bool swapBlue, int uIdx);
  185. CV_EXPORTS void cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
  186. uchar * dst_data, size_t dst_step,
  187. int width, int height,
  188. int dcn, bool swapBlue, int uIdx, int ycn);
  189. CV_EXPORTS void cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step,
  190. uchar * dst_data, size_t dst_step,
  191. int width, int height);
  192. CV_EXPORTS void cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step,
  193. uchar * dst_data, size_t dst_step,
  194. int width, int height);
  195. CV_EXPORTS void integral(int depth, int sdepth, int sqdepth,
  196. const uchar* src, size_t srcstep,
  197. uchar* sum, size_t sumstep,
  198. uchar* sqsum, size_t sqsumstep,
  199. uchar* tilted, size_t tstep,
  200. int width, int height, int cn);
  201. //! @}
  202. }}
  203. #endif // CV_IMGPROC_HAL_HPP