环境
python版本:3.8
opencv版本:4.3.0.36
代码
from PIL import Image
from pylab import *
import cv2
import numpy as np
# 读取图像到数组中
im = array(Image.open('./001.bmp'))
# 定义边界点
xs = [190.5,167.5,144.5,128.5,114.5,100.5,97.5,82.5,71.5,62.5,45.5,33.5,23.5,10.5,9.5,9.5,18.5,20.5,14.5,17.5,16.5,25.5,26.5,37.5,50.5,61.5,75.5,80.5,82.5,