Closed Vishnukvsvk closed 3 years ago
@Vishnukvsvk did you ensure the localization.py file has been run before running this file
just use binary_car_image insted of using localization.binary_car_image
Ensure that you run localization.py file before running this main file
just use binary_car_image insted of using localization.binary_car_image
Thanks. This helped me.
from skimage import measure from skimage.measure import regionprops import matplotlib.pyplot as plt import matplotlib.patches as patches import localization
this gets all the connected regions and groups them together
label_image = measure.label(localization.binary_car_image)
fig, (ax1) = plt.subplots(1) ax1.imshow(localization.gray_car_image, cmap="gray");
regionprops creates a list of properties of all the labelled regions
for region in regionprops(label_image): if region.area < 50:
if the region is so small then it's likely not a license plate
plt.show()
AttributeError Traceback (most recent call last)