Advanced_Lane_Finding_v2.py
def dir_threshold(gray, thresh_min=0, thresh_max=np.pi / 2, ksize=7):
    """
    Calculate the direction of the image gradient and takes a trheshold [0, Pi/2].
    :param gray: 
    :param thresh_min: 
    :param thresh_max: 
    :param ksize: 
    :return: 
    """

    sobelx = cv2.Sobel(gray, cv2.CV_64F, 1, 0, ksize=ksize)
    sobely = cv2.Sobel(gray, cv2.CV_64F, 0, 1, ksize=ksize)

    absgraddir = np.arctan2(np.absolute(sobely), np.absolute(sobelx))

    binary_output =  np.zeros_like(absgraddir)
    binary_output[(absgraddir >= thresh_min) & (absgraddir <= thresh_max)] = 1

    return binary_output

    Calculate the direction of the image gradient and takes a trheshold [0, Pi/2].
    :param gray: 
    :param thresh_min: 
    :param thresh_max: 
    :param ksize: 
    :return: 
    
Calculate the direction of the image gradient and takes a trheshold [0, Pi/2].
Calculate the direction of the image gradient and takes a trheshold [ 0 Pi / 2 ] .
def dir_threshold(gray, thresh_min=0, thresh_max=np.pi / 2, ksize=7):
    sobelx = cv2.Sobel(gray, cv2.CV_64F, 1, 0, ksize=ksize)
    sobely = cv2.Sobel(gray, cv2.CV_64F, 0, 1, ksize=ksize)
    absgraddir = np.arctan2(np.absolute(sobely), np.absolute(sobelx))
    binary_output =  np.zeros_like(absgraddir)
    binary_output[(absgraddir >= thresh_min) & (absgraddir <= thresh_max)] = 1
    return binary_output
def dir_threshold ( gray , thresh_min = 0 , thresh_max = np . pi / 2 , ksize = 7 ) : sobelx = cv2 . Sobel ( gray , cv2 . CV_64F , 1 , 0 , ksize = ksize ) sobely = cv2 . Sobel ( gray , cv2 . CV_64F , 0 , 1 , ksize = ksize ) absgraddir = np . arctan2 ( np . absolute ( sobely ) , np . absolute ( sobelx ) ) binary_output = np . zeros_like ( absgraddir ) binary_output [ ( absgraddir >= thresh_min ) & ( absgraddir <= thresh_max ) ] = 1 return binary_output
Calculate the direction of the image gradient and takes a trheshold [0, Pi/2].
Calculate the direction of the image gradient and takes a trheshold [ 0 Pi / 2 ] .
"""
    Calculate the direction of the image gradient and takes a trheshold [0, Pi/2].
    :param gray: 
    :param thresh_min: 
    :param thresh_max: 
    :param ksize: 
    :return: 
    """
None
gray
None
thresh_min
None
thresh_max
None
ksize
None