python NV21文件转换为jpg
NV212jpgimport cv2import numpy as npdef NV212RGB(yuv_path, width, height): with open(yuv_path, 'rb') as f: yuvdata = np.fromfile(f, dtype=np.uint8) cv_format = cv2.COLOR_YUV2BGR_NV21 bgr_img = cv2.cvtColor(yuvdata.reshape((height*3





