使用Python实现图像标记点的坐标输出
2013-12-13 17:14
751 查看
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.
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.
关于Image Engineering & Computer Vision的更多讨论与交流,敬请关注本博客和新浪微博songzi_tea.
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.
关于Image Engineering & Computer Vision的更多讨论与交流,敬请关注本博客和新浪微博songzi_tea.
相关文章推荐
- 使用python实现标记图像感兴区域
- python实现图像中多目标标记
- MATLAB GUI ,2,使用MATLAB的函数来实现MATLAB GUI,part 1,图像、按钮和坐标轴
- Python使用matplotlib实现的图像读取、切割裁剪功能示例
- Python2.x上使用freetype实现OpenCV2.x的中文输出
- 使用C#实现WGS84坐标转高德的火星坐标,数据源来自excel的两列,输出到excel中
- Python使用matplotlib模块绘制图像并设置标题与坐标轴等信息示例
- OpenCV3计算机视觉Python语言实现(三):使用OpenCV3处理图像
- 经典算法问题:“this is a test” 逆序输出为“test a is this”.使用Python实现
- 【python下使用OpenCV实现计算机视觉读书笔记2】图像与字节的变换
- Python使用logging结合decorator模式实现优化日志输出的方法
- 基于Python使用CloudSight API实现简单的图像识别(image Recognition)
- Python使用logging结合decorator模式实现优化日志输出的方法
- 【python下使用OpenCV实现计算机视觉读书笔记2】图像与字节的变换
- PHP使用range协议实现输出文件断点续传代码实例
- Python+Selenium使用Page Object实现页面自动化测试
- Zabbix3.0.2使用外部python脚本实现邮件报警
- Python使用adbapi实现MySQL数据库的异步存储
- 完成一个学生管理程序,使用学号作为键添加5个学生对象,并可以将全部信息保存在文件中,可以实现对学生信息的学号查找,输出全部学生信息的功能。