Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static PyObject* pyopencv_cv_Canny(PyObject* , PyObject* args, PyObject* kw)
- {
- using namespace cv;
- {
- PyObject* pyobj_image = NULL;
- Mat image;
- PyObject* pyobj_edges = NULL;
- Mat edges;
- double threshold1=0;
- double threshold2=0;
- int apertureSize=3;
- bool L2gradient=false;
- const char* keywords[] = { "image", "threshold1", "threshold2", "edges", "apertureSize", "L2gradient", NULL };
- if( PyArg_ParseTupleAndKeywords(args, kw, "Odd|Oib:Canny", (char**)keywords, &pyobj_image, &threshold1, &threshold2, &pyobj_edges, &apertureSize, &L2gradient) &&
- pyopencv_to(pyobj_image, image, ArgInfo("image", 0)) &&
- pyopencv_to(pyobj_edges, edges, ArgInfo("edges", 1)) )
- {
- ERRWRAP2(cv::Canny(image, edges, threshold1, threshold2, apertureSize, L2gradient));
- return pyopencv_from(edges);
- }
- }
- PyErr_Clear();
- {
- PyObject* pyobj_image = NULL;
- UMat image;
- PyObject* pyobj_edges = NULL;
- UMat edges;
- double threshold1=0;
- double threshold2=0;
- int apertureSize=3;
- bool L2gradient=false;
- const char* keywords[] = { "image", "threshold1", "threshold2", "edges", "apertureSize", "L2gradient", NULL };
- if( PyArg_ParseTupleAndKeywords(args, kw, "Odd|Oib:Canny", (char**)keywords, &pyobj_image, &threshold1, &threshold2, &pyobj_edges, &apertureSize, &L2gradient) &&
- pyopencv_to(pyobj_image, image, ArgInfo("image", 0)) &&
- pyopencv_to(pyobj_edges, edges, ArgInfo("edges", 1)) )
- {
- ERRWRAP2(cv::Canny(image, edges, threshold1, threshold2, apertureSize, L2gradient));
- return pyopencv_from(edges);
- }
- }
- PyErr_Clear();
- {
- PyObject* pyobj_dx = NULL;
- Mat dx;
- PyObject* pyobj_dy = NULL;
- Mat dy;
- PyObject* pyobj_edges = NULL;
- Mat edges;
- double threshold1=0;
- double threshold2=0;
- bool L2gradient=false;
- const char* keywords[] = { "dx", "dy", "threshold1", "threshold2", "edges", "L2gradient", NULL };
- if( PyArg_ParseTupleAndKeywords(args, kw, "OOdd|Ob:Canny", (char**)keywords, &pyobj_dx, &pyobj_dy, &threshold1, &threshold2, &pyobj_edges, &L2gradient) &&
- pyopencv_to(pyobj_dx, dx, ArgInfo("dx", 0)) &&
- pyopencv_to(pyobj_dy, dy, ArgInfo("dy", 0)) &&
- pyopencv_to(pyobj_edges, edges, ArgInfo("edges", 1)) )
- {
- ERRWRAP2(cv::Canny(dx, dy, edges, threshold1, threshold2, L2gradient));
- return pyopencv_from(edges);
- }
- }
- PyErr_Clear();
- {
- PyObject* pyobj_dx = NULL;
- UMat dx;
- PyObject* pyobj_dy = NULL;
- UMat dy;
- PyObject* pyobj_edges = NULL;
- UMat edges;
- double threshold1=0;
- double threshold2=0;
- bool L2gradient=false;
- const char* keywords[] = { "dx", "dy", "threshold1", "threshold2", "edges", "L2gradient", NULL };
- if( PyArg_ParseTupleAndKeywords(args, kw, "OOdd|Ob:Canny", (char**)keywords, &pyobj_dx, &pyobj_dy, &threshold1, &threshold2, &pyobj_edges, &L2gradient) &&
- pyopencv_to(pyobj_dx, dx, ArgInfo("dx", 0)) &&
- pyopencv_to(pyobj_dy, dy, ArgInfo("dy", 0)) &&
- pyopencv_to(pyobj_edges, edges, ArgInfo("edges", 1)) )
- {
- ERRWRAP2(cv::Canny(dx, dy, edges, threshold1, threshold2, L2gradient));
- return pyopencv_from(edges);
- }
- }
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement