如何将 fastai 图像从 open_image() 格式转换为 opencv?

Ste*_*nko 6 python opencv fast-ai

我在 fast.ai 中以这种方式打开了图像:

 img = open_image(img_f)
Run Code Online (Sandbox Code Playgroud)

我如何用cv2.imshow显示它?

pro*_*sti 1

FastAi 已经使用这个包来处理图像。当您执行 open_image 函数时,检查文档字符串:

def open_image(fn):
    """ Opens an image using OpenCV given the file path.
Run Code Online (Sandbox Code Playgroud)