imname = "Testing/LescaThresholdCrop.png" pointsname = "Testing/LescaPointsCrop.csv" source = 32 image = gs.read_image(imname) points = gs.read_points(pointsname) #First few steps of init_graph function disp = 600 dim = [image.shape[1], image.shape[0]] g = gt.Graph() gs.gen_graph_props(g) gs.add_all_vertices(g, points, image, dim, disp) cirDict = gs.make_all_circles(g, image) im = image a = points[34] b = points[36] thresh = 1 start = timeit.default_timer() if a == b: print("False") step1 = timeit.default_timer() p = points[:] p.remove(a) step2 = timeit.default_timer() height = im.shape[0] - 1
imname = "Testing/LescaThresholdCrop.png" pointsname = "Testing/LescaPointsCrop.csv" source = 32 image = gs.read_image(imname) points = gs.read_points(pointsname) #First few steps of init_graph function disp = 600 dim = [image.shape[1], image.shape[0]] g = gt.Graph() gs.gen_graph_props(g) gs.add_all_vertices(g, points, image, dim, disp) circleList = gs.make_all_circles(g, image) #Some timing and validation tests start = timeit.default_timer() edgePairs1 = gs.edge_tester(points, image, circleList) elapsed = timeit.default_timer()-start print("Edge checking v1:") print("Time = {}".format(elapsed)) print("Found {} edges.\n".format(len(edgePairs1))) # start = timeit.default_timer() # edgePairs2 = e.edge_tester2(points, image, circleList, 50, pct = True) # elapsed = timeit.default_timer()-start # print("Edge checking v2:") # print("Time = {}".format(elapsed)) # print("Found {} edges.\n".format(len(edgePairs2)))