【发布时间】:2021-04-12 16:02:47
【问题描述】:
我有一个带有一些点的图像,我需要在图像上画出最适合的线。这些点将构成一条多项式线。
这是我目前得到的:
#The coordinates are filled in earlier (self.lx, self.ly)
z = np.polyfit(self.lx, self.ly, 2)
lspace = np.linspace(0, 100, 100)
draw_x = lspace
draw_y = np.polyval(z, draw_x) #I am unsure of how to draw it on to the image
【问题讨论】: