Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv2.ximgproc_StructuredEdgeDetection is not a function, but a class, you first have to create an instance of it:

ed = cv2.ximgproc.createStructuredEdgeDetection(model)

which takes the path to the pretrained edge detection model file as argument. (you probably need to download it first)

then you can use it like:

dst = ed.computeEdges(src)

you can also look at the builtin help cmd:

>>> help(cv2.ximgproc_StructuredEdgeDetection)