def smooth_cross_section(imV, LEN_diff, DEG_NUM):
    imV_c = imcomplement(imV)
    imd = []
    for i in range(12):
        k = (i + 1)
        se1 = np.loadtxt((('filters/images/filters/' + str(k)) + 'linekernel1.txt'))
        se2 = np.loadtxt((('filters/images/filters/' + str(k)) + 'linekernel2.txt'))
        if (i == 0):
            se1 = np.reshape(se1, (1, len(se1)))
            se2 = np.reshape(se2, (len(se2), 1))
        if (i == 6):
            se1 = np.reshape(se1, (len(se1), 1))
            se2 = np.reshape(se2, (1, len(se2)))
        temp = cv2.filter2D(imV_c.astype('float32'), (- 1), se1)
        imdi = cv2.filter2D(temp, (- 1), se2)
        imdi[(imdi < 0)] = 0
        imd.append(imdi)
    imDiff = imd[0]
    for i in range(11):
        k = (i + 1)
        imDiff = np.maximum(imDiff, imd[k])
    imDiff = mat2gray(imDiff)
    return imDiff
def smooth_cross_section(imV, LEN_diff, DEG_NUM):
    imV_c = imcomplement(imV)
    imd = []
    for i in range(12):
        k = (i + 1)
        se1 = np.loadtxt((('filters/images/filters/' + str(k)) + 'linekernel1.txt'))
        se2 = np.loadtxt((('filters/images/filters/' + str(k)) + 'linekernel2.txt'))
        if (i == 0):
            se1 = np.reshape(se1, (1, len(se1)))
            se2 = np.reshape(se2, (len(se2), 1))
        if (i == 6):
            se1 = np.reshape(se1, (len(se1), 1))
            se2 = np.reshape(se2, (1, len(se2)))
        temp = cv2.filter2D(imV_c.astype('float32'), (- 1), se1)
        imdi = cv2.filter2D(temp, (- 1), se2)
        imdi[(imdi < 0)] = 0
        imd.append(imdi)
    imDiff = imd[0]
    for i in range(11):
        k = (i + 1)
        imDiff = np.maximum(imDiff, imd[k])
    imDiff = mat2gray(imDiff)
    return imDiff