"); //-->
import cv2
import numpy as np
import os
img_file_name="Video_File_1.bmp"
img = cv2.imread(img_file_name,0)
width,height=img.shape
txt_file_name="77.txt"
try:
os.remove(txt_file_name)
except Exception,e:
print e
txt=open(txt_file_name,"w")
for i in range(height):
for j in range(width):
txt.write(str(img[j,i]))
txt.write("\r")
txt.close()
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。