import numpy as np import cv2 cv_img = cv2.imdecode(np.fromfile(jpg_path, dtype=np.uint8), -1) # 读取8位图像