您的位置:首页 > 编程语言 > Python开发

使用python实现标记图像感兴区域

2013-12-13 15:42 555 查看
Although it  is possible to create nice bar plots,pie charts scatter plots,etc.only a few comments are needed for most computer vision purposes.Most Importantly ,we want to be able to show
things like interest points,correspondences and detected objects using points and lines. Here is an example of plotting an image with a few point and a line.

from PIL import Image
from pylab import *

im = array(Image.open('192917.bmp')) # read image to arry
imshow(im) # plot the image

#some points
x =[10,10,180,180,10]
y =[10,220,220,10,10]

#l =[180,200,240,225,180]
#h =[100,100,200,200,100]

m =[200,280,256,225,200]
n =[88,88,168,168,88]

j =[290,369,377,300,290]
k =[88,88,168,168,88]
axis('off')
# line plot connecting the first two points
plot(x[:5],y[:5]) #default blue solid line
#plot(l[:5],h[:5],'r') # red star-markers
plot(m[:5],n[:5],'go-') # green line with circle-markers
plot(j[:5],k[:5],'ks:') #black dotted line with square -makres

title('Plotting: "test.jpg"')
show()




关于Image Engineering & Computer Vision的更多讨论与交流,敬请关注本博客和新浪微博songzi_tea.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息