Untitled

def masking(input):
    mask = np.zeros_like(input)   
    ignore_mask_color = 255
    inputshape = input.shape
    vertices = np.array([[(0,inputshape[0]*0.95),(inputshape[1]*0.45, inputshape[0]*0.7), (inputshape[1]*0.65, inputshape[0]*0.7), (inputshape[1],inputshape[0]*0.95)]], dtype=np.int32)

		cv2.fillPoly(mask, vertices, ignore_mask_color)
    masked_edges = cv2.bitwise_and(input, mask)

    return masked_edges

앞으로 연산 할 영역을 지정