I'm trying to create voronoi lines ontop of the pictures with the points.
(我正在尝试在带点的图片上创建voronoi线。)
I already extracted the points (x,y), but I want to plot them on the image they were taken from. (我已经提取了点(x,y),但是我想将它们绘制在从中获取的图像上。)
points = [[point[0] * (img.shape[0]) / max_x, point[1] * (img.shape[1]) / max_y] for point in original_pints]
vor = Voronoi(points)
fig = plt.figure(figsize=(20,20))
ax = fig.add_subplot(111)
ax.imshow(ndimage.rotate(img, 0))
voronoi_plot_2d(vor , show_points=False, show_vertices=False, line_colors='red', ax=ax)
plt.show()
The code generates this image When I try to change the figure dimension to the image dimension, I get this error:
(代码生成此图像,当我尝试将图形尺寸更改为图像尺寸时,出现此错误:)
ValueError: Image size of 216000x256000 pixels is too large. It must be less than 2^16 in each direction.
What can I do to make the image fit?
(我该怎么做才能使图像合适?)
ask by liran sagie translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…