随笔分类 -  Python

看看python能干什么。
【光流法Python版本】Learning OpenCv ch10-1
摘要:import cv2.cv as cvimport numpy as npimport ImageMAX_CORNERS = 500;# Initialize, load two images from the file system, and# allocate the images and other structures we will need for# results.#imgA = cv.LoadImage("OpticalFlow0.jpg",cv.CV_LOAD_IMAGE_GRAYSCALE);imgB = cv.LoadImage("Optic 阅读全文

posted @ 2012-05-28 23:40 LateStop 阅读(2618) 评论(0) 推荐(0)

将path里的分号替换成回车
摘要:1 #Filename:replace.py2 3 srcf = file('sys_new.txt','r')4 oldStr = srcf.read();5 newStr = oldStr.replace('\n','')6 7 #print newStr8 desf = file('sys.txt','w')9 desf.write(newStr)本应该用VIM的替换实现的,无奈不知道如何在VIM里表示回车。更新:VIM将某字符串替换成回车::%s/;/^M/g难点在于如何输入^M。即表示一个 阅读全文

posted @ 2011-12-10 12:48 LateStop 阅读(584) 评论(0) 推荐(0)

导航