plt显示方法imshow是默认矩阵是RGB的, 在这里插入图片描述 想要正确显示,需要: imgrgb= cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.imshow(imgrgb) plt.show().
確定! 回上一頁