<jupyter_start><jupyter_text>Hough lines<jupyter_code># load helper functions
%run -i "0. Functions_Clases Pipeline.py"

# Load Camera calibration params
roi_images = pickle.load(open( "pickle_data/roi_images.p", "rb" ) )
#Test function
imagesHough=[]
titlesHough=[]

# Hough parameters
rho = 1 # distance resolution in pixels of the Hough grid
theta = 1*np.pi/180 # angular resolution in radians of the Hough grid
threshold = 1    # minimum number of votes (intersections in Hough grid cell)
min_line_len = 5 #minimum number of pixels making up a line
max_line_gap = 40   # maximum gap in pixels between connectable line segments

imgHouhg,lines = hough_lines(roi_images[0], rho, theta, threshold, min_line_len, max_line_gap,)

imagesHough.append(roi_images[0]);titlesHough.append("Original");
imagesHough.append(imgHouhg);titlesHough.append("Hough transform");
    

displayListImages(imagesHough,cols=2,titles=titlesHough, figSize=[12,2])
#print(lines)
hough_images = []


# Hough parameters
rho = 1 # distance resolution in pixels of the Hough grid
theta = 1*np.pi/180 # angular resolution in radians of the Hough grid
threshold = 10    # minimum number of votes (intersections in Hough grid cell)
min_line_len = 5 #minimum number of pixels making up a line
max_line_gap = 40   # maximum gap in pixels between connectable line segments

for img in roi_images:
    imgHouhg,lines = hough_lines(img, rho, theta, threshold, min_line_len, max_line_gap,)
    hough_images.append(imgHouhg)
        
displayListImages(hough_images,cols=2,cmap='gray',figSize=[12,8])<jupyter_output><empty_output><jupyter_text>Dump data<jupyter_code>pickle.dump( hough_images, open( "pickle_data/hough_images.p", "wb" ) )<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09768786127167631, 'fraction_numerical': 0.017341040462427744, 'mean_word_length': 5.979838709677419, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '286041', 'license': 'MIT', 'n_tokens_mistral': 620, 'n_tokens_neox': 584, 'n_words': 161, 'path': '5.1. Houg Lines.ipynb', 'repo_name': 'fizcris/CarND-Advanced-Lane-Lines', 'size': '1730'}