擅长:python、mysql、java
<p>shift参数类似于将所有值乘以(1<;<;shift)
因此,如果要在(199.5199.5)处绘制一个圆,则需要执行以下操作:</p>
<pre><code>i2 = np.zeros((256, 256, 3), np.float32)
shift = 3
factor = (1 << shift)
cv2.circle(i2, (int(199.5 * factor + 0.5),int(199.5 * factor + 0.5)), 10 * factor, (1,0,0), -1, shift=shift)
cv2.imshow('2', i2)
</code></pre>