利用python提取图像轮廓

from PIL import Imagefrom pylab import * # 读取图像到数组中 # convert(‘L’)表示将RGB转换为L模式,表示像素点在[0,255]之间im = array(Image.open(‘D:/1.jpg’).convert(‘L’)) # 新建一个图像figure()# 使用颜色信息gray() # 在原点的左上角显示轮廓图像contour(im,
相关文章
相关标签/搜索