网络编程
位置:首页>> 网络编程>> Python编程>> 使用Python实现图像标记点的坐标输出功能

使用Python实现图像标记点的坐标输出功能

作者:松子茶  发布时间:2022-10-31 16:15:06 

标签:python,标记,坐标

Sometimes we have need to interact  with an application,for example bymarking points in an image,or you need to annotation some training data.PyLab comes with a simple functionginput() the let's you do just that .Here's a short example.


from PIL import Image
from pylab import *
im = array(Image.open('test.jpg'))
imshow(im)
print 'Please click 3 points'
x =ginput(3)
print 'you clicked:',x
show()

This plots an image and waits for the user to click three times in the image region of the figures window.The coordinates[x,y] of the clicks are saved in a list x.

使用Python实现图像标记点的坐标输出功能

总结

以上所述是小编给大家介绍的使用Python实现图像标记点的坐标输出功能 ,网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

来源:https://blog.csdn.net/songzitea/article/details/17304925

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com