2019年7月15日

改名移动批量文件 shutil.copy

摘要: import glob import os import shutil filePath = 'F:/project/Breast/InBreast/INBreast/imgout/' newFilePath = 'F:/project/Breast/InBreast/INBreast/imgout1/' filename = os.listdir(filePath) for i in f... 阅读全文

posted @ 2019-07-15 20:08 Hebye 阅读(497) 评论(0) 推荐(0) 编辑

4列数据取前两列 小记

摘要: import time import os import math import sys import os,os.path,shutil import numpy as np import re txtPath = 'F:/project/Breast/InBreast/INBreast/AllTXTxd/' txtType = 'txt' txtLists = os.listdir(txt... 阅读全文

posted @ 2019-07-15 18:09 Hebye 阅读(257) 评论(0) 推荐(0) 编辑

浮点型数据需要转化为int,才能作为点,被读取abc = np.array(abc, dtype=np.int)

摘要: import cv2 import numpy as np import matplotlib.pyplot as plt img = 'test.jpg' img = cv2.imread(img) triangle = np.array([[0, 0], [1500, 800], [500, 400]]) abc = np.zeros((3, 2)) print(abc) abc[0,0... 阅读全文

posted @ 2019-07-15 17:51 Hebye 阅读(816) 评论(0) 推荐(0) 编辑

计算多个点中距离最远的两个点 python

摘要: import numpy as npfrom scipy import spatialprint("hello")# test pointspts = np.random.rand(100, 2)print(pts)# two points which are fruthest apart will 阅读全文

posted @ 2019-07-15 12:19 Hebye 阅读(3169) 评论(0) 推荐(0) 编辑

导航