1. 读取图像

import numpy as np
import cv2
from PIL import Image 

img = cv2.imread('seg.png')

display(Image.fromarray(img))

【547】分水岭楼栋分割实现全过程_读取图像