直接上图了表示区别
示例代码佐证
import cv2
a=cv2.imread("./test.jpg")
print(a.shape)
输出结果#(334, 462, 3)
from PIL import Image
import matplotlib.pyplot as plt
b=Image.open("./test.jpg")
print(b.size)
输出结果 #(462, 334)
直接上图了表示区别
示例代码佐证
import cv2
a=cv2.imread("./test.jpg")
print(a.shape)
输出结果#(334, 462, 3)
from PIL import Image
import matplotlib.pyplot as plt
b=Image.open("./test.jpg")
print(b.size)
输出结果 #(462, 334)