以下生成一个红色图像的是:
A. img = np.zeros((300,300,3), dtype = "uint8") img[:,:,2] = 255
B. img = np.zeros((300,300,3), dtype = "uint8") img[:,:,1] = 255
C. img = np.zeros((300,300,3), dtype = "uint8") img[:,:,0] = 255
D. img = np.zeros((300,300,3), dtype = "uint8") img[:,:,2] = 1
以下代码,哪个是画一个白色正方形
A. cv2.rectangle(img,(50,50),(100,200),(255,255,255),2)
B. cv2.rectangle(img,(50,50),(100,200),(0,0,0),2)
C. cv2.rectangle(img,(50,50),(100,100),(255,255,255),2)
D. cv2.rectangle(img,(50,50),(100,100),(0,0,0),2)
对于一个高300,宽400的图像,右上角的坐标是:
A. (0,400)
B. (0,399)
C. (400,0)
D. (399,0)