def erode(src, ev):
    '''

    '''
    dst = src.clone()
    element = _get_morphology_element(ev)
    cv.erode(src, dst, element)
    return dst
Beispiel #2
0
def Erosion(pos, user_data):
    element = cv.asMat(np.ones((pos*2+1, pos*2+1), 'uint8'), True)
    cv.erode(src, dest, element)
    cv.imshow("Erosion&Dilation window",dest);
Beispiel #3
0
def Closing(pos, user_data):
    element = cv.asMat(np.ones((pos*2+1, pos*2+1), 'uint8'), True)
    cv.dilate(src, image, element)
    cv.erode(image, dest, element)
    cv.imshow("Opening&Closing window",dest);
Beispiel #4
0
def Erosion(pos, user_data):
    element = cv.asMat(np.ones((pos * 2 + 1, pos * 2 + 1), 'uint8'), True)
    cv.erode(src, dest, element)
    cv.imshow("Erosion&Dilation window", dest)
Beispiel #5
0
def Closing(pos, user_data):
    element = cv.asMat(np.ones((pos * 2 + 1, pos * 2 + 1), 'uint8'), True)
    cv.dilate(src, image, element)
    cv.erode(image, dest, element)
    cv.imshow("Opening&Closing window", dest)