opencv imread读取的是numpy的ndarray
类型
显示图片
imshow()
- BGR [W, H, 3]
- 灰度 [W, H]
winname = 'ref_img'
cv2.imshow(winname, ref_img.permute(1, 2, 0).numpy()[:, :, ::-1])
cv2.waitKey(0)
PIL.Image.open.convert('RGB')
图像resize
默认是双线性插值
2024-03-27 17:05:34
opencv imread读取的是numpy的ndarray
类型
imshow()
winname = 'ref_img'
cv2.imshow(winname, ref_img.permute(1, 2, 0).numpy()[:, :, ::-1])
cv2.waitKey(0)
PIL.Image.open.convert('RGB')
默认是双线性插值
下一篇:MATLAB灰度变换