I can not draw the rectangles with the for loop.
I set up an np.array and was able to print all the elements in python console.
a =np.array([[14,137,80,166],[14,174,80,204],[14,214,80,244],[14,252,80,282],
[14,290,80,320],[14,328,80,358],[14,366,80,396],[14,402,80,432]])
for (x1,y1,x2,y2)in a:
print(x1,y1,x2,y2)
When I set up the for loop to draw the rectangles I get the last one in the array draw on image.
rect = np.array([[14,137,80,166],[14,174,80,204],[14,214,80,244],[14,252,80,282],
[14,290,80,320],[14,328,80,358],[14,366,80,396],[14,402,80,432]])
for (x1,y1,x2,y2)in rect:
#Create the basic black image
mask = np.zeros(blur.shape[:2], dtype="uint8")
cv2.rectangle(mask,(x1,y1),(x2,y2), (COLOR_WHITE), -1)
Any help greatly appreciated. Thanks.