Mat img = Cv2.ImRead(imgPath, ImreadModes.Grayscale);//以灰度模式读取图像 byte[] b; img.GetArray(out b);//把Mat数据放到一维数组中