img.save('c:/test.png')
X, Y = numpy.meshgrid(list(range(sz[0])), list(range(sz[1])))
Z = 1 - numpy.asarray(img) / 255
fig = pylab.figure()
ax = axes3d.Axes3D(fig)
ax.plot_wireframe(X, -Y, Z, rstride=1, cstride=1)
ax.set_zlim((0, 50))
fig.savefig('c:/test2.png')
Generating a 3D CAPTCHA [pic]