HAL Filter2D interface: Updated according to comments

This commit is contained in:
Maksim Shabunin
2016-03-01 18:48:41 +03:00
parent 85b2c2ae58
commit 17cd1dac06
3 changed files with 106 additions and 173 deletions

View File

@@ -2,6 +2,7 @@
#define CV_IMGPROC_HAL_HPP
#include "opencv2/core/cvdef.h"
#include "opencv2/core/cvstd.hpp"
#include "opencv2/core/hal/interface.h"
namespace cv { namespace hal {
@@ -9,43 +10,30 @@ namespace cv { namespace hal {
//! @addtogroup core_hal_functions
//! @{
struct FilterContext
struct CV_EXPORTS Filter2D
{
void * impl;
FilterContext() : impl(0) {}
static Ptr<hal::Filter2D> createFilter2D(uchar * kernel_data, size_t kernel_step, int kernel_type,
int kernel_width, int kernel_height,
int max_width, int max_height,
int stype, int dtype,
int borderType, double delta,
int anchor_x, int anchor_y,
bool isSubmatrix, bool isInplace);
static Ptr<hal::Filter2D> createSepFilter2D(int stype, int dtype, int ktype,
uchar * kernelx_data, size_t kernelx_step,
int kernelx_width, int kernelx_height,
uchar * kernely_data, size_t kernely_step,
int kernely_width, int kernely_height,
int anchor_x, int anchor_y,
double delta, int borderType);
virtual void apply(uchar * src_data, size_t src_step,
uchar * dst_data, size_t dst_step,
int width, int height,
int full_width, int full_height,
int offset_x, int offset_y) = 0;
virtual ~Filter2D() {}
};
CV_EXPORTS
void init_filter2d(FilterContext &c,
uchar * kernel_data, size_t kernel_step, int kernel_type,
int kernel_width, int kernel_height,
int max_width, int max_height,
int stype, int dtype,
int borderType, double delta, int anchor_x, int anchor_y, bool isSubmatrix, bool isInplace);
CV_EXPORTS
void filter2d(FilterContext & c, uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step,
int width, int height, int full_width, int full_height, int offset_x, int offset_y);
CV_EXPORTS
void free_filter2d(FilterContext & c);
CV_EXPORTS
void init_sepFilter2d(FilterContext & c, int stype, int dtype, int ktype,
uchar * kernelx_data, size_t kernelx_step, int kernelx_width, int kernelx_height,
uchar * kernely_data, size_t kernely_step, int kernely_width, int kernely_height,
int anchor_x, int anchor_y, double delta, int borderType);
CV_EXPORTS
void sepFilter2d(FilterContext & c, uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step,
int width, int height, int full_width, int full_height,
int offset_x, int offset_y);
CV_EXPORTS
void free_sepFilter2d(FilterContext & c);
//! @}
}}