
python
一只荣
武汉大学在校生
展开
-
python图像处理之直方图均衡化
def histeq(img): h=img.shape[0] img_gray_1D=img.flatten() img_gray_len=img_gray_1D.shape[0] img_gray_int=(img_gray_1D+0.5).astype(np.uint8) psk=np.zeros(256) for i in range(...原创 2019-11-01 17:35:40 · 376 阅读 · 0 评论 -
pycharm输出重定向
类似于这样: import sys f = open('output.txt', 'a') sys.stdout = f sys.stderr = f print("hello",file=f) f.close()原创 2019-04-01 20:39:02 · 1746 阅读 · 0 评论 -
subprocess.call 传参
类似于这样: 调用文件中—— import subprocess out_code = subprocess.call(['python', 'oncequery.py',input_file]) 被调用文件中—— if __name__ == '__main__': main(sys.argv[1]) ...原创 2019-04-02 21:00:42 · 3485 阅读 · 0 评论