Im using polyline to draw a rectangular box with red color on this image, now i want to fill in the outer part of the rectangular box with black color
width = 30
height = 92
dim = (width, height)
resized = cv2.resize(img_closed, dim, interpolation = cv2.INTER_AREA)
pts = np.array([[3, 18], [26.7, 18], [26.7, 89], [3, 89]], np.int32)
pts.reshape((-1, 1, 2))
gray3 = cv2.merge([resized, resized, resized])
lin = cv2.polylines(gray3, [pts], True, (255,0,0), 1)
#img_fill = cv2.fillPoly(gray3, [pts], (255, 255, 255))
create_plot(10,i,lin)