```python
Image.open(filename).convert(mode="RGB")
def cv_imread(file_path):
print("cv_img.file_path",file_path)
cv_img = cv2.imdecode(np.fromfile(file_path,dtype=np.uint8),-1)
print("cv_img.shape", cv_img.shape)
if len(cv_img.shape)<3:
print("1通道", file_path)
temp = cv_img[:, :, np.newaxis]
rslt = temp.repeat([3], axis=2)
return rslt
if cv_img.shape[2] == 4:
rslt = np.asarray(Image.open(file_path).convert("RGB"))
return rslt
# if cv_img.shape[2] == 1:
# print("1通道", file_path)
# temp = cv_img[:, :, np.newaxis]
# rslt = temp.repeat([3], axis=2)
# return rslt
return cv_img