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


Posted in Python onAugust 14, 2019

Sometimes we have need to interact  with an application,for example by marking points in an image,or you need to annotation some training data.PyLab comes with a simple function ginput() 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实现图像标记点的坐标输出功能 ,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对三水点靠木网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

Python 相关文章推荐
SublimeText 2编译python出错的解决方法(The system cannot find the file specified)
Nov 27 Python
Python 中PyQt5 点击主窗口弹出另一个窗口的实现方法
Jul 04 Python
python正则-re的用法详解
Jul 28 Python
Python generator生成器和yield表达式详解
Aug 08 Python
django写用户登录判定并跳转制定页面的实例
Aug 21 Python
python图像处理模块Pillow的学习详解
Oct 09 Python
Python3.7安装keras和TensorFlow的教程图解
Jun 18 Python
Django数据结果集序列化并展示实现过程
Apr 22 Python
Python字符串函数strip()原理及用法详解
Jul 23 Python
python接口自动化之ConfigParser配置文件的使用详解
Aug 03 Python
python如何调用百度识图api
Sep 29 Python
关于Python 解决Python3.9 pandas.read_excel(‘xxx.xlsx‘)报错的问题
Nov 28 Python
python2爬取百度贴吧指定关键字和图片代码实例
Aug 14 #Python
python提取照片坐标信息的实例代码
Aug 14 #Python
python2使用bs4爬取腾讯社招过程解析
Aug 14 #Python
详解用python计算阶乘的几种方法
Aug 14 #Python
Python使用scrapy爬取阳光热线问政平台过程解析
Aug 14 #Python
用Python抢火车票的简单小程序实现解析
Aug 14 #Python
Python定时任务随机时间执行的实现方法
Aug 14 #Python
You might like
第1次亲密接触PHP5(2)
2006/10/09 PHP
关于php fread()使用技巧
2010/01/22 PHP
php使用fputcsv()函数csv文件读写数据的方法
2015/01/06 PHP
PHP5.4起内置web服务器使用方法
2016/08/09 PHP
php中引用&的用法分析【变量引用,函数引用,对象引用】
2016/12/12 PHP
ThinkPHP3.2.3框架邮件发送功能图文实例详解
2019/04/23 PHP
jquery防止重复执行动画避免页面混乱
2014/04/22 Javascript
javascript中为某个元素指定事件的三种方式
2014/08/07 Javascript
jQuery实现的个性化返回底部与返回顶部特效代码
2015/10/30 Javascript
js实现iframe框架取值的方法(兼容IE,firefox,chrome等)
2015/11/26 Javascript
bootstrap常用组件之头部导航实现代码
2017/04/20 Javascript
jQuery NProgress.js加载进度插件的简单使用方法
2018/01/31 jQuery
vue中使用echarts制作圆环图的实例代码
2018/07/27 Javascript
在Vue-cli里应用Vuex的state和mutations方法
2018/09/16 Javascript
ios中视频的最后一桢问题解决
2019/05/14 Javascript
JS document对象简单用法完整示例
2020/01/14 Javascript
python中的reduce内建函数使用方法指南
2014/08/31 Python
Python利用QQ邮箱发送邮件的实现方法(分享)
2017/06/09 Python
Python使用OpenCV进行标定
2018/05/08 Python
Python给定一个句子倒序输出单词以及字母的方法
2018/12/20 Python
Python正则表达式实现简易计算器功能示例
2019/05/07 Python
浅析matlab中imadjust函数
2020/02/27 Python
python不到50行代码完成了多张excel合并的实现示例
2020/05/28 Python
python新手学习可变和不可变对象
2020/06/11 Python
python切割图片的示例
2020/11/12 Python
英国高档时尚男装购物网站:MR PORTER
2016/08/09 全球购物
英国、欧洲和全球租车服务:Avis英国
2016/08/29 全球购物
UNIONBAY官网:美国青少年服装品牌
2019/03/26 全球购物
电气专业应届生求职信
2013/11/01 职场文书
计算机应用专业学生的自我评价分享
2013/11/03 职场文书
写演讲稿所需要注意的4个条件
2014/01/09 职场文书
精通CAD能手自荐书
2014/01/31 职场文书
广告学专业毕业生自荐信
2014/05/28 职场文书
2014年酒店前台工作总结
2014/11/14 职场文书
建筑技术负责人岗位职责
2015/04/13 职场文书
史上最全的军训拉歌口号
2015/12/25 职场文书