1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

* updated python wrapper generator to properly handle C++20-style named parameters

* added sample filter2D[p]() function and a little python test for it to demonstrate the concept
This commit is contained in:
Vadim Pisarevsky
2020-12-18 20:00:42 +08:00
parent 9668831c13
commit ed8696566b
6 changed files with 138 additions and 22 deletions
@@ -1508,6 +1508,21 @@ CV_EXPORTS_W void filter2D( InputArray src, OutputArray dst, int ddepth,
InputArray kernel, Point anchor = Point(-1,-1),
double delta = 0, int borderType = BORDER_DEFAULT );
class CV_EXPORTS_W_PARAMS Filter2DParams
{
public:
CV_PROP_RW int anchorX = -1;
CV_PROP_RW int anchorY = -1;
CV_PROP_RW int borderType = BORDER_DEFAULT;
CV_PROP_RW Scalar borderValue = Scalar();
CV_PROP_RW int ddepth = -1;
CV_PROP_RW double scale = 1.;
CV_PROP_RW double shift = 0.;
};
CV_EXPORTS_AS(filter2Dp) void filter2D( InputArray src, OutputArray dst, InputArray kernel,
const Filter2DParams& params=Filter2DParams());
/** @brief Applies a separable linear filter to an image.
The function applies a separable linear filter to the image. That is, first, every row of src is