Advanced_Lane_Finding_v2.py
def abs_sobel_thresh(gray, orient='x', thresh_min=0, thresh_max=255, ksize= 7):

    """
    Apply a threshold based on the absolute value of the sobel filter in a certain direction.
    Sobel derivative image is rescaled to 8bit hence the threshold should be in [0, 255]
    :param gray: grayscale image
    :param orient: orientation for the sobel operator
    :param thresh_min: 
    :param thresh_max:
    :param ksize: 
    :return: 
    """

    if orient == 'x':
        abs_sobel = np.absolute(cv2.Sobel(gray, cv2.CV_64F, 1, 0,ksize= ksize))
    if orient == 'y':
        abs_sobel = np.absolute(cv2.Sobel(gray, cv2.CV_64F, 0, 1, ksize= ksize))
    # Rescale back to 8 bit integer
    scaled_sobel = np.uint8(255*abs_sobel/np.max(abs_sobel))
    # Create a copy and apply the threshold
    binary_output = np.zeros_like(scaled_sobel)
    binary_output[(scaled_sobel >= thresh_min) & (scaled_sobel <= thresh_max)] = 1

    # Return the result
    return binary_output

    Apply a threshold based on the absolute value of the sobel filter in a certain direction.
    Sobel derivative image is rescaled to 8bit hence the threshold should be in [0, 255]
    :param gray: grayscale image
    :param orient: orientation for the sobel operator
    :param thresh_min: 
    :param thresh_max:
    :param ksize: 
    :return: 
    
Apply a threshold based on the absolute value of the sobel filter in a certain direction.
Sobel derivative image is rescaled to 8bit hence the threshold should be in [0, 255]
Apply a threshold based on the absolute value of the sobel filter in a certain direction . Sobel derivative image is rescaled to 8bit hence the threshold should be in [ 0 255 ]
def abs_sobel_thresh(gray, orient='x', thresh_min=0, thresh_max=255, ksize= 7):
    if orient == 'x':
        abs_sobel = np.absolute(cv2.Sobel(gray, cv2.CV_64F, 1, 0,ksize= ksize))
    if orient == 'y':
        abs_sobel = np.absolute(cv2.Sobel(gray, cv2.CV_64F, 0, 1, ksize= ksize))
    scaled_sobel = np.uint8(255*abs_sobel/np.max(abs_sobel))
    binary_output = np.zeros_like(scaled_sobel)
    binary_output[(scaled_sobel >= thresh_min) & (scaled_sobel <= thresh_max)] = 1
    return binary_output
def abs_sobel_thresh ( gray , orient = 'x' , thresh_min = 0 , thresh_max = 255 , ksize = 7 ) : if orient == 'x' : abs_sobel = np . absolute ( cv2 . Sobel ( gray , cv2 . CV_64F , 1 , 0 , ksize = ksize ) ) if orient == 'y' : abs_sobel = np . absolute ( cv2 . Sobel ( gray , cv2 . CV_64F , 0 , 1 , ksize = ksize ) ) scaled_sobel = np . uint8 ( 255 * abs_sobel / np . max ( abs_sobel ) ) binary_output = np . zeros_like ( scaled_sobel ) binary_output [ ( scaled_sobel >= thresh_min ) & ( scaled_sobel <= thresh_max ) ] = 1 return binary_output
Apply a threshold based on the absolute value of the sobel filter in a certain direction.
Apply a threshold based on the absolute value of the sobel filter in a certain direction .
"""
    Apply a threshold based on the absolute value of the sobel filter in a certain direction.
    Sobel derivative image is rescaled to 8bit hence the threshold should be in [0, 255]
    :param gray: grayscale image
    :param orient: orientation for the sobel operator
    :param thresh_min: 
    :param thresh_max:
    :param ksize: 
    :return: 
    """ # Rescale back to 8 bit integer # Create a copy and apply the threshold # Return the result
None
gray
None
orient
orientation for the sobel operator
orientation for the sobel operator
thresh_min
None
thresh_max
None
ksize
None