

I have a car park model image and wish to test the capture of an irregular cropped portion to detail how many edges exist. The idea being to advise if a space contains a vehicle in it.
Everytime I try this, I just get various errors relating to the image not having the right attributes. The code is below,
im = Image.open('0.png')
bay1 = image.edge(10,300)
image_matrix = bay1.getNumpy().flatten()
image_pixel_count = cv2.countNonZero(image_matrix)
canny_count[iCol] += image_pixel_count
Any help would be appreciated on how to get an edge count of 0.png
↧