diff --git a/crosswalk_detection_with_class.py b/crosswalk_detection_with_class.py index a572669cebb9e2d043bd2ff0444d242b30840bbe..285cbf9fc42afc5ab059827d67ea34b8af3f4ade 100644 --- a/crosswalk_detection_with_class.py +++ b/crosswalk_detection_with_class.py @@ -253,7 +253,7 @@ def process(img_src_filename, DEBUG = False): 'Adaptive Gaussian Thresholding', 'After Mask'] images = [img_color, th3, blank_image] - for i in range(4): + for i in range(3): plt.subplot(2, 2, i+1), plt.imshow(images[i], 'gray') plt.title(titles[i]) plt.xticks([]), plt.yticks([]) @@ -269,7 +269,7 @@ if __name__ == "__main__": filenames = list() - for filename in glob.iglob('tests/' + '**/*.jpg', recursive=True): + for filename in glob.iglob('data/' + '**/*.jpg', recursive=True): filenames.append(filename) for filename in filenames: diff --git a/crosswalk_detection_with_class_yellow.py b/crosswalk_detection_with_class_yellow.py index bdfcaa4d27e1ce185dfaa0c33c1922b03dd07a55..d03326c19447da7f68b57736395c13d5a7b0670f 100644 --- a/crosswalk_detection_with_class_yellow.py +++ b/crosswalk_detection_with_class_yellow.py @@ -114,7 +114,7 @@ def process(img_src_filename, DEBUG = False): img_blur, 255, cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY, 157, -20) if DEBUG: - cv.imshow('threshold', th2) + cv.imshow('threshold', th3) cv.waitKey() # Calculate the size_max and size_min of a candidates @@ -260,11 +260,11 @@ def process(img_src_filename, DEBUG = False): # DEBUG if DEBUG: - titles = ['Original Image', 'Adaptive Mean Thresholding', + titles = ['Original Image', 'Adaptive Gaussian Thresholding', 'After Mask'] - images = [img_color, th2, th3, blank_image] + images = [img_color, th3, blank_image] - for i in range(4): + for i in range(3): plt.subplot(2, 2, i+1), plt.imshow(images[i], 'gray') plt.title(titles[i]) plt.xticks([]), plt.yticks([]) @@ -280,7 +280,7 @@ if __name__ == "__main__": filenames = list() - for filename in glob.iglob('ownSet/' + '**/*.jpg', recursive=True): + for filename in glob.iglob('data_yellow/' + '**/*.jpg', recursive=True): filenames.append(filename) for filename in filenames: