def canny(im,threshold1=40.0,threshold2=100.0,aperture_size=3,sigma=None):
    gray = im.asOpenCVBW()
    edges = cv.CreateImage( cv.GetSize(gray), 8, 1 );
    

    if sigma!=None:
        cv.Smooth(gray,gray,cv.CV_GAUSSIAN,int(sigma+1)*4+1,int(sigma+1)*4+1,sigma,sigma)
    if threshold1 < threshold2:
        threshold1, threshold2 = threshold2,threshold1
    cv.Canny(gray,edges,threshold1,threshold2   ,aperture_size)
    
    return pv.Image(edges)
void cvCanny( const CvArr* image, CvArr* edges, double threshold1, double threshold2, int aperture_size=3 );
dataset/ETHPy150Open bolme/pyvision/src/pyvision/edge/canny.py/canny