File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def main():
101101
102102 # Change image and store the same angle, with some distortion, both in image and in angle (to increase robustness)
103103 # flipped
104- center_image_temp = np .expand_dims (cv2 .flip (center_image , 1 ), axis = 2 )
104+ # center_image_temp = np.expand_dims(cv2.flip(center_image, 1), axis=2)
105105
106106 # images.append(center_image_temp)
107107 # angles.append(-float(line[1]))
@@ -118,8 +118,21 @@ def main():
118118 csvfile .close ()
119119
120120
121- left_to_straight_ratio = total_straight_angles / total_left_angles
122- right_to_straight_ratio = total_straight_angles / total_right_angles
121+ if total_left_angles == 0 :
122+ left_to_straight_ratio = None
123+ else :
124+ left_to_straight_ratio = total_straight_angles / total_left_angles
125+
126+ if total_right_angles == 0 :
127+ right_to_straight_ratio = None
128+ else :
129+ right_to_straight_ratio = total_straight_angles / total_right_angles
130+
131+
132+
133+
134+
135+
123136
124137 #print('angles are: ' + str(list(angles)))
125138
You can’t perform that action at this time.
0 commit comments