I am trying to use opencv to rasterize a polygon. I'm using the shift parameter to get subpixel plotting. It isn't behaving as I had hoped. Here's my code and the output
import cv2
import matplotlib.pyplot as plt
img = np.zeros((4, 4), dtype=np.uint8)
boundary = [np.array([[32, 128], [128, 32], [223, 128], [128, 223], [32, 128]])]
bx, by = zip(*(boundary[0]/2**6))
plt.plot(bx, by)
cv2.fillPoly(img, boundary, color =255, shift=6)
plt.imshow(img)
I was hoping that every pixel passed through would be filled. Am I misunderstanding the shift parameter?
